linux command line date to timestamp

[Thu Mar 31 09:51:50 margusja@IRack date -j -f "%Y-%m-%d %H:%M:%S" "2011-03-31 23:59:59" "+%s"

iPhone4 4.3.1 how to boot in to tethered mode

[Sat Mar 26 16:20:12 root@IRack ./tetheredboot -i /Users/margusja/Desktop/tetheredboot2/iBSS.n90ap.RELEASE.dfu -k /Users/margusja/Desktop/tetheredboot2/kernelcache.release.n90 Initializing libpois0n No matching processes were found Waiting for device to enter DFU mode Device must be in DFU mode to continue opening device 05ac:1227... Found device in DFU mode Checking if device is compatible with this jailbreak Checking the device type Identified device as [...]

Convert latin1 to UTF-8 in MySQL

mysqldump -u root -p –default-character-set=latin1 -c –insert-ignore –skip-set-charset -r dump.sql latin1_dbname file dump.sql Non-ISO extended-ASCII HTML document text, with very long lines iconv -f ISO8859-1 -t UTF-8 dump.sql > dump_utf8.sql file dump_utf8.sql UTF-8 Unicode HTML document text, with very long lines perl -pi -w -e ‘s/CHARSET=latin1/CHARSET=utf8/g;’ dump_utf8.sql mysqladmin -u user -p –default-character-set=utf8 create utf8_dbname; või [...]

Icecast stress test

Tükk aega mõtelesin, millega arendatavat icecast serverit testida. Leidsin streamripper nimelist tööriista. Mul on 7-me kanaliga icecast server. #!/bin/sh URL=http://server:8000/channel.m3u for i in 1 2 3 4 5 6 7 8 9 10 do streamripper $URL -r & sleep 5 done     Järgmine kord teen väikese skripti ka.

Eesti IT-maastiku hetkeline olukord

Säästumarket suure loadi all

Käisin lõunal poes. Säästukas rabas kahe CPU-ga. Samas ikka oli keskmine load ligi 20 per CPU. Masendav oli see, et kaks CPU slotti oli vaba veel.

Keemia põhitõed

Molaarmassi arvutamine index X elemendi aatomimass + element n Näiteks M(H2O) e H2O molaarmass on 2×1+16=18g/mol Õhu molaarmass 29g/mol   F                                                H                     [...]