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
while true; do printf "%.0f\n" $(echo "`ps -eo pcpu | head -2 | tail -n +2` * 100" | bc) ; sleep .5; done | histo |
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 p (s, b, e, d) { | |
var c = null; | |
var i = 0; | |
var n = 0; | |
var r = []; | |
var x = 0; | |
var y = 0; | |
while (null != (c = s[i++])) { | |
// got first brace |
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/bash | |
# ps -eo pcpu,pid,user,args | sort -r -k1 | |
PS="ps" | |
VERSION="0.0.1" | |
version () { | |
echo $VERSION | |
} |
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 | |
PORT=5000 | |
## accept data from stdin | |
while read -r chunk; do | |
echo "$chunk" | umq push localhost $PORT | |
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
node_modules/ | |
resume.pdf | |
.DS_STORE |
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 beep () { | |
var b = 2; | |
var c = 10; | |
var foo = 'foo'; | |
var biz = foo; | |
var str = foo +' '+ biz; | |
var sum = b + c; | |
return [str, sum]; | |
} |
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
# redirect tcp to fifo | |
$ while true; do nc -l 6000 > fifo; done | |
# redirect fifo to cat and prefix with "> " | |
$ while true; do printf "> "; cat < fifo; done | |
> | |
# write to tcp | |
$ echo abc | nc localhost 6000 | |
$ echo 123 | nc localhost 6000 |
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
$ cc s-struct-initalization.c && ./a.out | |
foo 1 bar | |
biz 2 baz | |
beep 3 boop |
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
jwerle:~/repos/libhttp ☂ (modifications) master | |
× clib install hash | |
fetch : https://raw.github.com/clibs/hash/master/package.json | |
fetch : https://raw.github.com/clibs/hash/master/hash.c | |
save : ./deps/hash/hash.c | |
fetch : https://raw.github.com/clibs/hash/master/hash.h | |
error : unable to fetch https://raw.github.com/clibs/hash/master/hash.h | |
clib-install(72753,0x7fff7d37f310) malloc: *** error for object 0x7fa619501b20: pointer being freed was not allocated | |
*** set a breakpoint in malloc_error_break to debug |
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
<? $a = array(); ?> | |
// should yield `null' | |
"unset element in array" = <?= json_encode($a['foo']); ?> | |
// should yield nothing | |
"false" = <?= false; ?> | |
// should yield `1' | |
"true" = <?= true; ?> |