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 | |
if ARGV[0] == "autoconf" | |
puts "yes" | |
exit | |
end | |
if ARGV[0] == "config" | |
puts <<EOT | |
graph_title delayed_jobs |
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 | |
# | |
# Read's ABC's XML files for 2010 election totals and dumps them out. | |
# | |
# http://a.abcnews.com/xml/elections/2010/dynamic/dynamicgeneral/prod/elections/national/HouseMap.xml | |
# http://a.abcnews.com/xml/elections/2010/dynamic/dynamicgeneral/prod/elections/national/SenateMap.xml | |
# | |
# Copyright (c) 2010 Rick Branson | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
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
# Copyright (c) 2010 Richard Branson | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
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
wget -nv --limit-rate=150k --delete-after -p http://www.site.com/path/to/page |
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
# The Computer Language Benchmarks Game | |
# http://shootout.alioth.debian.org/ | |
# transliterated from Mario Pernici's Python program | |
# contributed by Rick Branson | |
require "rubygems" | |
require "gmp" | |
def gmpz(n) |
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 -x | |
# git name-rev is fail | |
CURRENT=`git branch | grep '\*' | awk '{print $2}'` | |
if [ "$CURRENT" == "master" ]; then | |
echo "Current branch is master!" | |
exit | |
fi | |
git checkout master |
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 -x | |
# git name-rev is fail | |
CURRENT=`git branch | grep '\*' | awk '{print $2}'` | |
git checkout master | |
git merge ${CURRENT} | |
git push origin master | |
git checkout ${CURRENT} |
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/ruby | |
# | |
# db-slam.rb: A simple SQL database load generator. Not for benchmarking. | |
# | |
# Requires "sequel" gem, and a gem for whatever database you're trying to | |
# connect to. Accepts a URI parameter as a Sequel URI, such as: | |
# | |
# $ db-slam.rb postgres://user:password@host/database | |
# |
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
# Add this to your nginx.conf under http { } | |
server { | |
listen 843; | |
server_name localhost; | |
location / { | |
rewrite ^(.*)$ /crossdomain.xml; | |
} |
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
© <script id="__copyright__" type="text/javascript">(function(){var y=(new Date()).getYear();document.getElementById("__copyright__").outerHTML=y<1900?y+1900:y;})();</script> Me. |