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 ' ' |
#!/bin/bash | |
set -euo pipefail | |
name=${1?You must set the DNS name to check.} | |
host=${2:-$1} | |
port=${3:-443} | |
# https://www.shellhacks.com/openssl-check-ssl-certificate-expiration-date/ | |
echo | openssl s_client -servername "$name" -connect "$host":"$port" 2>/dev/null | openssl x509 -noout -subject -issuer -startdate -enddate -ocsp_uri -fingerprint -sha256 |