I hereby claim:
- I am codingmatty on github.
- I am majacobs (https://keybase.io/majacobs) on keybase.
- I have a public key whose fingerprint is FD46 DC55 F778 6338 A554 C732 4D5D F45E A5C1 1358
To claim this, I am signing this object:
# These lines only need to be ran once: | |
dokku plugin:install postgres | |
dokku letsencrypt:set --global email <your-email@email.com> | |
dokku letsencrypt:cron-job --add | |
# This script is meant to be used as a reference to setup an application with a postgres database pointing to a git repository with a Dockerfile | |
dokku apps:create linkwarden | |
dokku postgres:create linkwarden-db | |
dokku postgres:link linkwarden-db linkwarden |
# These lines only need to be ran once: | |
dokku plugin:install postgres | |
dokku letsencrypt:set --global email <your-email@email.com> | |
dokku letsencrypt:cron-job --add | |
# This script is meant to be used as a reference to setup an application with a postgres database pointing to a git repository with a Dockerfile | |
dokku apps:create linkwarden | |
dokku postgres:create linkwarden-db | |
dokku postgres:link linkwarden-db linkwarden |
## This file is not meant to be run | |
## It's just a list of commands to use | |
# Command variables that will be reused | |
AWS_GLACIER_VAULT_NAME= | |
AWS_ACCOUNT_ID= | |
AWS_REGION= | |
# Hydrate vault | |
aws glacier initiate-job --vault-name $AWS_GLACIER_VAULT_NAME --account-id $AWS_ACCOUNT_ID --job-parameters '{"Type": "inventory-retrieval"}' |
function generateDescriptions< | |
T extends Record<K, V>, | |
K extends keyof T, | |
V extends number | string | |
>(e: T): Record<V, K> { | |
return (Object.values(e) as (keyof typeof e)[]).reduce((result, key) => { | |
return { | |
...result, | |
[e[key]]: key, | |
// If you want to format, you'll need to change the return value to be Record<V, string> |
import { useEffect, useState } from 'react'; | |
/** | |
* Usage: | |
* | |
* const {response, error, loading} = useFetch({ url, ...options }, deps); | |
*/ | |
export default function useFetch( | |
{ | |
url, |
#!/bin/bash | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Aborting! Branch is unclean."; | |
exit 1 | |
elif [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then | |
echo "Aborting! Not on master branch."; | |
exit 1; | |
elif [ "$(g rev-list master...origin/master)" != "" ]; then | |
echo "Aborting! Master branch not in sync with origin."; |
const next = require('next'); | |
const pathToRegexp = require('path-to-regexp'); | |
const { parse } = require('url'); | |
module.exports = async function registerNextApp(nextOptions) { | |
const nextApp = next(nextOptions); | |
const requestHandler = nextApp.getRequestHandler(); | |
try { | |
await nextApp.prepare(); |
const states = [ | |
{ name: 'Arizona', code: 'AZ' }, | |
{ name: 'Alabama', code: 'AL' }, | |
{ name: 'Alaska', code: 'AK' }, | |
{ name: 'Arkansas', code: 'AR' }, | |
{ name: 'California', code: 'CA' }, | |
{ name: 'Colorado', code: 'CO' }, | |
{ name: 'Connecticut', code: 'CT' }, | |
{ name: 'Delaware', code: 'DE' }, | |
{ name: 'Florida', code: 'FL' }, |
const countries = [ | |
{ name: 'Afghanistan', code: 'AF' }, | |
{ name: 'Åland Islands', code: 'AX' }, | |
{ name: 'Albania', code: 'AL' }, | |
{ name: 'Algeria', code: 'DZ' }, | |
{ name: 'American Samoa', code: 'AS' }, | |
{ name: 'AndorrA', code: 'AD' }, | |
{ name: 'Angola', code: 'AO' }, | |
{ name: 'Anguilla', code: 'AI' }, | |
{ name: 'Antarctica', code: 'AQ' }, |
I hereby claim:
To claim this, I am signing this object: