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
require "time" | |
module Rack | |
class RequestTimer | |
class Timer | |
FORMAT = "%0.3fms elapsed since %s" unless defined?(FORMAT) |
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 | |
old_version=$1 | |
new_version=$2 | |
inventory=$(chruby-exec $old_version -- gem list -q | sed -e 's/^\([^ ]*\) (\(.*\))/\1:\2/' -e 's/[:,] */:/g') | |
for item in $inventory; do | |
gem=${item%%:*} | |
versions=${item#*:} | |
versions=$(echo $versions | sed -e 's/:/ /g') |
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 sheldonh on github. | |
* I am sheldonh (https://keybase.io/sheldonh) on keybase. | |
* I have a public key whose fingerprint is 07B7 6119 5FAD 8AAD EDAA 6F64 F42E 096D 615C 2D28 | |
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
Feature: Legacy bootstrapping | |
As a legacy service component | |
In order to use the configuration service without changing hosting strategy | |
I want to bootstrap the configuration service from a file. | |
Scenario: Legacy bootstrapping | |
Given no environmental service configuration | |
And a legacy service configuration file |
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
Feature: Legacy bootstrapping | |
As a legacy service component | |
In order to use the configuration service without changing hosting strategy | |
I want to bootstrap the configuration service from a file. | |
Scenario: Legacy bootstrapping | |
Given no environmental service configuration | |
And a service configuration file |
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
client | |
proto tcp | |
dev tun | |
nobind | |
mssfix | |
remote vpn-router1.cpt4.host-h.net 443 | |
resolv-retry infinite | |
script-security 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/sh -e | |
# | |
# wget -O virtualbox-guest.sh https://goo.gl/BYGYEx | |
# chmod +x virtualbox-guest.sh | |
# sudo ./virtualbox-guest.sh | |
# | |
if [ $(id -u) != 0 ]; then | |
echo "sudo, remember?" 1>&2 | |
exit 1 | |
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
#!/bin/sh | |
# 1. Install Google Chrome and LastPass | |
# 2. Fetch secrets from S3 | |
# 3. Profit! | |
# | |
# To run: | |
# | |
# wget -O setup.sh https://goo.gl/htFGUu | |
# chmod +x setup.sh |
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
if ! type __git_ps1 &> /dev/null && [ -e /usr/share/git-core/contrib/completion/git-prompt.sh ]; then | |
. /usr/share/git-core/contrib/completion/git-prompt.sh | |
fi | |
if type __git_ps1 &> /dev/null; then | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
export GIT_PS1_SHOWUNTRACKEDFILES=1 | |
export GIT_PS1_SHOWCOLORHINTS=1 | |
export PROMPT_DIRTRIM=2 | |
export PROMPT_COMMAND='__git_ps1 "\w" "\\\$ "' | |
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
# Logs timing of an operation: | |
# | |
# * Start a clock. | |
# * Calls the `operation`, passing in a `done` function that will: | |
# * Stop the clock. | |
# * Log the title of the operation with its elapsed duration and optional outcome. | |
# If the operation calls the `done` function with no outcome, "completed" is used. | |
# | |
# Example: | |
# |
NewerOlder