Skip to content

Instantly share code, notes, and snippets.

@nzjames
nzjames / ga-helper.js
Last active December 16, 2015 20:29
Google Analytics tracking helper
/**
* Google Analytics tracking
*
* This helper sets up a delegate that responds to on click events for
* all elements that have a data-gcat (GA category)
* attribute and initializes a click or submit track event (submit for input[type=submit])
* and also sends the data-galabel label.
*
* Usage:
* 1. Add to the page footer
@nzjames
nzjames / vimpres.txt
Last active August 29, 2015 14:17
Vim Presentation
________ ++ ________
/VVVVVVVV\++++ /VVVVVVVV\
\VVVVVVVV/++++++\VVVVVVVV/
|VVVVVV|++++++++/VVVVV/'
|VVVVVV|++++++/VVVVV/'
+|VVVVVV|++++/VVVVV/'+
+++|VVVVVV|++/VVVVV/'+++++
+++++|VVVVVV|/VVV___++++++++++
+++|VVVVVVVVVV/##/ +_+_+_+_
+|VVVVVVVVV___ +/#_#,#_#,\
@nzjames
nzjames / preceptor.config.js
Last active August 29, 2015 14:18
preceptor webdriver config
module.exports = {
"configuration": {
verbose: true,
"reportManager": {
"reporter": [
{ "type": "Spec" },
{ "type": "List", "progress": false }
]
},
plugins: ['preceptor-webdriver'],
javascript:(function(){const x = [...document.querySelectorAll('[itemprop=embedURL]')]; const w = `300px`; const h= `90%`; const v = x.map(i=> { return i.content.split('/').pop(); }).join(','); const src = `https://www.youtube.com/embed/?playlist=${v}`; el = document.querySelector('body > *'); frame = document.createElement('iframe'); frame.frameBorder=0; frame.src=src; frame.style["z-index"]=1; frame.style.right="0px"; frame.style.bottom="0px"; frame.style.position="fixed"; frame.width=w; frame.height=h; el.parentNode.insertBefore(frame, el);})();
@nzjames
nzjames / meshgradient.css
Last active June 14, 2022 19:24
Green / grey gradient from CSS mesh gradients
/*
https://csshero.org/mesher/
*/
body {
background-color:hsla(0,0%,0%,1);
background-image:
radial-gradient(at 40% 1%, hsla(103,60%,69%,1) 0px, transparent 50%),
radial-gradient(at 80% 0%, hsla(102,22%,16%,1) 0px, transparent 50%),
radial-gradient(at 0% 50%, hsla(120,100%,88%,1) 0px, transparent 50%),
@nzjames
nzjames / no-login-fb.css
Created March 14, 2023 20:54
no login facebook
form:has([aria-label="Log in"]) {
display: none;
}
[data-nosnippet] {
display: none;
}