I hereby claim:
- I am davidbalbert on github.
- I am davidbalbert (https://keybase.io/davidbalbert) on keybase.
- I have a public key whose fingerprint is C59D 970A 2A49 D78B ACE7 6722 F447 4DD8 FC80 DAB5
To claim this, I am signing this object:
module CreatedAt | |
module ClassMixin | |
def new(*) | |
obj = super | |
obj.instance_variable_set(:@_created_at, Time.now) | |
obj | |
end | |
end |
require 'singleton' | |
class NothingClass | |
include Singleton | |
def bind | |
self | |
end | |
def map |
/* | |
* Idiomatic-ish JavaScript. Constructor functions use the `new` | |
* keyword, but we don't use prototype objects. | |
*/ | |
function Empty () { | |
this.isEmpty = true; | |
this.contains = function (i) { return false; }; | |
this.insert = function (i) { return new Insert(this, i); }; | |
this.union = function (s) { return s; }; |
class Array | |
def to_my_h | |
MyHash[self] | |
end | |
end | |
class Hash | |
def to_my_h | |
to_a.to_my_h | |
end |
I hereby claim:
To claim this, I am signing this object:
(def hmm-state (atom {:value "Hmm..."})) | |
(defn hmm [state owner] | |
(reify | |
om/IRender | |
(render [_] | |
(om.dom/textarea #js {:value (:value state) | |
:onChange (fn [e] (.log js/console (.. e -target -value)))})))) | |
(om/root |
slashes = ["|", "/", "-", "\\"] | |
slashes.cycle do |s| | |
system "clear" | |
puts ":#{s}" | |
sleep 0.3 | |
end |
# This will be pasted into the REPL | |
require 'csv' | |
# these were extracted from the first line of the CSV | |
GoogleGroupContact = Struct.new(:email_address, :nickname, :group_status, :email_status, :email_preference, :posting_permissions, :join_year, :join_month, :join_day, :join_hour, :join_minute, :join_second, :time_zone) | |
class InteractiveContactFinder | |
def self.find_all(contacts) | |
@@done = false |
# Returns the number of user+thread combinations with more than one visited | |
# status, this should be greater than zero before the fix and zero after the | |
# fix. | |
VisitedStatus.group([:user_id, :thread_id]).having("COUNT(*) > 1").count.size | |
# The number of user+thread combinations with at least one visited status. This | |
# number should remain the same before and after the fix. | |
VisitedStatus.group([:user_id, :thread_id]).count.size | |
# The fix: Group all visited statuses by user+thread, select the visited statuses. |
Aardvark | |
Abyssinian | |
Accelerator | |
Accordion | |
Account | |
Accountant | |
Acknowledgment | |
Acoustic | |
Acrylic | |
Act |