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
└─┬ ember-cli@2.4.3 | |
├─┬ amd-name-resolver@0.0.5 | |
│ └── ensure-posix-path@1.0.1 | |
├── bower@1.7.9 | |
├─┬ bower-config@1.3.1 | |
│ ├── graceful-fs@4.1.3 | |
│ ├── mout@1.0.0 | |
│ ├─┬ optimist@0.6.1 | |
│ │ ├── minimist@0.0.10 | |
│ │ └── wordwrap@0.0.3 |
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 | |
UPROOT=$HOME/src | |
NOUP=$UPROOT/noup # ban list | |
pushd () { | |
command pushd "$@" >/dev/null | |
} | |
popd () { |
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 | |
cmd() { | |
echo '==>' "$@" | |
eval "$@" | |
} | |
src() { | |
pushd ~/src > /dev/null | |
./up |
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
/* | |
"strings" that works on (nearly?) all files. | |
$ man strings | |
Automatically exclude strings that start with '_', '@', or are all whitespace. | |
DO NOT look in specific sections of the file for strings. | |
1) That's where we get in trouble trying to run strings on a dylib. | |
2) That's more work. | |
Call: |
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
/* | |
Example usage: | |
cat /usr/share/dict/words | tr -cd '[:alpha:]\n' | tr '[:lower:]' '[:upper:]' | | |
sortline | sort | uniq -c | awk '$1 > 1' | |
Compile & install: | |
cc -O3 -o sortline sortline.c && install -p sortline ~/bin | |
---------------------------------------------------------------- |
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
#include <stdio.h> | |
#include <string.h> | |
/* z is format specifier for size_t, the return type of sizeof */ | |
#define SIZEFMT "\t%zu\t%s\n" | |
/* sizeof gives the memory compiler allocates for x. | |
# is the stringify operator in the C preprocessor. | |
for example, #token -> "token". */ | |
#define printsize(x) printf(SIZEFMT, sizeof(x), #x) |
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 iterOrderedKeys(t, compare) | |
local keys = {} | |
for k in pairs(t) do | |
keys[#keys+1] = k | |
end | |
table.sort(keys, compare) | |
local i = 1 | |
return function () | |
local k = keys[i] | |
local v = t[k] |