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
// Load this after the document has loaded. | |
$(function () { | |
// Bind a click handler to the element. | |
// Note this element needs to exist in both | |
// mobile and tablet views, with the same ID. | |
$("#lp-pom-image-114").click(function (){ | |
// Extract the absolute pixel location of the top of the element | |
// that you want to scroll to. |
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
Dir["db/cms_fixtures/safegas/pages/**/*"].map{|d| d if File.directory?(d) && !Dir[d+"/*"].map{|f| File.basename(f)}.include?("title.html")} |
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
require 'open-uri' | |
r = Random.new(Time.now.to_i) | |
exit if r.rand < 0.90 | |
url = "https://gist.github.com/originalpete/5715627/raw/sayings.txt" | |
sayings = open(url).read | |
text = sayings.split("\n").sort_by{r.rand}.first | |
`say "#{text}"` |
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(document).ready(function() { | |
$('.update-done :checkbox').on('change', function () { | |
var checkbox = $(this); | |
var form = checkbox.parent('form'); | |
$.ajax(form.attr('action'), {type: 'PUT', data: form.serialize()}); | |
}); | |
}); |
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
{"nodes":[{"name":"aboutads.info","group":1},{"name":"addthis.com","group":2},{"name":"admeld.com","group":2},{"name":"adnxs.com","group":2},{"name":"adtech.de","group":2},{"name":"answers.com","group":1},{"name":"baronsoffers.com","group":1},{"name":"blogspot.co.uk","group":1},{"name":"blogspot.com","group":1},{"name":"criteo.com","group":1},{"name":"dailymail.co.uk","group":1},{"name":"digitalspy.co.uk","group":1},{"name":"doubleclick.net","group":2},{"name":"facebook.com","group":2},{"name":"foxnews.com","group":1},{"name":"google.com","group":2},{"name":"guardian.co.uk","group":1},{"name":"imrworldwide.com","group":2},{"name":"mookie1.com","group":2},{"name":"msn.com","group":1},{"name":"news.com.au","group":1},{"name":"pubmatic.com","group":2},{"name":"quality-channel.de","group":1},{"name":"quantserve.com","group":2},{"name":"reuters.com","group":1},{"name":"rubiconproject.com","group":1},{"name":"scorecardresearch.com","group":2},{"name":"smh.com.au","group":1},{"name":"spiegel.de","group":1},{"name":" |