Skip to content

Instantly share code, notes, and snippets.

@haosu
haosu / -
Created April 11, 2014 00:21
Desktop
Documents
Downloads
Library
Movies
Music
Pictures
Projects
Public
@haosu
haosu / -
Created April 11, 2014 00:41
01 Essential Mix-SAT-01-19-2013.mp3
01-dixon_-_essential_mix-sat-09-14-2013-talion.mp3
01-richie_hawtin-live_at_watergate_(berlin)-sat-25-08-2012-1king.mp3
2011-02-11 21-10-38.m4a
Above & Beyond - Acoustic USA - The Greek Thearter - October 13th.mp3
BR Amsterdam Richie Hawtin.mp3
Carl Cox 45 min Boiler Room Ibiza Villa Takeovers mix.mp3
EPIC RADIO #008.mp3
Eric Prydz - Essential Mix - February 2013.mp3
INDIGO_FNFXVII.WAV
@haosu
haosu / -
Created April 11, 2014 00:43
thingy
01 Essential Mix-SAT-01-19-2013.mp3
01-dixon_-_essential_mix-sat-09-14-2013-talion.mp3
01-richie_hawtin-live_at_watergate_(berlin)-sat-25-08-2012-1king.mp3
2011-02-11 21-10-38.m4a
Above & Beyond - Acoustic USA - The Greek Thearter - October 13th.mp3
BR Amsterdam Richie Hawtin.mp3
Carl Cox 45 min Boiler Room Ibiza Villa Takeovers mix.mp3
EPIC RADIO #008.mp3
Eric Prydz - Essential Mix - February 2013.mp3
INDIGO_FNFXVII.WAV
Desktop
Documents
Downloads
Library
Movies
Music
Pictures
Projects
Public
thing.thing
@haosu
haosu / -
Created April 11, 2014 00:44
Desktop
Documents
Downloads
Library
Movies
Music
Pictures
Projects
Public
thing.thing
class Comment < ActiveRecord::Base
belongs_to :parent, polymorphic: true
has_many :comments, as: :parent
end
class Post < ActiveRecord::Base
has_many :comments, as: :parent
end
scope :untaken, lambda do |profile|
joins(<<-SQL).where('action_credits.id is null')
LEFT OUTER JOIN action_credits ON
actions.id = action_credits.action_id
AND action_credits.profile_id =
#{profile.id}
SQL
end
@haosu
haosu / gist:87726afcf643f2dfc8f3
Created May 23, 2014 21:18
Spurious failure?
Failures:
1) GoogleAnalytics for an Auto-AJAX pageload by a logged in user should create three pag
eview hits on the same tracker
Failure/Error: expect(footprint).to be_truthy
expected: truthy value
got: nil
# ./spec/features/google_analytics_spec.rb:144:in `block (4 levels) in <top (required
)>'
# ./spec/spec_helper.rb:73:in `block (2 levels) in <top (required)>'
[client postPath:kDTSalesforceOAuthToken
parameters:_clientInfo
success:^(id object) {
NSDictionary * dict = (NSDictionary *)object
}
failure:failure];