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
find src -type f -name '*.js' | xargs grep -c '/>' $1 | awk '!/:0/' | sed -r 's/\.js.+//g' | xargs -I file echo file.js file.jsx |
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
imgadm update | |
imgadm import fdea06b0-3f24-11e2-ac50-0b645575ce9d | |
imgadm list | grep fdea | |
vi setupfifo.json | |
vmadm create -f setupfifo.json | |
## In FiFo Zone ## | |
zlogin fifo |
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
# Quick hack of regular expressions to convert twitter bootstrap from LESS to Stylus | |
less2stylus = (string) -> | |
string = string | |
.replace(/^(\ *)(.+)\ +\{\ *\n?\ */mg, "$1$2\n$1 ") # remove opening brackets | |
.replace(/^(\ *)([^\ \n]+)\ +\{\ *\n?\ */mg, "$1$2\n$1 ") # remove opening brackets | |
.replace(/\ *\{\ *\n*/g, "\n") # remove opening brackets again (some random cases I'm too lazy to think through) | |
.replace(/\ *\}\ *\n*/g, "\n") # remove closing brackets | |
.replace(/\;\ *?$/gm, "") # remove semicolons | |
.replace(/@(\w+):(\ *)\ /g, (_, $1, $2) -> # replace @variable: with $variable = | |
"$#{$1}#{$2} = " |
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
static readonly string[] videoCardBlacklist = {"8086:0116"}; | |
static void DisableHwRenderingForCrapVideoCards() | |
{ | |
if (!String.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("MY_VIDEO_CARD_REALLY_WORKS"))) | |
{ | |
return; | |
} | |
int osVersion = Environment.OSVersion.Version.Major * 100 + Environment.OSVersion.Version.Minor; | |
if (osVersion < 601) |
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
# Send a metric to statsd from bash | |
# | |
# Useful for: | |
# deploy scripts (http://codeascraft.etsy.com/2010/12/08/track-every-release/) | |
# init scripts | |
# sending metrics via crontab one-liners | |
# sprinkling in existing bash scripts. | |
# | |
# netcat options: | |
# -w timeout If a connection and stdin are idle for more than timeout seconds, then the connection is silently closed. |