See functions using git am
As described in notmuch:id:87tvz8419r.fsf@jb55.com
Conflicts with search bindings:
| #!/usr/bin/env bash | |
| PANDOC="pandoc --variable urlcolor=cyan" | |
| usage () { | |
| printf "usage: pdfnow file.md OR <file.md pdfnow markdown\n" >&2 | |
| exit 1 | |
| } | |
| [ $# -eq 0 ] && usage |
| #!/usr/bin/env bash | |
| howlong() { | |
| mins=$(($1 * 10)) | |
| target=$(date -u -d "now + $mins minutes" -Iseconds) | |
| targetp=$(date -d $target '+%F %R %Z') | |
| ddiff=$(datediff -f "%dd %Hh %0Mm @ $targetp" "now" "$target") | |
| printf "%s\n" "$ddiff" | |
| } |
| #!/usr/bin/env bash | |
| getprice () { | |
| # replace with your preferred exchange | |
| curl -sL 'https://api.quadrigacx.com/v2/ticker' | jq -r .last | |
| } | |
| n=${1:-100} | |
| size=${2:-226} | |
| price=${3:-$(getprice)} |
| enum opcode_token | |
| { | |
| // push value | |
| _OP_0=1, | |
| _OP_FALSE, | |
| _OP_PUSHDATA1, | |
| _OP_PUSHDATA2, | |
| _OP_PUSHDATA4, | |
| _OP_1NEGATE, | |
| _OP_RESERVED, |
| #!/usr/bin/env bash | |
| set -e | |
| access_token=$GITHUB_ACCESS_TOKEN | |
| api() { | |
| curl -sL -H "Authorization: token $access_token" "$@" | |
| } |
| function k(c){var i=0;window.addEventListener('keyup',(e)=>{var y=e.keycode;[38,38,40,40,37,39,37,39,66,65,13][i]==y?i==9?c():i++:i=y==38?1:0})} |
See functions using git am
As described in notmuch:id:87tvz8419r.fsf@jb55.com
Conflicts with search bindings:
| type instance Element StoreFile = FilePath | |
| type instance Element MatchFile = FilePath | |
| type instance Element AppleMusicFile = FilePath | |
| newtype StoreFile = StoreFile { unStoreFile :: FilePath } | |
| deriving Show | |
| newtype MatchFile = MatchFile { unMatchFile :: FilePath } | |
| deriving Show |
| sequential :: [Int] -> Bool | |
| sequential = all (==True) (zipWith beside xs (tail xs)) | |
| where | |
| beside n1 n2 = abs (n2 - n1) == 1 | |
| {- | |
| λ> sequential [1,2,3] | |
| True | |
| λ> sequential [3,2,1] |
| #!/usr/bin/env bash | |
| set -e | |
| get_mimetype(){ | |
| file --mime-type "$1" | sed 's/.*: //' | |
| } | |
| usage () { | |
| printf "kindle-email <file.pdf>\n" 1>&2 |