Malicious enjoyment derived from observing someone else’s misfortune
 

Tag Archives: awesome

A zsh adventure

Oh yeah, zsh guys.  It’s awesome, and you should know that, but what makes one switch from good ol’ bash?  Generally, it’s prompt magic, but really there’s some other nice features that make it worth considering.  But first, prompt magic.  I had some trouble getting the prompt to respect the width of my terminal, but it was resolved by escaping some things I had in there.  I ended up with this: To do that, you just need the following in [...]

2 Projects completed within 24 hours: USBtinyISP Kit

Well, it’s a kit, so it’s kind of cheating. The other project was the Theramin, which I worked on for days. Anyway, this is a cute little kit you can buy for about $22 that, once assembled, can program pretty much any Atmel microcontroller IC. It’s pretty cool – for real. Anyway, it only took about 45 minutes (I was being careful soldering, could have had it done in 20 if I was hurrying). I’m very happy with the result [...]

Quick Markaby note about conditional attributes

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…

Roy Chiao is Awesome.

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 thinking it was just an effect of all-look-same, but it turned out I was right!  He died over 10 years ago, which is sad.  This [...]

How pilots should talk

[Audio clip: view full post to listen] Oh, what a better world it would be…

Putting Music from Amarok 2 on the iPod Touch

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 and right-click drag them into the Dolphin/Nautilus window showing the directory ~/touch/private/var/mobile/Media/Music/ You may have to create the above directory. When you drop them, choose [...]

My Hand and the Canon XSI

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 to Canon after my devotion to Nikon and coveting of his D90.  I was intrigued by the D90 and other Nikon offerings, but I preferred [...]

Extracting M2TS length from a BDMV directory in Linux

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 make install Try running mpls_dump. I got this error when running: mpls_dump: error while loading shared libraries: libbd-1.0.so.1: cannot open shared object file: No such [...]

Calibre with the Nook on Ubuntu

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 make sure not to queue up too many jobs, or it might DOS your computer for a bit. The PDF conversion is especially intensive. It [...]

Fixing italics in Calibre EPUB output

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 in case anything went wrong.  To revert the changes, do this: for i in *.bak; do mv $i ${i%.bak}; done zip -r ebook.zip * && [...]