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 ruby | |
require 'json' | |
require 'optparse' | |
# Wrapper to run commands | |
def run_cmd(cmd, verbose = false) | |
puts " [executing] #{cmd}" if verbose | |
%x[ #{cmd} ] | |
end |
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
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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 | |
if [ $1 = 0000000000000000000000000000000000000000 ]; then | |
old=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
else | |
old=$1 | |
fi | |
if [ -f Podfile ] && command -v pod install >/dev/null && | |
git diff --name-only $old $2 | egrep -q '^Podfile$' | |
then | |
(unset GIT_DIR; exec pod install) | grep -v '^Using ' | grep -v ' is complete' |
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
# Option defaults | |
OPT="value" | |
# getopts string | |
# This string needs to be updated with the single character options (e.g. -f) | |
opts="fvo:" | |
# Gets the command name without path | |
cmd(){ echo `basename $0`; } |
NewerOlder