Skip to content

Instantly share code, notes, and snippets.

correlator = ->
Math.floor (Math.random() * 10000000000000000)
module.exports = new class DFP
request: ({id, size, targets}, callback) =>
counter = counter + 1
data =
# These field names and values have been determined by reverse engineering
# requests made from Google's official GPT library. (The GPT library
# cannot be used directly because it places all ad units in iframes.)
@stuartphilp
stuartphilp / gist:10415968
Created April 10, 2014 19:42
VAST Sample Creative
{
"thumb": {
"caption": "Family Vacation Photo",
"sourceHeight": 1206,
"href": "/image/v1.0.0/bin/51e0778cd91accb66644e2b0?v=5c072",
"sourceWidth": 1800,
"credits": null
},
"primaryMedia": {
"content": {
@stuartphilp
stuartphilp / split.py
Last active February 15, 2017 14:58 — forked from AutomatedTester/split.py
# pip install pypdf2
# Based on the initial splitter script by David Burns
# https://gist.github.com/AutomatedTester/e279d3cbbde4f0de9f11
########
# USAGE:
########
# You will need to enter your email creds so you can receive the bonus statements
# which you can then review, edit, and forward (sending directly could be dangerous)
#
#!/bin/bash
which aws
if [ $? = 0 ]; then
echo "AWS CLI Found. Continuing..."
else
echo "You need to install the AWS CLI binary before running this script, and do an aws configure to set up credentials/regions."
pip install awscli
fi
VAGRANT_BOX=services-qa-jenkins-slave-ubuntu-desktop
import simplejson as json
import requests
overview = requests.get('https://webqa-ci.mozilla.com/api/json')
overview_json = json.loads(overview.text)
for job in overview_json["jobs"]:
if job["color"] == "red":
@stuartphilp
stuartphilp / userscript.js
Last active February 27, 2018 16:29
Fixed Position Bugzilla Bug Titles
// ==UserScript==
// @name ScrollingBugTitlez
// @description Pins the bug title header and other useful context so it's always visible when scrolling longer bugs
// @include https://bugzilla.mozilla.org/show_bug.cgi?id=*
// @author Stuart Philp
// ==/UserScript==
/*
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/