This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import math | |
| import sys | |
| def usage(): | |
| print(f"usage: {sys.argv[0]} [hex digest]") | |
| sys.exit(64) # EX_USAGE from sysexits.h or os.EX_USAGE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| ltab=( | |
| 1/brightness=1 | |
| 2/trigger=disk-activity | |
| 3/trigger=netdev | |
| 3/device_name=enp1s0 | |
| 3/link=1 | |
| 3/tx=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| (($# == 2)) || (echo "usage: $0 <instance> <user>" >&2; exit 64) | |
| instance=$1 user=$2 | |
| next="https://${instance}/users/${user}/followers?page=1" | |
| while [[ ${next} != "null" ]]; do | |
| readarray -t urls < <( | |
| curl -SsfH 'accept: application/activity+json' "${next}" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Keybase proof | |
| I hereby claim: | |
| * I am bdd on github. | |
| * I am bdd (https://keybase.io/bdd) on keybase. | |
| * I have a public key ASDwQaLM40WJkS-ZhAZTww7f8EkKjkJBWcs5lX9-2xhucAo | |
| To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # FZF_DEFAULT_COMMAND utility for fzf | |
| # | |
| # Tries to use Watchman, Ripgrep (rg), The Silver Searcher (ag) in this order. | |
| # ...or falls back the fzf's Unix default. | |
| # | |
| # TODO: | |
| # - Use 'git ls-files -cmod' in Git repositories |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from itertools import zip_longest | |
| from functools import reduce | |
| def code(callsign): | |
| """Return APRS-IS passcode for callsign | |
| Based on aprsc's implementation at https://git.io/vrGXL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| match=`git rev-parse --abbrev-ref --branches="*$1*"` | |
| case `wc -w <<< "$match" | tr -d ' '` in | |
| "0") echo "error: '$1' did not match any branch." 2>&1 ;; | |
| "1") git checkout $match ;; | |
| *) echo "error: '$1' is ambigious among:\n$match" 2>&1 | |
| esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| import socket | |
| import argparse | |
| import BaseHTTPServer | |
| from threading import Thread, Timer | |
| class BasicServer(BaseHTTPServer.BaseHTTPRequestHandler): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: shell-script -*- | |
| # | |
| # reset-auth.zsh | |
| # | |
| # When reattaching to a tmux (or screen session) authentication forwarding and | |
| # delegation environment variables needs to be reset. | |
| # | |
| # Shell functions below can reset forwarded SSH Agent socket and Kerberos | |
| # credentials cache environment variables by discovering and testing validity | |
| # (ssh-agent only) on the remote machine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| /* Additional Emacs bindings: | |
| * | |
| * "<key combination>" = "functionName:"; | |
| * | |
| * Key Modifiers: | |
| * ^: ctrl | |
| * ~: option | |
| * $: shift | |
| * @: command |
NewerOlder