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
autocmd BufWritePre * :%s/\s\+$//e |
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
{% block header %} | |
<h1>{{ title }}</h1> | |
<p>A {{ environments|join(' & ') }} Template Engine</p> | |
{% endblock %} |
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
// Verify an email address | |
// Usage: node verifyemail.js [email protected] | |
var exec = require('child_process').exec, | |
net = require('net'), | |
email = process.argv.splice(2)[0], | |
domain = email.split('@')[1]; | |
function verify(mxrecord) { | |
console.log('connecting to', mxrecord, '...'); |
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
@mq-phone: ~'(max-width: 767px)'; | |
@mq-tablet: ~'(min-width: 768px) and (max-width: 979px)'; | |
@mq-desktop: ~'(min-width: 980px)'; | |
@mq-dpi-2: ~'(-webkit-min-device-pixel-ratio: 2)'; | |
@media @mq-phone { | |
// styles for phone | |
} | |
@media @mq-tablet { |
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/bash | |
# This is the current stable release to default to, with Omnibus patch level (e.g. 10.12.0-1) | |
# Note that the chef-full template downloads 'x.y.z' not 'x.y.z-r' which should be a duplicate of the latest -r | |
release_version="10.12.0-1" | |
use_shell=0 | |
# Check whether a command exists - returns 0 if it does, 1 if it does not | |
exists() { | |
if command -v $1 &>/dev/null |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Sprite Animation Tester</title> | |
<style type="text/css"> | |
* { |
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
// 1: how could you rewrite the following to make it shorter? | |
if (foo) { | |
bar.doSomething(el); | |
} else { | |
bar.doSomethingElse(el); | |
} | |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>table + line-height</title> | |
<style type="text/css"> | |
* { | |
box-sizing: border-box; |
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
if (document.hasOwnProperty('createTouch')) { | |
try { | |
var ignore = /:hover/; | |
Array.prototype.slice.call(document.styleSheets).forEach(function (sheet) { | |
Array.prototype.slice.call(sheet.cssRules).forEach(function (rule) { | |
if (rule.type === CSSRule.STYLE_RULE && ignore.test(rule.selectorText)) { | |
sheet.deleteRule(j); | |
} | |
}); | |
}); |
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
#!/usr/bin/env node | |
var child_process = require('child_process'), | |
users = {}, | |
c = 0, | |
modes = ['100644', '100664', '100755']; | |
function blameFile(file, i) { | |
setTimeout(function () { | |
child_process.exec('git blame ' + file, function (error, stdout, stderr) { |