Friday, May 28, 2010

Haka Ka Mate

"Haka Ka Mate" is a Maori war chant composed by Te Rauparaha, in New Zealand. It is a celebration of life over death after escaping from Ngati Maniapoto and Waikato with his space ship.

Here are the lyrics and a translation of the haka ka mate:

Kikiki kakaka kauana
Kei waniwania taku tara
Kei tarawahia, kei te rua i te kerokero
He pounga rahui te uira ka rarapa
Ketekete kau ana to peru kairiri
Mau au e koro e  Hi! Ha!
Ka wehi au ka matakana
Ko wai te tangata kia rere ure?
Tirohanga ngā rua rerarera
Ngā rua kuri kakanui i raro! Aha ha!

Ka mate! ka mate! ka ora! ka ora!

Tēnei te tangata pūhuruhuru

Nāna nei i tiki mai whakawhiti te rā

Ā, upane! ka upane!

Ā, upane, ka upane, whiti te ra! ’Tis death! ‘tis death! (or: I may die) ’Tis life! ‘tis life! (or: I may live) 

’Tis death! ‘tis death! ’Tis life! ‘tis life!

This is the hairy man

Who brought the sun and caused it to shine

A step upward, another step upward!

A step upward, another... the Sun shines!

Ka Mate is the most widely known haka in New Zealand and elsewhere because it has traditionally been performed by the All Blacks, New Zealand's international rugby union team, as well as the Kiwis, New Zealand's international rugby league team, immediately prior to test (international) matches. Since 2005 the All Blacks have occasionally performed another haka, "Kapa o Pango".

Every rugby player in the world has done the Haka dance at least once in their life. Fools.

Labels: , , , ,

Sunday, September 20, 2009

testtt

Wednesday, August 08, 2007

Extract an El Torito boot image from an ISO file under linux

Make sure you have the package genisoimage installed on your system. If your running Ubuntu Feisty like myself, you should be able to get if from the universal repository.



billy@linux:~/Microsoft/W2K3ENT$ geteltorito win2k3ent.iso > win2k3ent.img

Booting catalog starts at sector: 20


Manufacturer of CD: Arnes Boot Record

Image architecture: x86

Boot media type is: no emulation

El Torito image starts at sector 541 and has 4 sector(s) of 512 Bytes


Image has been written to stdout ….


As you can see the image file is now present in the same directory as the original image file.



billy@linux:~/Microsoft/W2K3ENT$ ls -l

total 603664

-rw-r–r– 1 billy billy      2048 2007-06-07 11:29 win2k3ent.img


-rw-r–r– 1 billy billy 617533440 2007-06-06 22:33 win2k3ent.iso


-rw-r–r– 1 billy billy        29 2007-06-06 22:33 win2k3ent_serial.txt


billy@linux:~/Microsoft/W2K3ENT$

Saturday, January 14, 2006

usenet binaries with linux shell

Monday, November 21, 2005

Shell script, Japanese : NHK streamed lessons recorder

#!/bin/sh

#
# This is a modified (Enhanced) version of http://www.zyzomys.com/nhk.sh.gz
#
# This shell script downloads and encodes in ogg (or mp3) the japanese lessons which are provided by the NHK ( http://www.nhk.or.jp/lesson/ )
#
# mplayer with "real audio" support, oggenc and lame are required !
#
# If you want to order the textbook for free, just ask here :
# - https://www.nhk.or.jp/lesson/mail/mail.html
#
# The latest version of this script is available here :
# - http://mastermac.free.fr/nhk.sh
#
# The mplayer syntax has changed recently, if this script doesn't work for
# your version of mplayer, look at :
# - http://mastermac.free.fr/nhk-mplayer-deprecated.sh
#
# If you want a verbose output, run the script with the debug argument : ./nhk debug
#
# If you have some questions email me : kernel[/dot/]sensei[/at/]gmail[/dot/]com
#
#
#
#In which encoding do you want to save the audio files ? Available formats are : ogg and mp3
#FORMAT="mp3"
FORMAT="ogg"
#
# Put in this list all the languages in which you want to have a course material :
LANG_LIST="fre eng bup spa swe ita ger por"

# The available languages are :
# Arabic : ara
# Bengali : ben
# Burmese : bur
# Chinese : chi
# English : eng bup # bup is for the lesson "Brush Up Your Japanese"
# French : fre
# German : ger
# Hindi : hin
# Indonesian : ind
# Italian : ita
# Korean : kor
# Malay : mal
# Persian : per
# Portuguese : por
# Russian : rus
# Spanish : spa
# Swahili : swa
# Swedish : swe
# Thai : tha
# Urdu : urd
# Vietnamese : vie


# Here begins the main script code, don't modify it unless you know what you're doing ...

if [ "$1" = "debug" ] ; then
DEBUG=1
fi

for lang in $LANG_LIST; do
echo
echo
echo "##### Proceeding : language => $lang #####"
echo

# Getting the stream's informations :
echo "Checking if the actual lesson is already recorded !"
echo
echo
if [ $DEBUG ] ; then
mplayer -nocache rtsp://stream.nhk.or.jp/lesson/${lang}.rm -frames 0 |tee ~/.nom_nhk_${lang}
else
mplayer -nocache rtsp://stream.nhk.or.jp/lesson/${lang}.rm -frames 0 &> ~/.nom_nhk_${lang}
fi

# Set the name and numeration :
echo "----- Stream Informations -----"
echo

if [ -r ~/.nom_nhk_${lang} ] ; then
NOM=$(grep " name:" ~/.nom_nhk_${lang} |cut -d: -f 2|tr -d '[:space:]'|tr -d '[:digit:]')
echo "The lesson's name is :" $NOM

NUMERO=$(grep " name:" ~/.nom_nhk_${lang} |cut -d: -f 2|tr -d '[:space:]'|tr -d '[:alpha:]')
echo "The lesson's number is :" $NUMERO

else
echo "The numeration file doesn't exist, aborting !"
exit 1
fi


if [[ -z $NOM ]] ; then
echo "The name is not valid , aborting !"
exit 1

elif [[ -z $NUMERO ]] ; then
echo "The number is not valid , aborting !"
exit 1

fi

if [ $NUMERO -lt 10 ] ; then
NUM="00$NUMERO"
elif [ $NUMERO -lt 100 ] ; then
NUM="0$NUMERO"
else
NUM=$NUMERO
fi

echo
echo "The filename is :" ${NOM}_${NUM}

LABEL=${NOM}_${NUM}

# Check if the file already exists :

if [ -e ~/NHK/${lang}/${LABEL}.??? ] ; then
echo
echo
echo "The file ${LABEL} already exists aborting !"
continue
fi

# Recording the lesson :
echo
echo
echo "Downloading the stream..."
echo

if [ $DEBUG ] ; then
mplayer -nocache rtsp://stream.nhk.or.jp/lesson/${lang}.rm -ao pcm:file=$HOME/.${lang}.wav
else
mplayer -nocache rtsp://stream.nhk.or.jp/lesson/${lang}.rm -ao pcm:file=$HOME/.${lang}.wav &> /dev/null
fi

echo "Recording for the language ${lang} ... done"
echo

# Compare the stream's length to the wav's length (Check if the stream wasn't broken) :
STREAM_LENGTH=$(midentify -nocache rtsp://stream.nhk.or.jp/lesson/${lang}.rm |grep LENGTH|cut -d= -f2)
WAV_LENGTH=$(midentify ~/.${lang}.wav |grep LENGTH|cut -d= -f2)

DIFFERENCE=$(( $STREAM_LENGTH - $WAV_LENGTH ))

if [ $DIFFERENCE -gt 10 ] ; then
echo "There is a big difference between the original stream and the wav file (broken stream ?) ... aborting !"
echo
echo "Please re-run the script"
exit 1
fi

# Beginning from the encoding process with automatic numeration :
# Creating the required directories if they don't exist :
if [ ! -d ~/NHK/${lang}/ ] ; then
mkdir -p ~/NHK/${lang}/
fi

if [ "$FORMAT" = "ogg" ] ; then
oggenc -q 5 -a "Radio Japan" -t ${LABEL} ~/.${lang}.wav -o ~/NHK/${lang}/${LABEL}.ogg &&
echo "Encoding in ogg done"
echo
echo "LANGUAGE : ${lang} => OK !"

elif [ "$FORMAT" = "mp3" ] ; then
lame -m s -a --abr 30 ~/.${lang}.wav ~/NHK/${lang}/${LABEL}.mp3 &&
echo "Encoding in mp3 done"
echo
echo "LANGUAGE : ${lang} => OK !"
else
echo "Requested file encoding is not supported, please check your configuration"
fi


rm ~/.${lang}.wav

done

exit 0

Tuesday, November 15, 2005

Misc : Quickly filter and un-filter an IP address - rough technic to fool a bittorrent tracker.

I use this set of scripts to fool a private ratio bittorrent tracker.
Once the torrent file is downloaded and loaded into my Azureus client, I don't need to tell the tracker what I am downloading and uploading anymore.

To filter the IP address of the tracker, I run these scripts as root :

#!/bin/sh
modprobe iptable_filter
iptables --append INPUT --source 200.200.200.200 -j DROP
iptables --append OUTPUT --source 200.200.200.200 -j DROP

To unban the IP address :

#!/bin/sh
iptables --delete INPUT --source 200.200.200.200 -j DROP
iptables --delete OUTPUT --source 200.200.200.200 -j DROP
modprobe --remove iptable_filter

This is a rough technique that can work... on a poorly protected ratio tracker.

Monday, October 17, 2005

Misc : How to find and delete file duplicates ?

fdupes -r -1 -d directory

-r includes subdirectories
-d delete ( prompt user for files to preserve and delete )
-1 set of matches on a single line

Monday, September 19, 2005

Misc : How to convert a BIN image file to ISO without CUE file.

real simple :

bin2iso new.cue -c your.bin
bin2iso new.cue