Youtube talk by Reid Draper: https://www.youtube.com/watch?v=JMhNINPo__g
Returns samples from a given generator
(gen/sample gen/boolean)
#################### ~/.config/helix/config.toml #################### | |
theme = "tokyonight_storm" | |
#theme = "base16_transparent" | |
[editor] | |
line-number = "relative" | |
mouse = false | |
bufferline = "multiple" | |
[keys.normal] |
echo "Loading .zshrc" | |
source $HOME/.aliases | |
## curl https://raw.githubusercontent.com/git/git/refs/heads/master/contrib/completion/git-prompt.sh > ~/.git-prompt.sh | |
source $HOME/.git-prompt.sh | |
setopt PROMPT_SUBST ; PS1='[%F{39}%~%F{green}$(__git_ps1 " (%s)")%f]>' | |
export VSCODE="/Applications/Visual Studio Code.app/Contents/Resources/app/bin" | |
export EDITOR=hx |
#!/usr/bin/env bb | |
;; cat test.csv | csv.clj '(fn [m] (get m "column1"))' | |
(defn lines->maps [lines] | |
(let [headers (first lines) | |
body (rest lines)] | |
(->> body | |
(map (partial zipmap headers))))) |
Youtube talk by Reid Draper: https://www.youtube.com/watch?v=JMhNINPo__g
Returns samples from a given generator
(gen/sample gen/boolean)
(defmacro unless-error-> | |
"Unless expr is a map like {:error xxx}, threads it into the first form (via ->), | |
and unless that result is a map like {:error xxx}, through the next etc" | |
[expr & forms] | |
(let [g (gensym) | |
steps (map (fn [step] `(if (:error ~g) ~g (~step ~g))) | |
forms)] | |
`(let [~g ~expr | |
~@(interleave (repeat g) (butlast steps))] | |
~(if (empty? steps) |
#!/bin/bash | |
ENCRYPTED_BIN_FILE=$1 | |
aws kms decrypt --ciphertext-blob fileb://$ENCRYPTED_BIN_FILE --query Plaintext --output text | base64 --decode |
#!/bin/bash | |
KEY_ID=$1 | |
UNENCRYPTED=$2 | |
aws kms encrypt --key-id $KEY_ID --plaintext "$UNENCRYPTED" --query CiphertextBlob --output text | base64 --decode |
#!/bin/bash | |
KEY_ID=$1 | |
UNENCRYPTED=$2 | |
aws kms encrypt --key-id $KEY_ID --plaintext "$UNENCRYPTED" --query CiphertextBlob --output text |
#!/bin/bash | |
BASE_DIR=`pwd` | |
for REPO in $(find . -type d -d 1 | sed -e s/[\.\/]//g) | |
do | |
echo "Pulling $BASE_DIR/$REPO ..." | |
cd "$BASE_DIR/$REPO" | |
if [ "`git status | grep modified | wc -l`" -eq "0" ] ; then git pull; else echo "Skipping (has modified files)"; fi | |
done |