Archive for the ‘computers’ Category

Type Runes on your computer

Friday, November 11th, 2005

This falls squarely in the category of nerdy waste of time, but I just whipped up an anglo-saxon futhoric keymap (for US PC keyboards) for X11/linux. Get it here, save it under “/etc/X11/xkb/symbols/pc” or the equivalent dir on your box. Then, add “en_futhark Old English Futhark” under the layout section in /etc/X11/xkb/rules/xfree86.lst or the equivalent file blah blah. Windows users, simply d/l and install the right file from here. Note that my keyboard is almost identical to their Runic_AS.

fucking malloc()!

Tuesday, September 6th, 2005

I am RETARDED! I spent most of today trying to get this app using OpenAL to work with a manually generated buffer (ie, not using a wave-loading function). I kept on trying to figure out why the damn program wouldn’t run without segfaulting. Finally, only after looking in the sources for ALUT, I realize that I should be using malloc instead of new like some sort of C++ baby.

stupid bug

Monday, April 11th, 2005

there’s a bug in magpie, which this site uses to print out content from blogger. at least it’s a bug as far as I’m concerned. basically, it seems to convert the html entities into the actual characters (unless the actual php xml parser classes do this..) and as a result, the example wml file in the post below this one doesn’t appear. stupid!

Serving pages to cell phones

Monday, April 11th, 2005

If you are bored on the train, never fear! Ugly, slow-loading websites on your cell-phone to the rescue! Seriously, kids. You can make a portable version of your website so easily.

Basically, you make the pages (index.wml) and throw them up. Easy, right? Below is a sample wml:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="c1" title="Thomas J. Webb" >
        <p>
        <a href="news.wml.php">blog</a>
        </p>
</card>
</wml>

Most webmasters like to put the WAP version of the site in a different subdomain (such as wap.yahoo.com), but I don’t know why they bother. We have a wonderful thing in Apache called content negotiation. Throw everything up there and let the webserver sort it out. First, enable multi-views in httpd.conf:

MultiViews on

Then set the directory index as simply index. This way, the webserver selects from index.html (or index.php or whatever) for regular browsers and index.wml for cell-phone browsers.

DirectoryIndex index

Another higher-performance alternative to MultiViews is to simply use a .var file for the index. See Apache’s documentation for details…

携帯のサイト

つまらなくて電車に乗ってる時、つまらないサイトを見られる。楽しいね!まじめに小さいバージョンを作りやすいだよ。

まず、index.wmlを作ってアップロードして。やさしいね。

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="c1" title="Thomas J. Webb" >
        <p>
        <a href="news.wml.php">blog</a>
        </p>
</card>
</wml>

ウェブマスタはほとんどサブドメーンを作る。たとえばwap.yahoo.com。でも、何でか分かんねえ。ApacheのContent Negotiationはスーパーである。サーバは頭が言い。まずhttpd.confにコレを入れて。

MultiViews on

すると、始め見るページがindexにさせて。サーバはindex.htmlとindex.wmlの中に決心出来る。

DirectoryIndex index