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 | |
VERBOSE=0 | |
GHUSER=efrecon | |
SNAPSHOT=0 | |
while [ $# -gt 0 ] | |
do | |
case "$1" in | |
-u | --user) | |
GHUSER=$2 |
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 | |
usage() { | |
if [ -n "$1" ]; then echo $1 1>&2; fi | |
cat << USAGE >&2 | |
Usage: | |
$0 options.. [--] files... | |
-v | --verbose Be more verbose when waiting | |
--no-header Do not consider CSV file with header | |
--dry-run Do not modify files in place, show result instead |
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 | |
# Check if the URL passed as a first argument maches some of the HTTP codes that | |
# are passed in the following arguments as regular expressions. The list of | |
# error codes can be omitted, in which case this will be the whole "OK" range, | |
# from 200 to 299. When the remote site answers one of the matching code an | |
# exit code of 0 is returned, otherwise an error is returned. | |
# | |
# Additional options can be passed: | |
# -v to increase verbosity. |
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
psql -U postgres -l -t |
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
echo "SELECT table_schema || '.' || table_name FROM information_schema.tables WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema');" | psql -U postgres -d dbname -q -t |
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
git fetch | |
git branch -a | |
git diff remotes/origin/HEAD |
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 | |
names=$(docker ps --format "{{.Names}}") | |
echo "tailing $names" | |
while read -r name | |
do | |
# eval to show container name in jobs list | |
eval "docker logs -f --tail=5 \"$name\" | sed -e \"s/^/[-- $name --] /\" &" | |
# For Ubuntu 16.04 |
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 | |
warn() { | |
printf "%s\n" "$*" 1>&2 | |
} | |
verbose() { | |
if [ "$VERBOSE" = "1" ]; then printf "%s\n" "$*" 1>&2; fi | |
} |
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
namespace eval ::druct { | |
namespace eval types {} | |
namespace export {[a-z]*} | |
namespace ensemble create | |
} | |
proc ::druct::new { type varname } { | |
set typedef [Definition $type] | |
if { ![info exists $typedef] } { | |
return -code error "$type does not exist!" |