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
// Usage: gradlew [-Dtest.type=all|unit|integration] test | |
test { | |
String testType = System.properties['test.type'] | |
if (testType == 'integration') { | |
include '**/*IntegrationTest.*' | |
include '**/*IntegrationSpec.*' | |
} else if (testType == 'unit') { | |
include '**/*Test.*' | |
include '**/*Spec.*' |
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
# Set expires header and Remove ETags | |
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$"> | |
Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT" | |
Header unset ETag | |
FileETag None | |
</FilesMatch> | |
# Set cache-control header | |
<FilesMatch "\.(ico|jpg|png|gif)(\.gz)?$"> | |
Header set Cache-Control "public" |
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
/* Default Important Label */ | |
treechildren::-moz-tree-cell(lc-FF0000) { | |
border-bottom: 1px solid #FF0000 !important; background-color: #FFCCCC !important; | |
} | |
treechildren::-moz-tree-cell-text(lc-FF0000) { | |
color: #000000 !important; | |
} | |
treechildren::-moz-tree-cell(lc-FF0000, selected) { | |
background-color: #FF0000 !important; | |
} |
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
/** | |
* 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), |
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
#!/usr/bin/ruby | |
$refname = ARGV[0] | |
$oldrev = ARGV[1] | |
$newrev = ARGV[2] | |
def tasks | |
puts 'Checking TODOs...' | |
todo_pattern = /^\s*\+\s*([\/\#]+|<\!\-\-)\s*(FIXME|TODO)\W*([\s\w]+)(\-\->)?$/ | |
# Find task-oriented comments added with this commit |
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
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile localGroovy() | |
compile gradleApi() | |
compile ('com.google.javascript:closure-compiler:v20151015') { | |
exclude module: 'junit' | |
} |
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 getViewportSize() { | |
var windowWidth = document.documentElement.clientWidth || document.body.clientWidth; | |
var windowHeight = document.documentElement.clientHeight || document.body.clientHeight; | |
return [windowWidth, windowHeight]; | |
} |
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
#!/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 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
Array.prototype.chain = function chain(delay) { | |
var tasks = this, pos = 0, delay = delay || 17; | |
setTimeout(function() { | |
tasks[pos++](); | |
if (pos < tasks.length) setTimeout(arguments.callee, delay); | |
}, delay); | |
return this; | |
}; | |
// Usage; |
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 $(id) { return document.getElementById(id); } | |
function $t(tag, con) { return (con || document).getElementsByTagName(tag); } | |
function $$(expr, con) { return (con || document).querySelectorAll(expr); } |