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
ls $HOME/git | awk '{print "cd $HOME/git/" $1 ";git pull"}' | bash |
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 | |
find ./ -type d -depth 1 \ | |
| while read D; do | |
cd $D | |
pwd | |
git pull | |
cd ../ | |
done |
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 -v | |
brew update | |
brew upgrade | |
brew cleanup | |
for c in `brew cask list`; | |
do | |
! brew cask info $c \ | |
| grep -qF "Not installed" || brew cask install $c; | |
done |
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
# wgetのログから、開始終了の時刻を切り出し、UNIX時刻に変換し、時刻の差を出す | |
grep -Eis '^--2' *.log \ | |
| awk 'BEGIN{FS="--"}{print $2}' \ | |
| xargs -L1 -I {} ruby -e 'require "time";t=Time.parse("'{}'"); p t.to_i' \ | |
| xargs -L2 echo \ | |
| awk '{print $2 - $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
http://q.hatena.ne.jp/1316511935 | |
https://chrome.google.com/webstore/detail/nolijncfnkgaikbjbdaogikpmpbdcdef | |
2chfinder.com | |
a.hatena.ne.jp | |
anond.hatelabo.jp | |
ceron.jp | |
clip.livedoor.com | |
friendfeed.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
#!/bin/sh | |
ls "$@" | while read f; do | |
BEFORE_NAME=$f | |
AFTER_NAME=$(ls $f | awk 'BEGIN{FS="_"}{print "$0" $1 "." $2 "." $3}' | awk 'BEGIN{FS="."}{printf("HOGE.%s.%05d.jpg\n",$2,$3)}') | |
mv $BEFORE_NAME $AFTER_NAME | |
done |
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 | |
mogrify -channel Red -separate -modulate 110 +contrast "$@" |
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 | |
export MAGICK_TEMPORARY_PATH=$HOME | |
find "$@" -type d | while read f; do | |
OUTDIR=$f | |
rm -f "$(pwd)"/"${OUTDIR}".pdf | |
echo "converting $f " | |
(jpg2pdf.pl \ |
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 | |
ls *.pdf \ | |
| grep -v '^zip2pdf\.' \ | |
| sort \ | |
| perl -wnl -aF'\.' -e 'print(pop(@F) . "|" . join(".", @F) . "|" . "19990104." . sprintf("%06d", $.) )' \ | |
| awk 'BEGIN{FS="|"}{print "mv \"" $2 "." $1 "\" zip2pdf." $3 "." $1}' \ | |
> hoge.txt |
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 | |
ls "$@" | while read f; do | |
echo "converting $f " | |
sleep 1 | |
OUTDIR=zip2pdf.$(date +%Y%m%d.%H%M%S) | |
mkdir "${OUTDIR}" | |
unzip -q -o -j "$f" -d "${OUTDIR}" | |
rm -f "${OUTDIR}".pdf | |
dir2pdf.sh "${OUTDIR}" |
OlderNewer