This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
# MIT license, do whatever you want with it | |
# | |
# This is my invoice.php page which I use to make invoices that customers want, | |
# with their address on it and which are easily printable. I love Stripe but | |
# their invoices and receipts were too wild for my customers on Remote OK | |
# | |
require_once(__DIR__.'/../vendor/autoload.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const toBase64 = (file) => new Promise((resolve, reject) => { | |
const reader = new FileReader(); | |
reader.readAsDataURL(file); | |
reader.onload = (e) => resolve(e.target.result); | |
reader.onerror = (err) => reject(err); | |
}); | |
const compressBase64 = (src, quality = 0.5) => new Promise((resolve) => { | |
const img = new Image(); | |
img.src = src; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ngrok's web interface is HTML, but configuration is bootstrapped as a JSON | |
# string. We can hack out the forwarded hostname by extracting the next | |
# `*.ngrok.io` string from the JSON | |
# | |
# Brittle as all get out--YMMV. If you're still reading, usage is: | |
# | |
# $ ./ngrok_hostname.sh <proto> <addr> | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
description: "This is a sample server Petstore server. You can find out more about | |
Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, | |
#swagger](http://swagger.io/irc/). For this sample, you can use the api key | |
`special-key` to test the authorization filters." | |
version: 1.0.2 | |
title: Swagger Petstore | |
termsOfService: http://swagger.io/terms/ | |
contact: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a faunadb adapter for next-auth | |
* original source: https://gist.github.com/s-kris/fbb9e5d7ba5e9bb3a5f7bd11f3c42b96 | |
* create collections and indexes in your faunadb shell(dashboard or cli) using the following queries: | |
CreateCollection({name: 'accounts'}); | |
CreateCollection({name: 'sessions'}); | |
CreateCollection({name: 'users'}); | |
CreateCollection({name: 'verification_requests'}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
class JsonMiddleware | |
{ | |
public function handle(Request $request, Closure $next) |