Skip to content

Instantly share code, notes, and snippets.

@unot
unot / gist:954609
Created May 4, 2011 01:48
画像を繋げる(ImageMagickコマンドサンプル)
# 複数の画像を1つの画像に結合します。垂直に繋げるには「-append」水平につなげるには「+append」を使います。
# http://gazouiriro.seesaa.net/article/98428010.html
convert -append file1.png file2.png file3.png ... out.png
@unot
unot / jpg2fixedbmp.sh
Created April 12, 2011 23:58
JPEG image to 1812x1240 Bitmap image
#!/bin/bash
for i in *.jpg ;
do
convert -depth 8 -density 600 -geometry 1812x1280 -crop 1812x1240+0+15 $i `basename ${i} jpg`bmp ;
done
@unot
unot / deltaE94.sh
Created April 5, 2011 02:23
色差計算(ΔE94)
#!/usr/bin/sh
#
#@(#) deltaE94.sh 色差を計算
#@(#) Copyleft 2008, 2009 UNO, Takashi
# Usage: deltaE94.sh file1 file2
if [ $# -ne 2 ]; then
echo "Usage: `basename $0` file1 file2" 2>&1
exit 1
fi
@unot
unot / deltaE.sh
Created April 5, 2011 02:22
色差計算
#!/usr/bin/sh
#
#@(#) deltaE.sh 色差を計算
#@(#) Copyleft 2008, 2009 UNO, Takashi
# Usage: deltaE.sh file1 file2
if [ $# -ne 2 ]; then
echo "Usage: `basename $0` file1 file2" 2>&1
exit 1
fi
@unot
unot / cyPDF2Text
Created April 4, 2011 02:22
PDF to Text in Cygwin
#!/usr/bin/bash
# for Cygwin env
# PDF to Text. ShiftJISだと英数記号が2バイト文字になるのでEUC-JPに
for i in *.pdf;
do
pdftotext -enc EUC-JP $i
done
# Windows テキストに変換
@unot
unot / animatetv.zsh
Created April 3, 2011 17:37
record wma mms streaming from animate.tv
#!/bin/zsh
if [ $# = 1 ]; then
URL=$1
TITLE=`wget -q -O - $URL | perl -nle 'm|<Entry><Title>(.*)</Title>|; print $1' | nkf -w`
# DATE=`wget -q -O - $URL | nkf -w | tr -d '\015' | sed -n 's|<Title>\(.*\)</Title>|\1|p' | sed -e 's|/|-|g' | sed -n '2p' | tr -d ' '`
# ASXMMS=`wget -q -O - $URL | nkf -w | grep wma`
MMS=`wget -q -O - $URL | perl -nle 'm|(mms.*wma)|; print $1'`
mimms ${MMS} "${TITLE}.wma"
# echo ${MMS}
# echo "${TITLE}(${DATE}).wma"