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
$ brew --config | |
HOMEBREW_VERSION: 0.9 | |
HEAD: c2a04d3b18daa497cd0d6f25163ea118a151f8b3 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: 8-core 64-bit sandybridge | |
OS X: 10.7.4 | |
Kernel Architecture: x86_64 | |
Xcode: 4.3.3 | |
GCC-4.0: N/A |
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
<!-- ... --> | |
<td> | |
<p class="option-text">Blah blah blah</p> | |
</td> | |
<!-- ... --> |
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
class Regexen | |
def initialize(a={}) | |
a.default_proc = proc { |h,k| [] } | |
@good = a[:good] | |
@bad = a[:bad] | |
end | |
def good=(r) | |
@good << r | |
end | |
def bad=(r) |
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
# ... | |
runas () | |
{ | |
usr=$1; | |
shift; | |
sudo -u $usr /path/to/with_env.sh $@ | |
} | |
# ... |
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
$ python | |
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) | |
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> x = 42 | |
>>> l = [1,2,3,4,5] | |
>>> [x*x for x in l] | |
[1, 4, 9, 16, 25] | |
>>> x | |
5 |
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
syntactic atoms : vocabulary | |
language features and larger syntatctic constructs : grammar | |
idioms, patterns : idioms | |
3rd-party code : literature | |
source-code repositories : corpora |
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
pypkg () { | |
local pkgpath="$(echo $1 | sed 's:\.: :g')" | |
local fspath="." | |
for el in $pkgpath; do | |
fspath="${fspath}/${el}" | |
(mkdir "$fspath" && touch "${fspath}/__init__.py") &>/dev/null | |
done | |
} |
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
copy_key () { | |
local remote_server=$1 | |
[[ -z "$1" ]] && echo "Must provide a server." 2>&1 && return 1 | |
cd "$HOME" | |
cat .ssh/id_rsa.pub | ssh $remote_server "mkdir -p .ssh && cat - >>.ssh/authorized_keys2" | |
} |
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
# Put the following function definition into a file called ~/.pythonrc | |
# and add the line | |
# export PYTHONSTARTUP="$HOME/.pythonrc" | |
# to your .bash{rc,_profile} | |
import os | |
def clip(x): | |
os.popen('pbcopy','w').write(str(x)) |
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
# ... | |
mdcd () { | |
mkdir -p $1 && cd $1 | |
} | |
# ... |
OlderNewer