This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ABHelper | |
def choose_test(name, default_option, *options) | |
key = "#{name}_ab" | |
unless current_test = (params[key] || session[key] || cookies[key]) | |
current_test = options[rand(options.count)] | |
end | |
current_test = default_option unless options.include?(current_test) | |
session[key] = cookies.permanent[key] = current_test | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ = jQuery | |
$.fn.extend | |
nodoublesubmit: (options) -> | |
settings = | |
delay: 2000 | |
debug: false | |
settings = $.extend settings, options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hs(){ | |
heroku "$@" --remote staging | |
} | |
function hp(){ | |
heroku "$@" --remote production | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.location = 'http://www.google.com'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FullContact | |
class Client | |
module Person | |
# Returns extended information for a given person (email, phone, twitter or facebook) | |
# | |
def person(options={}) | |
if options.is_a?(String) | |
warn "[DEPRECATION] supplying an email address directly is deprecated. Please use {email: #{options}} instead." | |
options = {:email => options} | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="gallery"> | |
<img src="http://static.kickofflabs.com.s3.amazonaws.com/jo/harvest.png" alt="" data-caption="#caption_1" /> | |
<img src="http://static.kickofflabs.com.s3.amazonaws.com/jo/stayconnected.png" alt="" data-caption="#caption_2" /> | |
<span id="caption_1" class="orbit-caption">Create a beautiful looking site... </span> | |
<span id="caption_2" class="orbit-caption">Caption 2</span> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EmailQueue | |
include Sidekiq::Worker | |
def perform(options) | |
mailer = options['mailer'].constantize | |
method = options['method'] | |
args = options['args'] | |
mailer.send(method, *args).deliver | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery -> | |
$("form").submit (e) -> | |
e.preventDefault() | |
email = $("#email").val() | |
return if email.length == 0 | |
$.ajax | |
url: "https://api.kickofflabs.com/v1/1905/subscribe", | |
data: "email=#{email}", | |
dataType: 'jsonp', | |
jsonp: 'jsonp', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery -> | |
$("form").submit (e) -> | |
e.preventDefault() | |
email = $("#email").val() | |
return if email.length == 0 | |
$.ajax | |
url: "https://api.kickofflabs.com/v1/1905/subscribe", | |
data: "email=#{email}", | |
dataType: 'jsonp', | |
jsonp: 'jsonp', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"request":{"parameters":{"window":"h3","q":"kickofflabs"} | |
,"response_type":"json","resource":"search","url":"http://otter.topsy.com/search.json?q=kickofflabs&window=h3"} | |
,"response":{"window":"h3","page":1,"total":4,"perpage":10,"last_offset":4,"hidden":0,"list":[{"trackback_permalink":"","trackback_author_url":"http://twitter.com/russellbuckley","content":"MWC Unofficial Fringe Festival 2012 - Coming Soon! http://t.co/aR2LwZon","trackback_date":1326306392,"topsy_author_img":"http://a2.twimg.com/profile_images/1335736386/Twitter_normal.jpg","hits":1,"topsy_trackback_url":"http://topsy.com/trackback?url=http%3A%2F%2Fmobile-world-congress-fringe-festival.kickofflabs.com%2F%3Fs%3D3G79&utm_source=otter","firstpost_date":1326306392,"url":"http://mobile-world-congress-fringe-festival.kickofflabs.com/?s=3G79","trackback_author_nick":"russellbuckley","highlight":"MWC Unofficial Fringe Festival 2012 - Coming Soon! http://t.co/aR2LwZon ","topsy_author_url":"http://topsy.com/twitter/russellbuckley?utm_source=otter" |