Skip to content

Instantly share code, notes, and snippets.

View jonathan's full-sized avatar

Jonathan Hicks jonathan

View GitHub Profile
module PrettyColumns
def run_stuff(sql)
result = ActiveRecord::Base.execute(sql)
order_columns(result)
end
def order_columns(result)
raise NotImplementedError
end
end
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char** argv) {
char protien[4] = "ACGT";
int size = atoi(argv[1]);
int i = 0;
int pos = 0;
for(i; i < size; ++i) {
class Candidate
include MongoMapper::Document
key :alias, String, :required => true
key :notes, String
many :phones
end
class Phone
class Candidate
include MongoMapper::Document
key :alias, String, :required => true
key :notes, String
many :phones
end
class Phone
-module (histogram).
-compile (export_all).
-author ("Mr. M.S. Esquire Jonathan Raymond Hicks").
% Where is this damn file on a mac?
% File = [ "a", "at", "red", "green", "dog"].
% This will need to come from the command line
% Input = "reader".
class Float
def divisible_by_2?
return self.value % 2 == 0
end
def divisible_by_3?
return self.value % 3 == 0
end
def divisible_by_6?
bundler_test $ cat Gemfile
source :gemcutter
gem 'thor', '0.12.3'
gem 'activerecord', '2.3.4'
group :db do
gem 'activerecord-oracle_enhanced-adapter', '1.2.1'
end
bundler_test $ bundle install --without=db
#/usr/bin/env ruby
# encoding: utf-8
module Foo
def hello
puts 'hi'
end
end
source :gemcutter
gem 'rails', :git => 'git://github.com/rails/rails.git'
git 'git://github.com/rails/arel.git'
git 'git://github.com/rails/rack.git'
gem 'inherited_resources'
group :db do
gem 'pg'
end
superclass mismatch for class PostgreSQLAdapter (TypeError)
.bundle/ruby/1.8/bundler/gems/rails-master/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:189
.bundle/ruby/1.8/bundler/gems/rails-master/activesupport/lib/active_support/dependencies.rb:209:in `require'
.bundle/ruby/1.8/bundler/gems/rails-master/activesupport/lib/active_support/dependencies.rb:209:in `require'
.bundle/ruby/1.8/bundler/gems/rails-master/activesupport/lib/active_support/dependencies.rb:197:in `load_dependency'
.bundle/ruby/1.8/bundler/gems/rails-master/activesupport/lib/active_support/dependencies.rb:209:in `require'
.bundle/ruby/1.8/bundler/gems/rails-master/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:74:in `establish_connection'
.bundle/ruby/1.8/bundler/gems/rails-master/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in `establish_connection'
.bundle/ruby/1.8/bundler/gems/rails-master/activerecord/lib/acti