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
const GitHubDeliveryManager = { | |
retryReasons: [ | |
"Couldn't connect to server", | |
"Service Timeout", | |
"An Exception Occurred", | |
"502 Bad Gateway", | |
"timed out" | |
], | |
sleep: function(lf_ms) { |
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
find ~ -name '*.log' -print0 | xargs -0 -L1 stat -f'%z %N' | sort -rn | tee fat-logfiles.txt | head | |
awk '{ total += $1 } END { printf "total: %5.2f MiB\n", total/1024/1024 }' < fat-logfiles.txt |
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
# Basic tagging system for mongoid documents. | |
# jpemberthy 2010 | |
# | |
# class User | |
# include Mongoid::Document | |
# include Mongoid::Document::Taggable | |
# end | |
# | |
# @user = User.new(:name => "Bobby") | |
# @user.tag_list = "awesome, slick, hefty" |
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 | |
FULLPATH=`cd $(dirname $0); pwd` | |
echo $FULLPATH >&2 | |
PROJECT=`echo $FULLPATH | awk -F/ '{print $(NF-3)}'` | |
STATUS=`echo $0 | awk -F- '{print $NF == "worked" ? "pass" : ($NF == "reset" ? "building" : "fail")}'` | |
PW=`cat $FULLPATH/../../../../credentials` | |
curl -u $PW -d"author=$AUTHOR" -- http://ci.domain.com/dashboard/build/$PROJECT/$STATUS | |
echo "Project: "$PROJECT", Status: "$STATUS", Fullpath: "$FULLPATH >&2 |