- BeterTouchTools
- Google Chrome
- Google日本語入力
- Dropbox
- Firefox
- Evernote
- Skype
- XCode, XCode Command Line Tools
- Homebrew
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 | |
function cd() { | |
if [ -e "$1" -a ! -d "$1" ]; then | |
builtin cd "`dirname "$1"`" | |
else | |
builtin cd "$@" | |
fi | |
} |
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 | |
files=(.[^.]* *) | |
echo ${files[$RANDOM%${#files[@]}]} |
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 | |
user="[email protected]" | |
pass="yourpassword" | |
to="[email protected]" | |
( sleep 1 | |
echo "EHLO `hostname`" | |
sleep 1 | |
echo "AUTH PLAIN $(echo -en "$user\0$user\0$pass" | base64)" | |
sleep 1 |
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
Please be patient. | |
{ http_parser: '1.0', | |
node: '0.8.14', | |
v8: '3.11.10.25', | |
ares: '1.7.5-DEV', | |
uv: '0.8', | |
zlib: '1.2.3', | |
openssl: '1.0.0f' } | |
Scores: (bigger is better) |
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/awk -f | |
BEGIN { | |
_sep = sep ? sep : " " | |
} | |
{ | |
split($0, cols) | |
for(i=1; i<=length(cols); i++) { | |
col_size[i] = max(col_size[i], length(cols[i])) | |
} |
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
GET / HTTP/1.0 | |
HTTP/1.0 200 OK | |
Connection: Close | |
Pragma: no-cache | |
cache-control: no-cache | |
Refresh: 0.1 | |
Content-Type: text/html; charset=iso-8859-1 | |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd"> | |
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
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 | |
function echo_color() { | |
local colors=(black red green yellow blue magenta cyan white brightblack brightred brightgreen brightyellow brightblue brightmagenta brightcyan brightwhite) | |
local fg="\e[38;5;" bg="\e[48;5;" rs="\e[0m" | |
local color=$1; shift | |
local n=$(printf %3d $color) n2="" | |
if [[ -n ${colors[$color]} ]]; then | |
n2=" $(printf %-13s ${colors[$color]})" | |
fi | |
for arg in "$@";do |
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
# save /etc/profile.d/seal-crontab-r.sh or append to ~/.bashrc | |
# crontab -r を封印する | |
function crontab() { | |
local opt | |
for opt in "$@"; do | |
if [[ "$opt" == "-r" ]]; then | |
echo '-r is sealed!' | |
return 1 | |
fi |
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 | |
ec2-describe-regions | | |
while read dummy region dummy; do | |
for az in a b c d; do | |
history="$(ec2-describe-spot-price-history \ | |
--region $region \ | |
-s "$(date -u -d "2 day ago" +%Y-%m-%dT00:00:00)" \ | |
-e "$(date -u -d "1 day ago" +%Y-%m-%dT00:00:00)" \ | |
-a $region$az 2>/dev/null | sed -e s/$region$az// | sort | |
)" |