Skip to content

Instantly share code, notes, and snippets.

View gist:36
diff --git a/bin/bundle b/bin/bundle
index 6efdf51..7b57fac 100755
--- a/bin/bundle
+++ b/bin/bundle
@@ -9,8 +9,23 @@ $:.each do |path|
end
require 'bundler/cli'
+
begin
View tomato.rb
Butts.send :butt=>'fart'
100.times {puts <<EOF
___ ___ ___ ___ ___ ___ ___
/ / / / | / / / / / / / / / /
/__/ /__/ |/ / /__ /__/ / / / /__ /__
/ | / \ / / / / \ / / / / /
/__/ / \ / /___ /___ / \ /__/ /__ /___ ___/
EOF
}
puts <<EOF
View with-gems.rb
require "rubygems"
require "rake"
puts `ps -orss -p#{Process.pid}`
# Result
# RSS
# 6564
View touchnotes.py
import re
import glob
import os
for i in files:
i = re.sub("papers", "notes", i.lower())
i = re.sub(" ", ".", i)
i = re.sub("[-,?():]", "", i)
i = re.sub("\.+", ".", i)
View awesome.rb
RubyFringe.teh_awesome? # => true
View gist:45
require 'spec_helper'
describe GroupsController do
include SessionTestHelper
describe "GET 'show'" do
it "should load the group from the database" do
@the_group = Factory(:group)
Group.stub(:find_active_by_unique_name).with("london-developers").
and_return(@the_group)
View gist:46
require 'spec_helper'
describe GroupsController do
include SessionTestHelper
describe "GET 'show'" do
it "should load the group from the database" do
@the_group = Factory(:group)
Group.stub(:find_active_by_unique_name).with("london-developers").
and_return(@the_group)
You can’t perform that action at this time.