Posted by Erik on August 26, 2010
Say you want to set an option tag to selected only under certain conditions without the code getting really ugly. Do this!: I was messing around with the ternary operator in other ways inside the element, but none of them actually interpreted properly. I hope this helps someone else struggling with this issue…
Posted by Erik on March 23, 2010
I didn’t realize that Roy Chiao acted in basically every Kung Fu movie ever made. You might know him (as I did) as Mr. Tanaka in Bloodsport. He’s the guy that puts Frank Dukes through the awesome training because Frank tried to steal his sword. I noticed him in Enter the Fat Dragon, and was [...]
Posted by Erik on February 27, 2010
[Audio clip: view full post to listen] Oh, what a better world it would be…
Posted by Erik on February 10, 2010
In case I ever forget this again, I’m posting these instructions here. It’s actually really easy. Install OpenSSH from Cydia Mount the iPod’s filesystem: mkdir -p ~/touch && sshfs -o allow_other root@192.168.1.7:/ ~/touch/ Then, in Amarok 2, go to the collection browser, and find all the songs that match your criteria (I use ratings): Highlight them [...]
Posted by Erik on February 3, 2010
I just took this picture with my new Canon XSI DSLR. I really like it. Even though I’m going to have to buy all new lenses, I think this picture, which was shot freehand with my left hand hanging in the air, makes it all worth it. Geet asked me what inspired me to switch [...]
Posted by Erik on January 14, 2010
I was having the hardest time getting various programs to echo the runtime of m2ts files in Linux, and it turns out someone wrote a parser for the files in the BDMV/PLAYLIST directory, which have all of this information. Get bdtools. I got Version 1.4. You can find it here. ./configure && make && sudo [...]
Posted by Erik on January 1, 2010
Calibre is about the best thing since sliced bread. It is able to convert basically any type of Ebook format into EPUB, which is what my Nook reads natively. It seamlessly syncs with the Nook as well, which is a huge plus, and all of this happens in Linux. I highly recommend this software. Just [...]
Posted by Erik on December 31, 2009
I converted an ebook from TXT to EPUB today using Calibre, and found that the italics (which in the TXT file are annotated /like this/) are not converted into the HTML equivalent. I did the following to fix this: unzip ebook.epub -d tmpbook cd tmpbook perl -i.bak -pe ‘s/([\s-,.;\'?:]+)\/(.+?)\/([\s-,.;\'?:]+)/$1<i>$2<\/i>$3/sg;’ *html That will create.bak files just [...]
Posted by Erik on December 31, 2009
So, ConvertLit seems to be a good solution for those looking to convert LIT ebooks into EPUB (well, into HTML, but then into EPUB…). Unfortunately, the developers seem to be unable to properly make a good source tarball for version 1.8. Here’s what I did: Download Version 1.8 source from here. unzip clit18src.zip -d convertlit [...]
Posted by Erik on November 12, 2009
OOC is cool. Yesterday I started writing some code in it after reading about it on the github blog. Here is the first result: I’m extremely happy with how well this performs. Using the latest ooc Java compiler from the github trunk to handle the each() functions, this compiles down to a bunch of C [...]