New program: “Kanji”, a simple flashcard-like study program

December 12, 2011

Screenshot of "Kanji"

Last Saturday, I got up early and decided to whip up something quick yet useful. Roughly two hours later, I had released the first version of “Kanji”.

“Kanji” is a simple tool for reviewing Japanese characters or words. It reads in a UTF-8 encoded file and displays the entries within at random, showing a new entry every 30 seconds. It is intended to be run in “always on top” mode, in which case it can be used for passive studying of Japanese while working on other things.

This tool is minimalistic by design. There are no config files nor preferences. Everything is specified via the command line, after which, the program simply runs until closed.

Continue Reading »

Fun with xargs: parallelized FLAC to MP3 conversion

October 11, 2011

I’ve been wanting to use xargs for a practical application for some time. I’ve read many articles that have mentioned it, but it was Ted Dziuba’s Taco Bell Programming which was the tipping point.

Here’s the situation: I want to convert my FLAC collection to an MP3 collection so that I can upload my CD collection to Amazon. Further, I’d like to store the MP3s in a different folder, while maintaining the original subfolder structure. Finally, I want to maintain the metadata in my FLAC files; the flac command line utility only seems to support decoding to .wav without metadata.

Finally, I have 8 virtual cores, and I want to use them all to convert everything as quickly as possible.

Continue Reading »

Using nvidia drivers on Debian Squeeze 64-bit with backported kernel

August 14, 2011

This article consists of notes I’ve written while attempting to get the official nvidia drivers to work on Debian Squeeze with a backported kernel.

For the record, on my system I am using kernel version 2.6.39-bpo.2-amd64.

Continue Reading »

Google Chrome and Flash on Debian Squeeze 64-bit

May 26, 2011

I recently re-installed Debian Squeeze on my main machine. I’m using the 64-bit version along with 64-bit Chrome.

However, the 64-bit Chrome does not come with a built-in Flash player. Instead, it seems to be finding the plugin by searching the Mozilla plugin folder (/usr/lib/mozilla/plugins/), where it finds flash-mozilla.so, which is a symlink to /usr/lib/gnash/libgnashplugin.so, the Gnash flash plugin.

Don’t get me wrong; I’m happy to see how Gnash is looking, and I’m happy that a free software alternative exists. However, I’m not a FLOSS puritan; I’ll use the best tool for the job which, in my opinion, remains as the official Flash plugin.

So, how to install the Flash plugin?

Adobe says to refer to the browser documentation. Google’s docs mention Flash as being built-in for 32-bit, but I couldn’t find mention of how to install for 64-bit.

Here’s how I did it: since Chrome seems to be using the symlink in the mozilla folder, which is managed by Debian’s “alternatives” system, I installed the plugin and added it as an alternative.

Step 1: Download the 64-bit Flash Player plugin for Linux from http://labs.adobe.com/downloads/flashplayer10_square.html.

Step 2: Install the plugin as follows:

sudo mkdir -pv /opt/flashplugin
cd /opt/flashplugin
sudo tar -xf <path/to/flashplugin.tar.gz>

Step 3: Install the plugin as a flash-mozilla.so alternative:

sudo update-alternatives --install \
    /usr/lib/mozilla/plugins/flash-mozilla.so \
    flash-mozilla.so \
    /opt/flashplugin/libflashplayer.so \
    10

Step 4: Select the Adobe plugin for use as the active plugin:

sudo update-alternatives --set flash-mozilla.so /opt/flashplugin/libflashplayer.so

That’s it! Flash should now work. If it does not work immediately, restart Chrome and then it should. (As a side effect, the same plugin should now be the Firefox default as well, in case you use both browsers.)

Adventures with C #1: GLib on Windows with MinGW/MSys using autotools

January 18, 2011

This is the first document in what may become a series of docs on cross-platform development using pure C (not C++) along with commonly available libraries.

A brief aside about my background for newcomers: I’m experienced with Python and C++ (although admittedly rusty in the latter), and I’ve written straight C as well (in college, for work, for GNU Typist). However, I feel my C skills are not as strong as they could be.

Basically, I know how to program and am not interested in reinventing the wheel. My focus is on developing my skills with practical C development, using any open source available libraries which I can along with, if feasible/possible, the MinGW/MSys toolchain.

This first article is a tutorial of how to use GLib with the autotools on Windows via MinGW/MSys.

Continue Reading »

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org