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
process.stdout.on('error', function( err ) { | |
if (err.code == "EPIPE") { | |
process.exit(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
>>> original_list = ['awesome', 'stupid', 'jim', 'rich', 'magnus'] | |
>>> [ x + 'sauce' for x in original_list] | |
['awesomesauce', 'stupidsauce', 'jimsauce', 'richsauce', 'magnussauce'] |
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
function render { | |
cat << END_RENDER | |
#begin the "real" content | |
blah $FOO | |
foo $BAR | |
smack $HEAD | |
for $USER | |
#end the "real" content |
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
:: assumes MinGW exists on system so echo and sed are available | |
:: TODO: perhaps attempt to rework with magic variable expansion built-in to the Windows shell | |
:: this format is for file-based execution | |
:: if you are attempting to run this on the command line, %%i should be %i instead (thanks Microsoft :/) | |
FOR /F "tokens=*" %%i in ('echo %WORKSPACE%^| sed -e ''s/\\/\//g''') do SET MinGW_JENKINS_WORKSPACE=%%i |
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
use strict; | |
use warnings; | |
my $fname = shift or die 'filename!'; | |
open my $fh, $fname or die "Could not open $fname: $!"; | |
print "<testsuite>\n"; | |
foreach(grep /^ *(IGNORE_)?TEST/, <$fh>) { | |
my ($status, $group, $test, $detail); |
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
#include "unity_fixture.h" | |
int PrimeFactors(int number, int* primes, int primes_size) | |
{ | |
int count = 0; | |
int candidate = 0; | |
for (candidate = 2; number > 1; candidate++) | |
for (; number % candidate == 0; number /= candidate) | |
primes[count++] = candidate; |
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
watch( 'test/.*\.clj' ) {|md| test_stuff } | |
watch( 'src/.*\.clj' ) {|md| test_stuff } | |
def colorize(text, color_code) | |
"#{color_code}#{text}\e[1;37m" | |
end | |
def red(text); colorize(text, "\e[0;31m"); end | |
def green(text); colorize(text, "\e[0;32m"); end |
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 you're on a mac/linux, you can just copy and paste this. If you're on Windows, you need to figure out how to do this using Putty. | |
ssh [email protected] -p9876 | |
#Password: pairingftw | |
tmux -S /var/tmux/pairing attach |
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
hg --config extensions.purge= clean --all |
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
for i in $(find . -name '*TestMain.cpp' -exec dirname {} \; | sort | uniq); do | |
echo "$(find $i -type f -depth 1 -maxdepth 1 | wc -l) $i"; | |
done | sort -n | head |