Skip to content

Instantly share code, notes, and snippets.

params = {}
params[:to] = "white@lists.lawrenceultimate.com"
params[:subject] = "xxx"
params[:from] = ""
@@params = params
if(@@params[:to].include?("blue@"))
to_email = get_emails_for_team("BLUE")
from_email = "Blue Team <blue@lawrenceultimate.com>"
2012-07-04T17:26:57+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/smoke_monster-0.2.2/lib/smoke_monster.rb:1:in `require'
2012-07-04T17:26:57+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/smoke_monster-0.2.2/lib/smoke_monster.rb:1:in `block in <top (required)>'
2012-07-04T17:26:57+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/smoke_monster-0.2.2/lib/smoke_monster.rb:1:in `<top (required)>'
**2012-07-04T17:26:57+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/smoke_monster-0.2.2/lib/smoke_monster/lazy_cover.rb:2:in `<module:SmokeMonster>': uninitialized constant SmokeMonster::Cover (NameError)**
2012-07-04T17:26:57+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/smoke_monster-0.2.2/lib/smoke_monster.rb:1:in `each'
2012-07-04T17:26:57+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/smoke_monster-0.2.2/lib/smoke_monster/lazy_cover.rb:1:in `<top (required)>'
2012-07-04T17:26:57+00:00 app[web.1]: from web.rb:9:in `require'
2012-07-04T17:26:57+00:00
// This goes on the signup page
$(document).ready(function () {
$.cookie('user_is_on_signup', "circle");
});
// This goes on every page
$(document).ready(function () {
$.cookie('user_is_on_signup', "square");
@calebcauthon
calebcauthon / gist:5129738
Created March 10, 2013 18:16
How do you get angular to work with async requests?
%h2 Registrations
.row{:"ng-controller" => "RegistrationsCtrl"}
.span6
%ul.players
%li{:"ng-repeat" => "person in registrations"}
{{person.name}}
.span6
.player-info
@calebcauthon
calebcauthon / gist:5312211
Last active December 15, 2015 19:29
Overriding the login view
This is the output from the console when I view the login page: (removed some of the path jargon)
Rendered /core/app/views/refinery/admin/_form_actions.html.erb (0.4ms)
Rendered /authentication/app/views/refinery/sessions/new.html.erb within refinery/layouts/login (6.7ms)
Rendered /core/app/views/refinery/_html_tag.html.erb (0.2ms)
Rendered /core/app/views/refinery/admin/_javascripts.html.erb (1.4ms)
Rendered /core/app/views/refinery/admin/_head.html.erb (4.3ms)
Rendered /core/app/views/refinery/_message.html.erb (0.1ms)
So I tried the commends:
rake refinery:override view=/refinery/sessions/new.html.erb
@calebcauthon
calebcauthon / include.rb
Created January 7, 2014 19:05
String include?
module StringStuff
def fly_the_spaceship
end
end
String.include StringStuff

Keybase proof

I hereby claim:

  • I am calebcauthon on github.
  • I am cmc (https://keybase.io/cmc) on keybase.
  • I have a public key whose fingerprint is 7C35 8126 A8E0 6A00 8922 25B7 3776 59B5 8E9E FC92

To claim this, I am signing this object:

-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v1.1.3
Comment: https://keybase.io/crypto
wcBMA8dyLdukkpVMAQgAtDfYWdxDsg1AvqyYMhyxAA7gm5MvF+8IaUjvJa5YMKgv
AU229IYkBoyOIiQ863blz31oXSEyOmQYvYjwUpLpJYJq2DU2igk6Z47jrM0N0lar
3OzgG5KSia2QX3X/s6qqFkL1xluutHGId5OZReBaks5RfnuGirJcsjQFvvCZm8uM
TB7uTz5MmsW1B+pLj+CXtQx9cdVDIStDTchhTGEeJia02ij7pWXngL7l6/9cqiZs
Xeo92P9pvXFWABbtmJfhbYJEHqGC+1IR9pIh2rTFSs3HEj80ZtVbaKO3J8SY0GH6
ghITOVRcYCZlQJasR+yQ9v4cKCps1RotV3oMEGFpgsHATAPHci3bpJKVTAEH/A+K
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v1.1.3
Comment: https://keybase.io/crypto
wcBMA8dyLdukkpVMAQf+OxEe3UuWQVs/EkTUw2aB2jXx/WOVAMpfpOsBTi+jvUaZ
IU08t/3llnNlGRdiCyXAzNDYa10RpqKEPeHmrlFczYMvotSn3HN9ye715k5UedBI
8cdV1bHlUsYbuWD0recSb73oEFLHFg/VlS1D0D3yAXx4eBPRfJqCbGa8cZ/nhtEc
1o7OHCSxRnEUNlmDraIofUOL1C5wC08GvoeLIgn4F9EVDU3Bv+cS7mdwngmCXoKX
qNu1/UTx7n4oX33M0AYKPFyyKA7fwZddfFCdXqLEg4Jm/g+dXSIm5mQq2yhYLE49
eQKiCrKuFc0/GPeFAm2PPWijywYBHUQ+gmKN+P8uk8HATAPHci3bpJKVTAEH/0jX
class NilClass
def coerce arg
if arg.class == Fixnum
[arg, 0]
end
end
def - arg
0 - arg
end