Skip to content

Instantly share code, notes, and snippets.

andydavies / index.html
Created Nov 25, 2020 — forked from 3urdoch/index.html
TCF2.0 Compliant approach to loading Google Ad Manager, Prebid and Amazon APS tags that prevents TCV2.1a errors
View index.html
<!doctype html>
<html lang="en">
<!-- Quantcast CMP, pasted un-modified from Quantcast interface -->
<script type="text/javascript" async=true>
(function() {
var host = window.location.hostname;
andydavies / keyworksFromUrl.js
Created Jul 27, 2020 — forked from johnmurch/keywordsFromUrl.js
Parse keywords from URL
View keyworksFromUrl.js
let url = "";
let kwparse = (url.replace('https://','').replace('http://','').replace('www','').replace('com','').split('-').join().split('/').join().split('.')).join(',').replace(/^,/, '')
let kwuniq = [ Set(kwparse.split(','))].filter(function(e){return e});
View geo.vcl
sub vcl_recv {
#FASTLY recv
# We don't do other methods
if (req.method != "GET") {
# Handle IPv4 or IPv6 provided in url path (nothing extraneous allowed, perform basic matching)
if (req.url.path ~ "^/([a-f0-9:.]+)$") {
set client.geo.ip_override =;
andydavies / 0_reuse_code.js
Created Jun 18, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.