Grant Hutchins nertzy

View show-remote-branches.sh
1 2 3 4 5 6 7 8 9 10
origin/staging 22 hours ago Grant Hutchins and Rick Reilly
origin/restrict_to_reports 2 days ago Grant Hutchins and Rick Reilly
origin/master 3 days ago Grant Hutchins
origin/HEAD 3 days ago Grant Hutchins
staging/master 3 days ago Grant Hutchins
origin/provide_feedback_pagination 7 days ago Dave Goddard
origin/provide_feedback 8 days ago Dave Goddard and Paul Meskers
origin/provide_feedback_check_manager 8 days ago Dave Goddard
origin/reply_to_emails 8 days ago Dave Goddard and Paul Meskers
origin/experimental-js 2 weeks ago Brent Wheeldon and Nigel Pepper
View gist:5286543
1 2 3 4 5 6 7 8 9 10
diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb
index 553961b..e3f8d09 100644
--- a/config/initializers/simple_form.rb
+++ b/config/initializers/simple_form.rb
@@ -1,83 +1,126 @@
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
- # Components used by the form builder to generate a complete input. You can remove
- # any of them, change the order, or even add your own components to the stack.
- # config.components = [ :placeholder, :label_input, :hint, :error ]
View README
1 2 3 4 5 6 7 8 9 10
These two files should help you to import passwords from mac OS X keychains to 1password.
 
Assumptions:
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they
View hash_test.rb
1 2 3 4 5 6 7 8 9 10
require_relative "lib/active_support/core_ext/hash/keys"
require "benchmark"
 
[1, 10, 100, 1_000, 10_000, 100_000, 1_000_000].each do |count|
puts
puts '*' * 80
puts "Hash with #{count} entries"
puts
 
strings = (1..count).map(&:to_s)
View gist:671370
1 2 3 4 5 6 7 8 9 10
>> def foo; __method__; end
=> nil
>> foo
=> :foo
>> alias bar foo
=> nil
>> bar
=> :foo
>> method(:bar)
=> #<Method: Object#bar>
View case_statement_builder.rb
1 2 3 4 5 6 7 8 9 10
module CaseStatementBuilder
class << self
delegate :connection, :to => ActiveRecord::Base
 
def build(lhs, values_hash, default_value)
when_expressions = values_hash.sort.map do |rhs, value|
"WHEN #{lhs} = #{connection.quote(rhs)} THEN #{connection.quote(value)}"
end.join(" ")
 
"CASE #{when_expressions} ELSE #{connection.quote(default_value)} END"
View Gemfile
1
gem "texticle", :git => "http://github.com/tenderlove/texticle.git"
Something went wrong with that request. Please try again.