View url-parse.d.ts
declare module 'url-parse' {
interface Query {
[index: string]: string;
interface QueryParser {
(query: string): any;
interface ParsedUrl {
DIR=`dirname "${BASH_SOURCE[0]}"`
pushd "$DIR"
ssh-add -t 9h ./id_rsa
View callgrind_profiler.rb
require 'jruby/profiler'
require 'jruby/profiler/callgrind_printer'
module CallgrindProfiler
def callgrind
unless JRuby.runtime.instance_config.is_profiling?
STDERR.puts 'Profiling not enabled, re-run with `ruby --profile.api`'
View gist:ad266b8049d161b8cfbd
± gh |master ✓| → bundle --verbose
――― ERROR REPORT TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――
- What did you do?
- What did you expect to happen?
- What happened instead?
Error details
Java::JavaLang::RuntimeException: Could not generate DH keypair
View Gemfile
source ""
gem "activerecord", github: "rails"
gem "sqlite3"
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
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 ]
These two files should help you to import passwords from mac OS X keychains to 1password.
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
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 '*' * 80
puts "Hash with #{count} entries"
strings = (1..count).map(&:to_s)
View gist:671370
>> def foo; __method__; end
=> nil
>> foo
=> :foo
>> alias bar foo
=> nil
>> bar
=> :foo
>> method(:bar)
=> #<Method: Object#bar>