Skip to content

Instantly share code, notes, and snippets.

Simon Vreeman simonvreeman

Block or report user

Report or block simonvreeman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View AB Testing Script
function createCookie(name, value, days) {
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
var expires = '; expires=' + date.toGMTString();
else var expires = '';
document.cookie = name + '=' + value + expires + '; path=/';
View Bookmarklet: Hide GTM Debug
javascript:(function()%7Bfunction callback()%7B(function(%24)%7Bvar jQuery%3D%24%3B%24( "iframe" ).hide()%3B%24( "body div" ).last().css( "display"%2C "none" )%7D)(jQuery.noConflict(true))%7Dvar s%3Ddocument.createElement("script")%3Bs.src%3D""%3Bif(s.addEventListener)%7Bs.addEventListener("load"%2Ccallback%2Cfalse)%7Delse if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)()
simonvreeman / Google Analytics Content Experiments code for Google Tag Manager
Last active Mar 6, 2017
With this script you are good to go for client-site A/B/n testing with Content Experiments. Add ?var=1 to preview the variation of the A/B test.
View Google Analytics Content Experiments code for Google Tag Manager
<script src="//"></script>
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(;
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
var varID = getParameterByName('var');
if(! varID){ var chosenVariation = cxApi.chooseVariation(); }
View Hide element
.hidden {
display: none !important;
visibility: hidden;
View gist:e87c11d50581f6e17a34
*:after {
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale !important;
-webkit-font-smoothing: antialiased !important;
font-smoothing: antialiased !important;
-moz-font-feature-settings: 'kern';
-ms-font-feature-settings: 'kern';
-o-font-feature-settings: 'kern';
View gist:f9353ce0397715f05cc0
<li><a href="mailto:?body=" target="_blank"><i class="fa fa-fw fa-envelope"></i> Email</a></li>
<li><a href="" target="_blank"><i class="fa fa-fw fa-facebook"></i> Facebook</a></li>
<li><a href="" target="_blank"><i class="fa fa-fw fa-google-plus"></i> Google+</a></li>
<li><a href="" target="_blank"><i class="fa fa-fw fa-linkedin"></i> Linkedin</a></li>
<li><a href="" target="_blank"><i class="fa fa-fw fa-twitter"></i> Twitter</a></li>
<li><a href="whatsapp://send?text=" target="_blank"><i class="fa fa-fw fa-share-square-o"></i> Whatsapp</a></li>
simonvreeman / Caps Lock Day
Created Aug 25, 2014
For via GTM
View Caps Lock Day
simonvreeman / Comic Sans Dag
Created Aug 25, 2014
Voor via GTM
View Comic Sans Dag
*{font-family:Comic Sans,Comic Sans MS,Chalkboard,Marker Felt!important;}
simonvreeman / gist:46ee538e148c2f1af1a7
Created Jul 13, 2014
A bookmarklet to add a link to
View gist:46ee538e148c2f1af1a7
View jsperf-bookmarklet.js
var key = localStorage.wpt_key;
if (!key) {
var prompt = window.__proto__.prompt;
key = prompt('Your WebPagetest API key, please?');
if (!key) {
return gameOver();
localStorage.wpt_key = key;
You can’t perform that action at this time.