Skip to content

Instantly share code, notes, and snippets.

View iamnewton's full-sized avatar
🏠
Working from home

Newton iamnewton

🏠
Working from home
View GitHub Profile
@iamnewton
iamnewton / spoiler-filter.css
Created March 12, 2015 01:04
Spoiler filter
.spoiler {
filter: blur(20px);
transition-property: -webkit-filter;
transition-duration: .4s;
}
.spoiler:hover, .spoiler:focus {
filter: blur(0px);
}
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@iamnewton
iamnewton / README.md
Created May 28, 2015 05:45
All elements in the flow of the document that proceed other elements must receive a top margin of one line.
@iamnewton
iamnewton / bling.js
Last active August 29, 2015 14:23 — forked from paulirish/bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document)
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn)
}
NodeList.prototype.__proto__ = Array.prototype
@iamnewton
iamnewton / README.md
Created July 21, 2015 01:32
Cross-Browser Text Masks with Blend Modes

For effective clipping effects, a font that has bold lettering and thick strokes tends to work best.

Source

@iamnewton
iamnewton / rubi.js
Last active August 29, 2015 14:27 — forked from kmoe/highfive.js
module.exports = function rubi( hook ) {
// hook.io has a range of node modules available - see
// https://hook.io/modules.
// We use request (https://www.npmjs.com/package/request) for an easy way to
// make the HTTP request.
var request = require( 'request' );
// The parameters passed in via the slash command POST request.
var params = hook.params;
@iamnewton
iamnewton / entertainment.keg
Last active September 6, 2015 22:34
A keg file for mass installation of entertainment Homebrew casks via kegger (https://github.com/chrisopedia/kegger)
sonos
@iamnewton
iamnewton / gamer.keg
Last active September 6, 2015 22:34
A keg file for mass installation of gamer-related Homebrew casks via kegger (https://github.com/chrisopedia/kegger)
openemu
@iamnewton
iamnewton / .htaccess
Created January 12, 2014 22:26
Serving web fonts via CDN from David Walsh
# Apache config
<FilesMatch ".(eot|ttf|otf|woff)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
@iamnewton
iamnewton / deferred.js
Created January 13, 2014 02:05
Google's recommended way to defer a script. Just insert the path to the file and place at the bottom of the page just before the <body>.
var createScript = function() {
var script = document.createElement( "script" );
script.src = "path/to/file.js";
document.body.appendChild( script );
};
if ( window.addEventListener ) {
window.addEventListener( "load", createScript, false );
} else {
if ( window.attachEvent ) {
window.attachEvent( "onload", createScript );