Dugan Chen's Homepage

Various Things


Building 64-bit Maya 2012 plugins with Visual Studio 2010 Express

This is how you use Visual Studio 2010 Express to build plugins for the 64-bit version of Maya 2012. Requirements To build 64-bit targets, Visual Studio Express requires the Microsoft Windows SDK. The current version is 7.1. Install it too. Strategy The idea is to build a 64-bit DLL and link it against Maya’s libraries. […]

Solarized color theme screenshot

On most Linux distributions, “ls” prints directories in dark blue text. Run an X terminal (such as XTerm) in reverse video, and you get directories in dark-blue-on-black text. I decided that anything would be better, and started looking for solutions. The first solution I found was Solarized. In addition to the main Solarized theme (which […]

A Pythonic Qt List Model Implementation

The following is an attempt at a reference implementation of a PyQt list model. It supports rearranging items via internal drag and drop. By the time you have that, of course, you already have the ability to insert rows, remove rows, set data, and export drag-and-drop data to other applications. That’s everything. Python idioms are […]

Django, Tastypie, Generic Foreign Keys and Backbone

I’m going to show you how to implement, in Django, a tagging database and a web service to query it. By the time we’re done, our web service will also be usable from an unmodified copy of Backbone.js. Requirements Our system will have pages, posts and tags. Tags can be attached to either pages or posts. This data […]

Preparing Video for AMVs. In Linux. Part 2.

This is a follow-up to a previous entry: Preparing Videos for AMVs. In Linux. This is how you cut out the first ten seconds of GG’s Madoka Magica fansubs in lossless HuffYUV format: The size of output.avi? 147M. Or almost 15mb/s, or around 21 GB per episode, 252GB for the whole season. And this is […]

Drag and Drop Uploading with HTML 5 and CoffeeScript

About half a year ago, I blogged about Progressively Enhancing Upload Forms. Here’s another implementation. This time, I’m going to use CoffeeScript. With CoffeeScript, you get for free what you would otherwise have to struggle for if you try to follow best practices and make everything pass jslint. It makes easy what is often difficult: […]

Deleting lines with find and sed

Now here’s a use case that calls for command-line Unix tools. I use Slackware Linux. Slackware Linux includes, in its /extra directory, packages that are not installed by default. This includes a script to package Google Chrome. The Chrome packaging script includes Chrome dependencies, including ORBit2 and GConf. Still with me? A very popular repository […]

My audiophile PC setup

My current PC audio setup is economical, versatile, and awesome. The key components are: Behringer U-Control UCA202 Fiio E6 Note: both links are to the actual stores where I bought them. The Behringer USB sound card’s RCA outputs are connected to the Fiio headphone amplifier’s line input via an adapter cable. Now here’s why the […]

Quetzalcoatl 2.0 Screenshot

This is what you’ll see if you check out Quetzalcoatl’s “experimental” branch. All images are loaded from last.fm’s web services, based on tags in the music files. The albums shown in the “Songs” subtree of the left pane are: the soundtrack to the 2011 version of Jane Eyre, Frente’s “Marvin the Album”, Loreena McKennitt’s “The […]

Using Django with Selenium

Much has been written about the ways to integrate Django with Selenium. Here’s my attempt. First, I was inspired by harry’s fantastic Test-Driven-Django Tutorial and GitHub page. I am also aware of django-selenium and django-nose-selenium, but have not used them. Now, for functional testing, you want Selenium. Most guides to testing with Selenium recommend integrating […]


« Previous PageNext Page »