- GitHub Staff
- http://zerowidth.com
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
--- /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb 2008-12-07 13:54:11.000000000 -0700 | |
+++ /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb 2008-12-07 13:54:11.000000000 -0700 | |
@@ -128,6 +128,10 @@ | |
# Gem::Requirement and Gem::Version documentation. | |
def self.activate(gem, *version_requirements) | |
+ if ENV["GEM_DEBUG"] | |
+ STDERR.puts "activating #{gem} #{version_requirements.inspect}" | |
+ caller[2..-1].each {|c| STDERR.puts " #{c}"} | |
+ 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
function d() { | |
if [ -n "$1" ]; then | |
if [ -d "$1" ]; then | |
pushd $1 >/dev/null | |
mvim -c :NT | |
popd >/dev/null | |
else | |
echo "$1 is not a directory" | |
fi | |
else |
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 "ostruct" | |
describe "wtf" do | |
it "fails" do | |
o = OpenStruct.new :foo => "lol", :bar => "what" | |
o.stub!(:gem) | |
o.gem | |
o.gem "foo" | |
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
~ ➔ sudo easy_install simplejson | |
Password: | |
Searching for simplejson | |
Reading http://pypi.python.org/simple/simplejson/ | |
Reading http://undefined.org/python/#simplejson | |
Best match: simplejson 2.0.9 | |
Downloading http://pypi.python.org/packages/source/s/simplejson/simplejson-2.0.9.tar.gz#md5=af5e67a39ca3408563411d357e6d5e47 | |
Processing simplejson-2.0.9.tar.gz | |
Running simplejson-2.0.9/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Irpzrr/simplejson-2.0.9/egg-dist-tmp-T_rpGb | |
No eggs found in /tmp/easy_install-Irpzrr/simplejson-2.0.9/egg-dist-tmp-T_rpGb (setup script problem?) |
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 | |
# | |
# This shell script passes all its arguments to the binary inside the | |
# MacVim.app application bundle. If you make links to this script as view, | |
# gvim, etc., then it will peek at the name used to call it and set options | |
# appropriately. | |
# | |
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This | |
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico | |
# Weber and Bjorn Winckler, Aug 13 2007). |
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
" size the window so it fills the macbook screen | |
set columns=181 | |
set lines=53 | |
set gfn=Andale_Mono:h12 | |
" colorscheme twilight2 | |
colorscheme vibrantink | |
set transparency=5 |
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
# assuming you have the +bash_completion variant of git installed (macports) | |
# and are including bash completion's setup: | |
if [ -f /opt/local/etc/bash_completion ]; then | |
. /opt/local/etc/bash_completion | |
fi | |
TEXT_BLACK='\[\e[0;30m\]' # Black - Regular | |
TEXT_RED='\[\e[0;31m\]' # Red | |
TEXT_GREEN='\[\e[0;32m\]' # Green | |
TEXT_YELLOW='\[\e[0;33m\]' # Yellow |
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 "servolux" | |
require "net/http" | |
require "uri" | |
# see: http://github.com/aniero/rack-streaming-proxy for the latest code | |
# or: sudo gem install rack-streaming-proxy --source http://gemcutter.org | |
module Rack | |
class StreamingProxy |
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
$ irb | |
>> module A; end | |
=> nil | |
>> module B; end | |
=> nil | |
>> module C; end | |
=> nil | |
>> module B; include A; end | |
=> B | |
>> class X; include B; 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 ParentDocument | |
include MongoMapper::Document | |
# parent document has ... well, whatever. | |
timestamps! | |
many :nodes do | |
# root documents only | |
def roots |
OlderNewer