This file contains hidden or 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
### ~/.subversion/config | |
### Add this line to the [helpers] section | |
diff-cmd = ~/bin/svn-diffwrap.sh |
This file contains hidden or 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
def get_quotes(block_of_text) | |
lines = block_of_text.split(/\n+/) | |
lines.map do |line| | |
m = line.match(/^(.+?):\s+(.+)$/) # match the line | |
next unless m # skip any lines that don't look like "some name: some text" | |
[ m[1], m[2] ] | |
end.compact | |
end |
This file contains hidden or 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 - | |
#### | |
## postgres_backup | |
## back up postgres on a regular basis | |
## USAGE: | |
## ./postgres_backup [ <prefix> ] [ <number_to_keep> ] | |
## prefix will default to 'pg' | |
## number_to_keep defaults to 2 | |
## |
This file contains hidden or 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
<?php | |
//Use this to tunnel a file through json for crossdomain access. | |
try { | |
$uri = $_GET['uri']; // the URI that we're fetching | |
$callback = $_GET['_callback']; // the callback that's used with jsonp (optional) | |
if (is_null($_GET['uri'])) { | |
throw new Exception('Bad URI'); |