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
Index: Source/SPConnectionController.m | |
=================================================================== | |
--- Source/SPConnectionController.m (revision 2726) | |
+++ Source/SPConnectionController.m (working copy) | |
@@ -326,7 +326,7 @@ | |
[self setSshHost:[[self sshHost] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]]; | |
// Set up the tunnel details | |
- sshTunnel = [[SPSSHTunnel alloc] initToHost:[self sshHost] port:([[self sshPort] length]?[[self sshPort] integerValue]:22) login:[self sshUser] tunnellingToPort:([[self port] length]?[[self port] integerValue]:3306) onHost:[self host]]; | |
+ sshTunnel = [[SPSSHTunnel alloc] initToHost:[self sshHost] port:[[self sshPort] integerValue] login:[self sshUser] tunnellingToPort:([[self port] length]?[[self port] integerValue]:3306) onHost:[self host]]; |
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 | |
# Run using: bash <(curl -s https://raw.github.com/gist/1363753) | |
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem | |
gem install linecache19-0.5.13.gem ruby-debug-base19-0.11.26.gem -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p0/ | |
rm linecache19-0.5.13.gem | |
rm ruby-debug-base19-0.11.26.gem | |
bundle update ruby-debug19 |
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/sh | |
set -e | |
usage() { | |
echo "usage: git-extract.sh commit output-directory" | |
} | |
extract() { | |
FILES=`git diff-tree --oneline --no-commit-id --name-only -r $1` | |
for file in $FILES |
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
# A xterm-256color based TERMINFO that adds the escape sequences for italic. | |
# | |
# Install: | |
# | |
# tic xterm-256color-italic.terminfo | |
# | |
# Usage: | |
# | |
# export TERM=xterm-256color-italic | |
# |
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/sh | |
file "$1" | grep -q "text" | |
if [ $? -ne 0 ]; then | |
/usr/bin/open $1 | |
else | |
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl $1:$2 | |
fi |
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
puts "Hello World" |
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 describe(inhabitant) | |
if inhabitant == "sophie" | |
puts 'gender: female' | |
puts 'height: 145' | |
else | |
if inhabitant == "paul" | |
puts 'gender: male' | |
puts 'height: 145' | |
else | |
if inhabitant == "dawn" |
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
require 'money' | |
require 'json' | |
Money.use_i18n = false | |
class Money | |
def to_json(*) | |
to_s | |
end | |
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
class Enumerator::Lazy | |
def each(*) | |
super | |
self | |
end | |
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
def a_1 | |
{ a: 1 } if condition_1 | |
end | |
def a_2 | |
{ a: 2 } if condition_2 | |
end | |
def a_3 | |
{ a: 3 } |
OlderNewer