I hereby claim:
- I am nilium on github.
- I am nilium (https://keybase.io/nilium) on keybase.
- I have a public key ASA9ZYQ-ovUYaqBiWNB9MPYWyy-cDcIQZym8orvks3qGvAo
To claim this, I am signing this object:
// This is an example message reader/writer with length prefixes and digests | |
// (in the example's case, using hmac-sha1) to try to confirm that the entire | |
// correct message was read. | |
package main | |
import ( | |
"bytes" | |
"crypto/hmac" | |
"crypto/sha1" |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env bash | |
args=() | |
while [ $# -gt 0 ]; do | |
case "$1" in | |
--) shift; break;; | |
-?*) :;; | |
-) break;; | |
*) break;; | |
esac |
#!/usr/bin/env bash | |
prog="$(basename "$0")" | |
want() { | |
for bin; do | |
if ! hash "$bin" 1>/dev/null 2>&1; then | |
echo "$bin: not installed" 1>&2 | |
exit 1 | |
fi |
Codf exists primarily to make expressive, structured configuration easy to use. Expressive in this case means, more or less, relatively complex but easy to read and write. There are cases of progams like this in the wild, such as nginx, where configuration is integral to making use of them. Codf takes inspiration from nginx in particular, along with other curly-braced config languages. The goal is to provide structure for programs where the status quo of JSON-equivalent languages do not.
With that in mind, codf is the result of several years of building programs that require configuration to define their runtime behavior. This includes several programs whose configuration borders on scripting. These programs need configuration not only for inputs (sockets, files, DBs) and outputs (metrics, logs, more DBs), but also tasks, schedules, data pipelines, state transitions, and so on. Without these, the programs are mostly inert and do nothing — this makes configuration crucial to
// args.go is a CLI arg parser for ipexec and other tools I've written but not released. | |
// It is here mainly as a backup since I don't feel particularly compelled to make a package out of it. | |
// TODO: Figure out which version is newest and update this. | |
package main | |
import ( | |
"net/url" | |
"strconv" |
[escape]>[caps] | |
[caps]>[escape] | |
[kp-caps]>[kp-escape] | |
[up]>[down] | |
[down]>[up] | |
[kp-right]>[kp-down] | |
[kp-left]>[kp-up] | |
[intl-\]>[=] | |
[kp-insert]>[kp-lalt] | |
[kp=]>[kp=mac] |
// Package expand is used to handle basic ${VAR:-DEFAULT} style text interpolations. | |
// | |
// It currently only supports ASCII variable names, since you probably won't see variations on that | |
// in the wild. | |
package expand | |
import ( | |
"bytes" | |
"strings" |
#!/usr/bin/env bash | |
# vim: set tw=80 sw=2 ts=2 et : | |
# USAGE: recover-vim [-h|-help] [CMD...] | |
# | |
# See usage text below for more information. | |
case "$1" in | |
[-/]h|[-/]help|--help) | |
cat <<'USAGE' | |
USAGE: recover-vim [-h|-help] [CMD...] |