Skip to content

Instantly share code, notes, and snippets.

View member_registered.rb
class MemberRegistered
attr_reader :id, :name, :email, :registered_at
def initialize(id, name, email, registered_at)
@id = id
@name = name
@email = email
@registered_at = registered_at
View timestamp.rb
require "time"
class Timestamp
attr_reader :time
private_class_method :new
def initialize(time)
fail"String required") unless time.is_a?(String)
@time = Time.parse(time)
View order_id.rb
require "securerandom"
class OrderId
attr_reader :id
def initialize(id)
fail"String required") unless id.is_a?(String)
@id = id
dhenze / bootstrap-typeahead.js
Created Jan 10, 2013
This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions. For example, process typeahead list asynchronously and return objects This is an adoption of gudburgurs gist to Version 2.2.2 of Bootstrap. See
View bootstrap-typeahead.js
/* =============================================================
* bootstrap-typeahead.js v2.2.2
* =============================================================
* Copyright 2012 Twitter, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
dhenze / gist:1957756
Created Mar 2, 2012
Output from rvm reinstall --trace ree on MacOSX Lion
View gist:1957756
[11:56:59] daniel:platform git:(master*) $ rvm reinstall --trace ree
--trace ree
rvm 1.10.3 by Wayne E. Seguin <>, Michal Papis <> []
+__rvm_parse_args:750> [[ -n 4.3.11 ]]
+__rvm_parse_args:782> [[ -z reinstall ]]
+__rvm_parse_args:784> [[ 0 -eq 1 || -n '' ]]
+__rvm_parse_args:20> [[ -n ree ]]
+__rvm_parse_args:22> rvm_token=ree