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
#!/bin/bash | |
cd /usr/local | |
git clone https://github.com/riywo/anyenv .anyenv | |
echo 'export PATH="/usr/local/.anyenv/bin:$PATH"' >> /etc/profile | |
echo 'export ANYENV_ROOT="/usr/local/.anyenv"' >> /etc/profile | |
echo 'eval "$(anyenv init -)"' >> /etc/profile | |
exec $SHELL -l |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
require 'nkf' | |
# 既存の半角は維持しつつ全角カナを半角に変換 | |
ARGF.each do |line| | |
# -xを付けないと既存の半角カナが全角になるぽい | |
puts NKF.nkf('-xw -Z4', line) | |
end |
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
cat xxxx.mobileprovision | grep -A 1 -a UUID | grep "string" | sed -E "s/.*>([^<]*)<.*/\1/g" | |
#=> xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx |
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
REVISION=`svn info | grep -i 'last changed rev' | grep -Eo [0-9]+` |
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
# Build Settings | |
BUILD_PATH=build | |
CONFIGURE=Release | |
SCHEME=xxxxxxx | |
TARGET=xxxxxxx | |
# Settings for Sigining | |
PROVISION_NAME=xxxxxxx | |
CODE_SIGN="iPhone Distribution: xxxxxxx" |
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
# echoで指定した日付の範囲内で一覧を出力 | |
echo 12/10 20:00..12/25 20:00 | ruby -r date -lne '$_.split("..").tap{|r| break DateTime.parse(r.first)..DateTime.parse(r.last)}.each{|d| puts d.strftime("%m/%d(%a) %H:%M~")}' |
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
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='__name__'; | |
GIT_AUTHOR_EMAIL='__email__'; GIT_COMMITTER_NAME='__name__'; | |
GIT_COMMITTER_EMAIL='__email__';" |
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
ls | ruby -n -e '/([^_]*_)([^_]*)(_.*)/ =~ $_; puts "%s%03d%s"%[$1, $2, $3]' |
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
echo "internationalization" | ruby -lne 'p "#{$_[0]}#{$_.size-2}#{$_[-1,1]}"' |