July 31, 2011

awk

awk '{RS="\0"}/video server/' plugin-container.dmp

dir /b | awk -v q=\" {print\"mv\",q$0q,q$0q} | sed s/foo/bar/2 | cmd

References:
gnu.org/manual/gawk/html_node/Quoting.html
hints.macworld.com/article.php?story=20010509130450691
softpanorama.org/Tools/awk.shtml

July 29, 2011

xargs

xargs is a command on Unix and most Unix-like operating systems used to build and execute command lines from standard input. Under the Linux kernel before version 2.6.23, arbitrarily long lists of parameters could not be passed to a command,[1] so xargs breaks the list of arguments into sublists small enough to be acceptable.

tasklist \
| awk /plugin-container.exe/"{print$2}" \
| xargs -I ! pd -p ! \
| grep -az "video server"

References:
wikipedia.org/wiki/Xargs

July 21, 2011

DvdAuthor for Windows

Install required packages
mingw-get install msys-unzip
mingw-get install msys-wget

Install DvdAuthor
wget http://sourceforge.net/projects/win32dvd/files/dvdauthor/0.7.0/dvdauthor-0.7.0-win32.zip
unzip dvdauthor-win32-0.7.0.zip
cd dvdauthor-win32-0.7.0
mv * /c/dropbox/bin/

Links

lamolabs.org/blog/4582/one-liner-how-to-burn-an-m4v-or-mp4-file-to-a-dvd-under-linux-fedora-centos-rhel-debian-ubuntu
sourceforge.net/projects/win32dvd

July 19, 2011

Hosted Git

If you don’t want to go through all of the work involved in setting up your own Git server, you have several options for hosting your Git projects on an external dedicated hosting site. Doing so offers a number of advantages: a hosting site is generally quick to set up and easy to start projects on, and no server maintenance or monitoring is involved. Even if you set up and run your own server internally, you may still want to use a public hosting site for your open source code — it’s generally easier for the open source community to find and help you with.

Links

git.wiki.kernel.org/index.php/GitHosting
progit.org/book/ch4-10.html
repo.or.cz
repo.or.cz/w/rtmpdump.git

July 17, 2011

mkisofs for Windows

Install Wget
mingw-get install msys-wget

Install mkisofs
wget http://fy.chalmers.se/~appro/linux/DVD+RW/tools/win32/mkisofs.exe
mv mkisofs.exe /c/dropbox/bin/

Links

cdrecord.berlios.de/private/cdrecord.html
lamolabs.org/blog/4582/one-liner-how-to-burn-an-m4v-or-mp4-file-to-a-dvd-under-linux-fedora-centos-rhel-debian-ubuntu

July 14, 2011

sed, MinGW

Replace binary characters
sed -b s/[\x0-\x1f\x7f-\x9f]/_/g input.mp3