Add to ~/.ssh/config
:
Host *
# Enable persistent connection multiplexing
ControlMaster auto
ControlPath ~/.ssh/-%r@%h:%p
ControlPersist 600
#!/bin/sh | |
# Usage: . testlib.sh | |
# Simple shell command language test library. | |
# | |
# Tests must follow the basic form: | |
# | |
# begin_test "the thing" | |
# ( | |
# set -e | |
# echo "hello" |
In response to all the responses to: | |
http://twitter.com/rtomayko/status/1155906157 | |
You should never do this in a source file included with your library, | |
app, or tests: | |
require 'rubygems' | |
The system I use to manage my $LOAD_PATH is not your library/app/tests |
#!/bin/sh | |
# Usage: git-thanks <since>..<until> | |
# | |
# All commits on master, ever: | |
# git-thanks master | |
# | |
# All commits on master since the 0.9.0 tag: | |
# git-thanks 0.9.0..master | |
git log "$1" | |
#!/usr/bin/env ruby | |
#/ Usage: <progname> [options]... | |
#/ How does this script make my life easier? | |
# ** Tip: use #/ lines to define the --help usage message. | |
$stderr.sync = true | |
require 'optparse' | |
# default options | |
flag = false | |
option = "default value" |
$ git branch -r --merged | | |
grep origin | | |
grep -v -e '>' -e master | | |
xargs -L1 | | |
awk '{split($0,a,"/"); print a[2]}' | | |
xargs git push origin --delete |
" --------------------------------------------------------------------------- | |
" Strip all trailing whitespace in file | |
" --------------------------------------------------------------------------- | |
function! StripWhitespace () | |
exec ':%s/ \+$//gc' | |
endfunction | |
map ,s :call StripWhitespace ()<CR> |
# The new git-scm.com site includes man pages designed for pleasant viewing in a web browser: | |
# | |
# http://git-scm.com/docs | |
# | |
# The commands below can be used to configure git to open these pages when | |
# using `git help -w <command>' from the command line. Just enter the config | |
# commands in your shell to modify your ~/.gitconfig file. | |
# Create a new browser command and configure help -w to use it. | |
git config --global browser.gitscm.cmd "/bin/sh -c 'open http://git-scm.com/docs/\$(basename \$1 .html)' --" |
#!/bin/sh | |
#/ Usage: gem-apply <gem> <patchfile | |
#/ Apply a patch to a locally installed gem. | |
#/ | |
#/ Example: | |
#/ % curl https://github.com/jekyll/jekyll/pull/3452.patch | gem-apply jekyll | |
#/ patching file lib/jekyll/commands/serve.rb | |
#/ Hunk #1 succeeded at 39 (offset -1 lines). | |
#/ Hunk #2 succeeded at 125 (offset -6 lines). | |
#/ patching file lib/jekyll/commands/serve.rb |
def defer(&block) | |
def block.each ; yield call ; end | |
block | |
end | |
app = | |
lambda do |env| | |
status = 200 | |
headers = { 'Last-Modified' => exec_sql('SELECT MAX(updated_at) FROM foos').httpdate } | |