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
http://nicerobot.github.com |
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
hdiutil create \ | |
-size 200G \ | |
-fs HFS+J \ | |
-volname "Time Machine" \ | |
${HOSTNAME%%.*}_$(/sbin/ifconfig en0 | grep ether | awk '{print $2}' | tr -d ':').sparsebundle |
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
mkdir -p ~/"Library/Application Support/TextMate/Bundles/" | |
cd ~/"Library/Application Support/TextMate/Bundles/" | |
git clone git://github.com/nicerobot/struxt.tmbundle "struxt.tmbundle" | |
osascript -e 'tell app "TextMate" to reload bundles' |
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
# curl -ks https://gist.github.com/nicerobot/1193218/raw/dock-orientation.sh | sh | |
defaults write com.apple.dock orientation left | |
defaults write com.apple.dock pinning end | |
defaults write com.apple.dock hide-mirror -bool true | |
killall Dock |
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
time echo "scale=5000; 4*a(1)" | bc -l -q |
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 | |
policy=${HOME}/.jstatd.all.policy | |
[ -r ${policy} ] || cat >${policy} <<'POLICY' | |
grant codebase "file:${java.home}/../lib/tools.jar" { | |
permission java.security.AllPermission; | |
}; | |
POLICY | |
jstatd -J-Djava.security.policy=${policy} & |
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
# look and feel | |
caption always "%{= bb}%{+b w}%h %=%{=b rw} %l %{= db} ${USER}@%H %{= dg}%c" | |
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" | |
# skip the startup message | |
startup_message off | |
# go to home dir | |
chdir |
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 | |
PROMPT_COMMAND='PS1X=$(perl -p -e "s|^${HOME}|~|;s|([^/])[^/]*/|$""1/|g" <<<${PWD})' | |
PS1='\j \u@\h:${PS1X} ' | |
# http://unix.stackexchange.com/a/26860/6128 |
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 | |
export PROMPT_COMMAND='PS1X=$(p="${PWD#${HOME}}"; [ "${PWD}" != "${p}" ] && printf "~";IFS=/; for q in ${p:1}; do printf /${q:0:1}; done; printf "${q:1}")' | |
export PS1='\j \u@\h:${PS1X} $ ' | |
# http://unix.stackexchange.com/a/26860/6128 |
OlderNewer