This file contains 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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Attach with sourcemaps", | |
"type": "chrome", | |
"request": "attach", | |
"port": 9222, | |
"sourceMaps": true, | |
"webRoot": "${workspaceRoot}" |
This file contains 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 Locomotive | |
module Liquid | |
module Drops | |
class ContentEntry < Base | |
delegate :_slug, :_permalink, :_translated, :seo_title, :meta_keywords, :meta_description, to: :@_source | |
def _id | |
@_source._id.to_s | |
end |
This file contains 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(){ | |
function getURLParameter(name) { | |
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null; | |
} | |
$.each(["utm_source","utm_medium","utm_campaign","utm_term",'source_type','source','position_type','position','added','creative','matchtype'],function(i,v){ | |
$('<input type="hidden" />').attr({ | |
name: "content["+v+"]", | |
value: getURLParameter(v) | |
}).appendTo("form") |
This file contains 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 Fixnum | |
def digit_count | |
(self == 0) ? 1 : Math.log10(self).to_i + 1 | |
end | |
end | |
def make_square n | |
height = Math.sqrt(n) | |
throw "Input incorrect" unless height == height.to_i | |
x = ((height - 1) / 2).floor |
NewerOlder