Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.
You'll probably be working with a single smartcard, so you'll want only one primary key ( |
package main | |
import ( | |
"context" | |
"flag" | |
"log" | |
"net" | |
"syscall" | |
"time" |
### Keybase proof | |
I hereby claim: | |
* I am bhcleek on github. | |
* I am bhcleek (https://keybase.io/bhcleek) on keybase. | |
* I have a public key whose fingerprint is 39EA 2076 B2AE AB89 9315 1CBD 3D33 28E3 3FC6 D29F | |
To claim this, I am signing this object: |
{ | |
"variables": {}, | |
"provisioners": [ | |
{ | |
"type": "file", | |
"source": "minimal.json", | |
"destination": "/tmp/minimal.json" | |
} | |
], | |
"builders": [ |
2016/09/09 02:28:36 packer: 2016/09/09 02:28:36 Running the provision hook | |
2016/09/09 02:28:36 ui: ==> googlecompute: Uploading minimal.json => /tmp/minimal.json | |
==> googlecompute: Uploading minimal.json => /tmp/minimal.json | |
2016/09/09 02:28:36 packer: 2016/09/09 02:28:36 opening new ssh session | |
2016/09/09 02:28:36 [INFO] 454 bytes written for 'uploadData' | |
2016/09/09 02:28:36 packer: 2016/09/09 02:28:36 [INFO] 454 bytes written for 'uploadData' | |
2016/09/09 02:28:36 packer: 2016/09/09 02:28:36 Starting remote scp process: scp -vt /tmp | |
2016/09/09 02:28:36 packer: 2016/09/09 02:28:36 Started SCP session, beginning transfers... | |
2016/09/09 02:28:36 packer: 2016/09/09 02:28:36 Copying input data into temporary file so we can read the length | |
2016/09/09 02:28:36 packer: 2016/09/09 02:28:36 [DEBUG] scp: Uploading minimal.json: perms=C0644 size=454 |
#!/bin/sh | |
ROOT="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
pushd "${ROOT}" | |
fmt=' | |
r=%(refname) | |
d=%(taggerdate:format:%F) | |
monday=$(date -j -f "%Y-%m-%d" -v+mon $d "+%Y-%m-%d") | |
git checkout %(refname) | |
echo $(basename %(refname)) - $monday: |
Extracting the history of a set of files that are spread across multiple subtrees, but are not composed wholly of those subtrees is possible with git, but not always easily grokked. It's not terribly difficult, however; two lines of shell script can get it done. First, use git-filter-branch
to extract the history of the files. This, however, may leave you with merge commits that make no changes, because --prune-empty
will not prune empty merge commits. A second filter branch, though, can remove those empty merge commits.
git filter-branch -f --prune-empty --index-filter 'git rm --cached --ignore-unmatch $(git ls-files | grep -v "path/to/first/file\|LICENSE")'
git filter-branch -f --prune-empty --parent-filter 'sed -e "s/-p//g" > parents; git show-branch --independent $(cat parents) | sed -e "s/^/ -p /" -e "1 s/^ //" -e "s/^-p$//" | tr "\n" " " | tee -a all-parents; rm -f parents'
# postgres container doesn't exist, we'll create and start it | |
echo "Initializing postgres database..." | |
docker run --name api-postgres -P -d postgres:9.3 > /dev/null | |
# wait for postgres to be initialized | |
PIPE=$(mktemp -d -t pipe.XXXXXX) && mkfifo $PIPE/pipe && exec 3<> $PIPE/pipe && rm -rf $PIPE | |
docker logs --tail=1 -f api-postgres 2>&3 & | |
LOG_PID=$! | |
grep -m1 'database system is ready to accept connections' <&3 | |
kill -SIGTERM $LOG_PID |
@echo off | |
set SERVER_VERSION=2.32.0 | |
set IESERVER_VERSION=2.32.3 | |
:REM This will update the Selenium Server Windows Service with the most recent Version | |
:REM of Selenium Server. | |
:REM | |
:REM Prerequisits: | |
:REM * Download Selenium Server to Downloads Folder | |
:REM * Download IE-Server to Downloads Folder and Unzip to Downloads Folder (using suggested name) |
# try to create a temporary directory on osx first. | |
# `mktemp -d` works on OSX and Linux The basename will be random: | |
TMPDIR=$(mktemp -d) | |
# `mktemp -d -t FOO` is valid on OSX and uses TMPDIR, but will cause an error on Linux. | |
# `mktemp -d -t FOO.XXXXXX is valid on both: on Linux will do substitution of the Xs; but on OSX, the Xs are taken literally. | |
TMPDIR=$(mktemp -d -t ${PREFIX} 2>/dev/null || mktemp -d -t ${PREFIX}.XXXXXX) | |
# this can be shorted to | |
TMPDIR=$(mktemp -d "${TMPDIR-:/tmp/}$PREFIX.XXXXXX") |