I hereby claim:
- I am calebcase on github.
- I am calebcase (https://keybase.io/calebcase) on keybase.
- I have a public key ASCO0CPE2vPQ8m76RBNyb5yTt3VGt-P-lTE7lBaG5hSUMAo
To claim this, I am signing this object:
| CREATE OR REPLACE FUNCTION notify_changes_on_create() RETURNS trigger | |
| LANGUAGE plpgsql | |
| AS $$BEGIN | |
| PERFORM pg_notify('changes', '{"kind": "create", "data": ' || NEW.data::text || '}'); | |
| RETURN NULL; | |
| END;$$; | |
| CREATE OR REPLACE FUNCTION notify_changes_on_delete() RETURNS trigger | |
| LANGUAGE plpgsql | |
| AS $$BEGIN |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| set -euo pipefail | |
| domain=$1 | |
| ciphers=$(openssl ciphers | tr ':' ' ') | |
| for cipher in $ciphers; do | |
| if openssl s_client -servername "$domain" -connect "$domain":443 -cipher "$cipher" <<<'' &>/dev/null; then | |
| printf '%s ok\n' "$cipher" | |
| else |
| #!/bin/bash | |
| set -euo pipefail | |
| query=${1:-amazon} | |
| # Shut down other users of the smart card (otherwise we can't use it). | |
| pkill scdaemon || true | |
| if [[ -f ~/.token ]]; then | |
| last=$(<~/.token) |
Let's go faster and just use the pre-built stuff in a docker container:
alias haskell='docker run -it --rm --user "$(id -u):$(id -g)" --net=host -v "$(pwd)":"/home/$USER" --workdir="/home/$USER" -e HOME="/home/$USER" haskell:8'
Pull down the most recent cabal index:
haskell cabal update
| alias haskell='docker run -it --rm --user "$(id -u):$(id -g)" --net=host -v "$(pwd)":"/home/$USER" --workdir="/home/$USER" -e HOME="/home/$USER" -e USER="$USER" haskell:8' | |
| cd ~/some-haskell-project | |
| haskell cabal update | |
| haskell cabal build |
| alias rust='docker run -it --rm --user "$(id -u):$(id -g)" --net=host -v "$(pwd)":"/home/$USER" --workdir="/home/$USER" -e HOME="/home/$USER" -e USER="$USER" rust:latest' | |
| cd ~/some-rust-project | |
| rust cargo run |
| unset SSH_AGENT_PID | |
| export SSH_AUTH_SOCK=/home/ccase/.gnupg/S.gpg-agent.ssh | |
| cat > ~/.gnupg/gpg-agent.conf <<EOF | |
| enable-ssh-support | |
| default-cache-ttl 15 | |
| max-cache-ttl 15 | |
| default-cache-ttl-ssh 15 | |
| max-cache-ttl-ssh 15 | |
| EOF |
| #!/bin/bash | |
| set -euo pipefail | |
| needle=${1?You must provide an name or email to search for.} | |
| gpg2 --list-keys --fingerprint "$needle" | | |
| grep 'Key fingerprint = ' | | |
| sed -r 's/Key fingerprint = (.+)$/\1/' | | |
| tr -d ' ' |
| [alias] | |
| # Checkout a pull request branch on an upstream project. It | |
| # handles PRs that get rebased as well. | |
| # | |
| # git pr 3 | |
| pr = "!f() { git checkout master; git branch -D pr/$1 || true; git fetch origin refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f" | |
| # Pull a rebasing branch on a fork. Useful for viewing someones | |
| # rebasing feature branch from a clone of their fork. | |
| pbr = "!f() { b=$(git rev-parse --abbrev-ref HEAD); git fetch origin $b && git reset --hard origin/$b; }; f" |