Dugan Chen's Homepage

Various Things


jQuery Validation and jQuery UI

At the risk of making a post that many people will find so elementary as to be meaningless, here’s how you get the jQuery Validation plugin to use jQuery-UI’s CSS framework to highlight error messsages:

Preparing Video for AMVs. In Linux.

I just finished watching an anime and now I feel inspired to make another AMV. This time, I want to use Linux and open source software to do it. My sources are fansubs by gg. They’re 720p (1280×720 16:9) x264-encoded MKVs with embedded subtitles. Obviously, they would need to be converted to a format that […]

MPlayer Settings

Been playing with MPlayer. Here are some decent config file settings: stop-xscreensaver=1 ao=alsa vo=xv ass=true ass-hinting=3 embeddedfonts=true The above should be correct for any Linux distribution where you’re supposed to play audio directly through ALSA and not through Pulseaudio. That is, any Linux distribution that I would consider using. The “ass=true” parameter, in particular, is […]

Building 64-bit Qt apps on Windows

The way to build 64-bit Qt apps on Windows is easy. Not obvious, but easy. First you install the following prerequisites: Visual C++ Express 2010 Windows SDK Qt (specifically the source code for the libraries) Qt Creator Then you build a 64-bit version of Qt against the Microsoft toolchain. Fire up the Visual Studio command […]

LinuxFromScratch EBook

For no reason at all, I tried building an EPUB version of the LinuxFromScratch book. Here it is: Download The table of contents isn’t formatted properly (it’s rendered flat, with no apparent heirarchy), and the code samples are annoyingly rendered in a proportional font, but for reading on a device with a screen too small […]

Backbone.js and RESTful web services

One of the more interesting things about Backbone.js is its integration with RESTful web services. Let’s say I have the following web services: URL Verb Description /entities GET fetch entities /entities POST create entity /entities/id PUT modify entity /entities/id DELETE delete entity And that each service takes JSON objects or arrays of objects, where each […]

Hosting Producing OSS Ebooks

UPDATE: This entry previously also linked to EPUB and MOBI versions of Pro Git. It’s been discontinued. The generated ebooks just weren’t up to snuff. Buy the professionally made Kindle version instead. I decided to build and host an ebook versions of Producing Open Source Software. Producing Open Source Software: EPUB If you’re reading thesse […]

Burning gapless audio CDs in Linux

Burning gapless audio CDs from the Linux command-line is easy. Let’s say you have a directory full of .FLAC files. Then all you’ll need to do is: convert the files to CD audio format create a description file burn the CD test it The following paste-worthy lines are all you need. You’ll have to change […]

Backbone.js sample app

For writing a single-page web app, you want something more structured than jQuery. You want a framework that gives you a model-view-something pattern to organize your code around. Google has two: GWT and Closure. Cappucino and Sproutcore are two other choices. Most of these are meant to be used instead of jQuery. Three others, Knockout.js […]

Converting Manga To Kindle Format

The following BASH converts directories full of bitmaps into Kindle books. You will find this useful if you enjoy scanned comic books, which are usually distributed as archives full of graphics files. The script, as presented here, is for the Kindle DX, which has a screen resolution of 1280×824 and can display 16 colors. If […]


« Previous PageNext Page »