One line summary (< 50c)
Longer description (wrap at 72c)
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
gem list | cut -f 1 -d " " | xargs -E gem gem dep -R $gem | grep -v "^ \w" | grep -P "^[^\s][^\n]+\n[^ ]" -o | grep -v "^$" | sort | cut -f 2 -d " " |
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 | |
BRANCHES=`git branch` | |
if [ $? != 0 ]; then | |
exit | |
fi | |
GIT_SVN=0 | |
git branch -r | grep 'git-svn' > /dev/null | |
if [ $? = 0 ]; then | |
GIT_SVN=1 |
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
#!/usr/bin/env ruby -w | |
require 'hpricot' | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
require 'tempfile' | |
test_http = "http://gist.github.com/69452" | |
test_https = "https://gist.github.com/42af948558a3b3704bab" |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'mechanize' | |
MY_NAME = 'Yossef Mendelssohn' | |
CHECKIN_REQUEST_URL = 'http://www.southwest.com/flight/retrieveCheckinDoc.html' | |
prompt = false | |
conf = ARGV[0] |
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 pick(n, x) | |
raise "impossible" if x > n | |
return [n] if x == 1 | |
return [1] * x if x == n | |
choice = rand(n-x+1) | |
[ choice + 1 ] + pick(n - choice - 1, x - 1) | |
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 Punch | |
class << self | |
original_load = self.instance_method(:load) | |
# if you want to call the original use: | |
# original_load.bind(self).call | |
define_method(:load) do |file| | |
raise ArgumentError, 'no filename supplied' unless file | |
@data = YAML.load(File.read(file)) | |
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
require 'spec/runner/formatter/progress_bar_formatter' | |
class NescafeFormatter < Spec::Runner::Formatter::ProgressBarFormatter | |
def example_failed(example, counter, failure) | |
super | |
dump_failure(counter, failure) | |
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
[barnekr@saturnino:opt on test/stuff*]$ bundle install | |
Fetching source index from http://rubygems.org/ | |
Using rake (0.8.7) from bundler gems | |
Using ZenTest (4.2.1) from bundler gems | |
Using activesupport (2.3.5) from bundler gems | |
Using rack (1.0.1) from bundler gems | |
Using actionpack (2.3.5) from bundler gems | |
Using actionmailer (2.3.5) from bundler gems | |
Using activerecord (2.3.5) from bundler gems | |
Using activeresource (2.3.5) from bundler gems |
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
[barnekr@saturnino:opt on test/stuff*]$ bundle install | |
Fetching source index for http://rubygems.org/ | |
Bundler could not find compatible versions for gem "bundler": | |
In Gemfile: | |
bundler (= 0.9.25) | |
In snapshot (Gemfile.lock): | |
bundler (1.0.0.rc.5) | |