Skip to content

Instantly share code, notes, and snippets.

@dhenze
dhenze / gist:1957756
Created March 2, 2012 11:01
Output from rvm reinstall --trace ree on MacOSX Lion
[11:56:59] daniel:platform git:(master*) $ rvm reinstall --trace ree
--trace ree
rvm 1.10.3 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]
+__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
@dhenze
dhenze / bootstrap-typeahead.js
Created January 10, 2013 13:55
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 https://gist.github.com/1866577
/* =============================================================
* bootstrap-typeahead.js v2.2.2
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* 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
*
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
end
end
require "securerandom"
class OrderId
attr_reader :id
def initialize(id)
fail TypeError.new("String required") unless id.is_a?(String)
@id = id
end
require "time"
class Timestamp
attr_reader :time
private_class_method :new
def initialize(time)
fail TypeError.new("String required") unless time.is_a?(String)
@time = Time.parse(time)