This file contains hidden or 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
/** | |
* Vertical centering with Flexbox + margin fallback | |
* Lea Verou & David Storey | |
*/ | |
html, body { height: 100%; } | |
body { | |
width: 100%; /* needed for FF */ | |
margin: 0; |
This file contains hidden or 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
/** | |
* Make a X-Domain request to url and callback. | |
* | |
* @param url {String} | |
* @param method {String} HTTP verb ('GET', 'POST', 'DELETE', etc.) | |
* @param data {String} request body | |
* @param callback {Function} to callback on completion | |
* @param errback {Function} to callback on error | |
*/ | |
function xdr(url, method, data, callback, errback) { |
This file contains hidden or 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
.grid { | |
width: 100%; | |
height: 100%; | |
background-color: white; | |
background: radial-gradient(circle, transparent 20%, white 20%, white 80%, transparent 80%, transparent), | |
radial-gradient(circle, transparent 20%, white 20%, white 80%, transparent 80%, transparent) 0 0, | |
linear-gradient(#ddd 1px, transparent 1px) 0 -0.5px, | |
linear-gradient(0, #ddd 1px, transparent 1px) -0.5px 0; | |
background-size: 20px 20px, 40px 20px, 10px 10px, 10px 10px; | |
} |
This file contains hidden or 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
#!/bin/sh | |
for i in "lifehacker.com" "facebook.com" "manu-j.com" "reddit.com" "tb4.fr" "bbc.co.uk" "eriwen.com" | |
do | |
for j in "4.2.2.2" "8.8.8.8" "68.87.85.98" "68.87.69.146" | |
do | |
echo $j $i `dig @$j $i | grep Query | awk -F ":" '{print $2}'` | |
done | |
done |
This file contains hidden or 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
ftp -n -v $HOST << EOT | |
ascii | |
user $USER $PASSWD | |
prompt | |
cd / | |
put $LOCAL_SOURCE $TARGET_FILE | |
bye | |
EOT | |
sleep 1 |
This file contains hidden or 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
Xvfb :2 & | |
/usr/bin/env DISPLAY=:2 java -jar test/lib/JsTestDriver-1.3.3d.jar --config test/jsTestDriver.conf --port 4224 --browser /Applications/Firefox.app/Contents/MacOS/firefox --tests all --testOutput target --runnerMode INFO |
This file contains hidden or 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
/* | |
* Normalize.css converted to Stylus | |
* http://github.com/necolas/normalize.css | |
*/ | |
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section | |
display: block | |
audio, canvas, video | |
display: inline-block |
This file contains hidden or 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 module, moduleStart, testStart, testCases = [], | |
current_test_assertions = []; | |
console.log('<?xml version="1.0" encoding="UTF-8"?>'); | |
console.log('<testsuites name="testsuites">'); | |
QUnit.begin = function() { | |
// That does not work when invoked in PhantomJS | |
} | |
QUnit.moduleStart = function(context) { | |
moduleStart = new Date(); |
This file contains hidden or 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
Object.toType = (function toType(global) { | |
return function(obj) { | |
if (obj === global) { | |
return "global"; | |
} | |
return ({}).toString.call(obj).match(/\s([a-z|A-Z]+)/)[1].toLowerCase(); | |
} | |
})(this); |
This file contains hidden or 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
/** | |
* Given a source directory and a target filename, return the relative | |
* file path from source to target. | |
* @param source {String} directory path to start from for traversal | |
* @param target {String} directory path and filename to seek from source | |
* @return Relative path (e.g. "../../style.css") as {String} | |
*/ | |
function getRelativePath(source, target) { | |
var sep = (source.indexOf("/") !== -1) ? "/" : "\\", | |
targetArr = target.split(sep), |