Monday 8 October 2012

TMNT as I will always remember them.

We're not miserable bugs,
We're Super Ninja Turtles!
Wearing shells like T-shirts,
Young talents, yeah, yeah!

Our fighting team is always united! (April: United!)
We'll defeat mean and negligent folks! (April: Defeat!)
We're not scared of attacks!
We'll beat all meanies in a row!

We're not miserable bugs,
We're Super Ninja Turtles!

Teacher gave us lessons of his Skill! (April: Yeah, yeah!)
Now we know it as good as 2x2! (April: 2x2!)
Be always cold-blooded,
Protect your friend's chest well! (April: HOORAAAY!!! :D )

We're not miserable bugs,
We're Super Ninja Turtles!
Wearing shells like T-shirts,
Young talents, yeah, yeah!

Lionsgate are a bunch of cunts.

Sunday 23 September 2012

Adjusting console column width number in R.

options(width=Sys.getenv("COLUMNS"))


It may be put in ~/.Rprofile to initialize during startup, but the Squeeze version (2.11.1) seems to be bugged out and does not work. My attempt in being a smartass

options(width = system("echo $COLUMNS", intern = TRUE))

does not work either.

Sunday 2 September 2012

Finding kanji I haven't studied yet in my main deck



Present in Heisig:

鼠汰闇鼈雛韮

sqlite3 ~/.anki/decks/Japanese.anki 'select * from facts'|sed -E 's/(.)/\1\n/g'|sort|uniq > /tmp/used_kanji && for kanji in `sqlite3 -header ~/.anki/decks/Heisigs\ Remember\ the\ Kanji\ \(RTK\)\ 13.anki 'select value from (select * from cards left join facts on facts.id=cards.factid where type=-1) as t left join fields on t.factid=fields.factid where fieldmodelid=(select id from fieldmodels where name="Kanji")'`; do grep -F $kanji /tmp/used_kanji|tr -d '\n' ; done ; echo; rm /tmp/used_kanji

Any:

汰薤辣鐶闇雛韭韮鼈鼠

sqlite3 -header ~/.anki/decks/Heisigs\ Remember\ the\ Kanji\ \(RTK\)\ 13.anki 'select value from (select * from cards left join facts on facts.id=cards.factid where type!=-1) as t left join fields on t.factid=fields.factid where fieldmodelid=(select id from fieldmodels where name="Kanji")' > /tmp/unlocked_kanji; for kanji in $(sqlite3 ~/.anki/decks/Japanese.anki 'select * from facts'|sed -E 's/(.)/\1\n/g'|sort|uniq|grep -v '*'); do if ! grep -qF "$kanji" /tmp/unlocked_kanji; then echo $kanji; fi ; done |tr -d '\n'; echo; rm /tmp/unlocked_kanji

Obsoletee! Obsoletee! With Anki 2.0!

Thursday 9 August 2012

Wednesday 1 August 2012

Broken encoding in Japanese ZIP files.

After a long and painful road I found a way to properly list file names in the archive using 7z:

> LANG=C 7z l ファイル | iconv -c -f SJIS -t utf8

A little more googling afterwards revealed a blog post with the complete and satisfactory solution, which I modify for more automation (in order to not mess up the other files, the archive should be extracted in an empty directory):

> LANG=C 7z x ファイル ; find -exec convmv --notest -f shift-jis -t utf8 {} \;

Finally, there exists a patch called unzip-iconv which is supposed to add the option that specifies what encoding the archive uses. Too bad it's not in Squeeze.


Monday 16 July 2012

Fallout New Vegas silent NPC problem.

Picked this game today on a Steam's daily deal and ran into a problem that some sounds (most of the NPC's dialogues, sometimes gunshots or step sounds) do not play until you enter and exit the "escape" menu. Fiddling with the config file and audio settings did not help, however, what helped was running the game in the Windows 98 compatibility mode. What do you know. My sound card is a rather old integreated Realtek AC97 which hasn't had any driver updates for the last seven years.

Thursday 7 June 2012

Wow, just wow. This is the coolest kanji I've met. Well, maybe with the exception of 夢, but ゆめ takes its appeal not only from the form, but also from the mysterious beauty of its semantic meaning along with the meanings of all its primitives. Wiktionary indicates that its stroke count is bigger than any other 常用漢字.

Update (September 19, 2012):