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
@record = [] | |
def record_match? | |
record_string = @record.join(" ") | |
record_string =~ /shadel/i && record_string !~ /svnmerge/ | |
end | |
def print_record | |
puts @record.join | |
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
parse_git_branch() { | |
git symbolic-ref HEAD 2> /dev/null | cut -d/ -f3- | sed -e 's/\(.*\)/ (\1)/' | |
} | |
PS1="\w\$(parse_git_branch) $ " |
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
TERM=xterm-color | |
# \[ starts a sequence of non-printable chars | |
# \] ends that sequence | |
# \e[1m turns text that follows Bold | |
# \e[m turns text that follows Normal | |
# | |
# \[\e[1m\] tells the shell not to count the non-printable bold command in it's wrapping calculations | |
# \[\e[m\] tells the shell not to count the non-printable normal command in it's wrapping calculations | |
# | |
# Unlike HTML <b></b> elements; this is more like <b>...<normal> It's important that the shell counts |
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
# Counts the number of files in each subdirectory of the given directory | |
# and then outputs the count in a Tufte-esque style histogram, where the | |
# number before the | is the 10's column, and each number after the | | |
# represents one data point with that value. This lets you see the | |
# spread to get a sense of the distribution. Each 10's value has two | |
# rows: one for values 0-4, one for 5-9 | |
# | |
# 0| | |
# 0|99 | |
# 1|0001233333333344444444444 |
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
[core] | |
gitproxy="/Users/name/bin/gitproxy" for github.com |
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
require 'socket' | |
require 'openssl' | |
# port can be anything. here it's ldaps | |
socket = TCPSocket.new("some.secure.server.com", 636) | |
ssl_context = OpenSSL::SSL::SSLContext.new() | |
unless ssl_context.verify_mode | |
warn "warning: peer certificate won't be verified this session." | |
ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
end | |
sslsocket = OpenSSL::SSL::SSLSocket.new(socket, ssl_context) |
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
require 'restclient' | |
require 'pp' | |
require 'hpricot' | |
if ARGV.size == 0 | |
puts "Usage: showheaders.rb <url> [headers]" | |
puts | |
puts " Headers are optional, but should come in as pairs of arguments." | |
puts " showheaders.rb <url> If-None-Match 4eb6dc" | |
exit 1 |
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 macruby | |
# From: http://www.stompy.org/2008/08/14/xcode-and-git-another-build-script/ | |
# Expanded from here: http://www.furmanek.net/36/using-macruby-to-set-xcode-project-version-from-git/ | |
# Xcode auto-versioning script for Subversion by Axel Andersson | |
# Updated for git by Marcus S. Zarra and Matt Long | |
# Converted to ruby by Abizern | |
# Converted to MacRuby by Gregory Furmanek | |
# Merged with MacRuby version by elliottcable | |
# Dirty handling, style and build-only version update by timshadel |
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
$ time grails create-app qotd | |
Welcome to Grails 1.3.4 - http://grails.org/ | |
Licensed under Apache Standard License 2.0 | |
Grails home is set to: /usr/local/Cellar/grails/1.3.4 | |
Base Directory: /Users/tim/work/ssi/consulting/learn | |
Resolving dependencies... | |
Dependencies resolved in 1143ms. | |
Running script /usr/local/Cellar/grails/1.3.4/scripts/CreateApp_.groovy | |
Environment set to development |
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-mini:~ $ cd /usr/local/ | |
the-mini:local (master) $ git remote -v | |
the-mini:local (master) $ git pull https://github.com/timshadel/homebrew.git | |
remote: Counting objects: 8, done. | |
remote: Compressing objects: 100% (5/5), done. | |
remote: Total 5 (delta 3), reused 0 (delta 0) | |
Unpacking objects: 100% (5/5), done. | |
From https://github.com/timshadel/homebrew | |
* branch HEAD -> FETCH_HEAD | |
First, rewinding head to replay your work on top of it... |
OlderNewer