This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fade out | |
function fade(el) { | |
var op = 1; | |
var timer = setInterval(function () { | |
if (op <= 0.1){ | |
clearInterval(timer); | |
el.style.display = 'none'; | |
} | |
el.style.opacity = op; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-- Helpers ---------------------------------------------------------- | |
@function push-get-size($key) { | |
$sizes: map-get($push-config, sizes); | |
@return map-get($sizes, $key); | |
} | |
//-- Config ----------------------------------------------------------- | |
$push-spacing: util-rhythm(1); | |
$push-key-half: "-_5x"; // 0.5 | half | |
$push-key-double: "-2x"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"jshint": "latest", | |
"uglifyjs": "latest", | |
"watch": "latest" | |
}, | |
"config": { | |
"github_url": "https://api.github.com/repos/MarkBiesheuvel/markbiesheuvel.nl/commits?page=1&per_page=10", | |
"maps_url": "https://maps.googleapis.com/maps/api/staticmap?size=640x200&zoom=7&markers=color%3Ablue%7Clabel%3AH%7C51.469941%2C5.472258&markers=color%3Ayellow%7Clabel%3AW%7C51.574344%2C5.13781", | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (exports, DOM, undefined) { | |
'use strict'; | |
var namespace = 'ReactLayout'; | |
// Data Column = Column { size :: Integer, component :: ReactComponent } | |
//-- Constants ------------------------------------------------------ | |
var COLUMNS_TOTAL = 12, | |
CONTAINER = 'row-fluid', | |
CELL = 'span'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In chrome dev-console | |
[].splice | |
.call(document.styleSheets,0) | |
.map(function(x){ return x.href }) | |
// => [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// _config.scss | |
$z-layers: ( | |
bottomless-pit: -9999, | |
default: 1, | |
dropdown: 3000, | |
overlay: 4000 | |
modal: 4001 | |
); | |
// _functions.scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-- Polyfill --------------------------------------------------------- | |
if ( !String.prototype.contains ) { | |
String.prototype.contains = function() { | |
return String.prototype.indexOf.apply( this, arguments ) !== -1; | |
}; | |
} | |
//-- Module ----------------------------------------------------------- | |
(function(exports, document, undefined) { | |
var namespace = 'tools'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generates the text of asetniop.vim | |
singles = | |
a: "a" | |
s: "s" | |
e: "d" | |
t: "f" | |
n: "j" | |
i: "k" | |
o: "l" | |
p: ";" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+ thunkify :: (... -> IO ()) -> ... -> ... -> IO () | |
function thunkify(fn /*, ... */) { | |
args = [].slice.call(arguments, 1); | |
return function(/* ... */) { | |
fn.apply(this, args.concat([].slice.call(arguments, 0))); | |
}; | |
} |