Skip to content
View mt.rb
#!/usr/bin/env ruby --disable-gems
# Tab completion for minitest tests.
# 1. Put this file in a directory in your $PATH. Make sure it's executable
# 2. Run this:
# $ complete -o bashdefault -f -C /path/to/this/file.rb ruby
View fallout.rb
# Program to help you hack terminals in Fallout
# Usage:
# Run the program once with a list of words in the terminal. The program will
# output a list, and the first word in the list is the word you should pick
# because it will eliminate the most possibilities.
# If that word is incorrect, then re-run the program with two lists, first the
View bench.rb
require 'active_record'
class Topic < ActiveRecord::Base
20.times do |i|
Process.waitpid fork {
ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:'
ActiveRecord::Base.connection.instance_eval do
View o.diff
diff --git a/activerecord/lib/active_record/connection_adapters/column.rb b/activerecord/lib/active_record/connection_adapters/column.rb
index af307b5..4037e316 100644
--- a/activerecord/lib/active_record/connection_adapters/column.rb
+++ b/activerecord/lib/active_record/connection_adapters/column.rb
@@ -31,7 +31,7 @@ module ActiveRecord
# It will be mapped to one of the standard Rails SQL types in the <tt>type</tt> attribute.
# +null+ determines if this column allows +NULL+ values.
def initialize(name, default, cast_type, sql_type = nil, null = true)
- @name = name
+ @name = name.freeze
View omg.diff
diff --git a/Gemfile b/Gemfile
index 97406be..96dc4fc 100644
--- a/Gemfile
+++ b/Gemfile
@@ -11,7 +11,7 @@ gem 'concurrent-ruby', '~> 1.0.0.pre3', github: 'ruby-concurrency/concurrent-rub
# Active Job depends on the URI::GID::MissingModelIDError, which isn't released yet.
gem 'globalid', github: 'rails/globalid', branch: 'master'
-gem 'rack', github: 'rack/rack', branch: 'master'
+gem 'rack', path: '/Users/aaron/git/rack'
View bm.rb
require 'benchmark'
require 'csv'
GEM_REPO = 'many_gems'
N = 15
MEDIAN = N / 2
Gem.clear_paths # clear all of rubygems cache
View blah.diff
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb
index d68fa16..fe4f7a6 100644
--- a/actionpack/lib/action_controller/metal.rb
+++ b/actionpack/lib/action_controller/metal.rb
@@ -259,5 +259,13 @@ module ActionController
lambda { |env| new.dispatch(name, }
+ def self.dispatch(name, req)
View lisp.jl
type Null
nil = Null()
cons = function(x, y)
(m) -> m(x, y)
car = function(z)
View bf.rb
alias p proc
h={'>':p{mc+=1},'<':p{mc-=1},'+':p{m[mc]+=1},'-':p{m[mc]-=1},'.':p{putc m[mc]}}
j={'[':->(i){s<<i;->(){pc=l[pc-1]+1 if m[mc]==0}},']':->(i){o=s.pop;l[o]=i;p{pc=o}}}{|c|c=:"#{c}";x=(j[c]||->(_){h[c]||p{}}).(i);i+=1;x}
while k=ins[pc];pc+=1;m[mc]||=0;k.();end
[ This program prints "Hello World!" and a newline to the screen, its
length is 106 active command characters. [It is not the shortest.]
View meeting.markdown
Something went wrong with that request. Please try again.