This file contains 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 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 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 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 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 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 |
This file contains 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
# cat /proc/cpuinfo | grep "^processor" | wc -l | |
16 | |
# cat /proc/cpuinfo | grep "^model name" | head -1 | |
model name : Intel(R) Xeon(R) CPU E5520 @ 2.27GHz | |
# openssl speed md5 | |
Doing md5 for 3s on 16 size blocks: 3787525 md5's in 3.00s | |
Doing md5 for 3s on 64 size blocks: 3016201 md5's in 3.00s | |
Doing md5 for 3s on 256 size blocks: 1856180 md5's in 3.00s |
This file contains 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
/* | |
* Copyright (c) 2011 Berk D. Demir <bdd@mindcast.org> | |
* | |
* Permission to use, copy, modify, and distribute this software for any | |
* purpose with or without fee is hereby granted, provided that the above | |
* copyright notice and this permission notice appear in all copies. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
This file contains 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 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 |
NewerOlder