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
<script> | |
// build the interface | |
const rowIds = []; | |
const $body = document.getElementsByTagName("body")[0]; | |
$body.addEventListener("click", e => { | |
// event handler on body - need to check if the orginal target of the | |
// bubbled event has a value, i.e. is a checkbox | |
const val = e.target.value; |
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
"use strict"; | |
process.env['PATH'] = process.env['PATH'] + ':' + process.env['LAMBDA_TASK_ROOT']; | |
var handler = function(event, context, callback){ | |
const query = event.queryStringParameters || {}; | |
const eventParams = event.body ? JSON.parse(event.body) : {}; | |
var data = { | |
results: [1,2,3], |
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
export $DIR ... | |
export $DOMAINS ... | |
mkdir -p $DIR && ./root/certbot/certbot-auto certonly --server https://acme-v01.api.letsencrypt.org/directory -a webroot --webroot-path=$DIR --agree-dev-preview $DOMAINS |
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
// ------------------------------------------------------------------------------------------------- | |
// init widgets | |
/** | |
* DOM-based routing module for page initialisation. | |
* @module initWidgets | |
* @author [email protected] | |
* | |
*/ | |
function initWidgets(scope, trycatch) { |
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
googletag.pubads().addEventListener("slotRenderEnded", function(event) { | |
//console.log("googletag slotRenderEnded", event.slot.b.f); | |
var containerId = ""; | |
// WARN: Fragile access of private object within DFP Slot Object returned with the event | |
// It's the only way to get access to the id of the DOM element attached to the slot | |
// FIXME: Ideally we need to contact Google and request a public API method to return the id | |
if (typeof event.slot !== "undefined") { | |
if (typeof event.slot.b !== "undefined") { |
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
ga(function() { | |
var trackers = ga.getAll(), ret = []; | |
for (var i=0; i<trackers.length; ++i) { | |
var tracker = trackers[i]; | |
ret.push(tracker.get('trackingId')); | |
} | |
console.log(ret); | |
}); |
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
/*global define, window */ | |
define(['jquery'], function ($) { | |
'use strict'; | |
var GU = window.GU || {}; | |
GU.UTIL = GU.UTIL || {}; | |
/* Element factory. | |
* @param {string} el The name of a DOM element |
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
// Avoid `console` errors in browsers that lack a console. | |
(function() { | |
var method; | |
var noop = function () {}; | |
var methods = [ | |
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', | |
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', | |
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', | |
'timeStamp', 'trace', 'warn' | |
]; |
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
<g:plusone annotation="inline"></g:plusone> | |
<script type="text/javascript"> | |
(function() { | |
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; | |
po.src = 'http://apis.google.com/js/plusone.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); | |
})(); | |
</script> |
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
<script type="text/javascript"> | |
(function(){ | |
var bsa = document.createElement('script'); | |
bsa.type = 'text/javascript'; | |
bsa.async = true; | |
bsa.src = '//s3.buysellads.com/ac/bsa.js'; | |
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa); | |
})(); | |
</script> |
NewerOlder