Saturday, March 18, 2006

In What Language do Deaf People Think?

An interesting column on how the prelingually deaf think since they've never been exposed to spoken language.

read more | digg story

Thursday, February 23, 2006

Linux console and xterm keymapping

Absolute for anyone who is irritated with erratic behavior of different *nix consoles and terminal emulators.

Thursday, February 16, 2006

Thursday, February 09, 2006

Firefox extension packaging script

Pre-requisite:
  1. 7zip or any other compression utility.
  2. This script must be run from top most, build directory (i.e. where install.rdf and chrome directory resides).
  3. The directory must have the exact same name as the chrome/jar name in install.rdf. It is case SENSITIVE.
#!/bin/bash
x=`basename \`pwd\``
mkdir build/
mkdir build/chrome
cd chrome
7z a -tzip "$x.jar" * -r -mx=0
mv "$x.jar" ../build/chrome
cd ..
cp install.* build
cd build
7z a -tzip "$x.xpi" * -r -mx=9
mv "$x.xpi" ../
cd ..
rm -rf build

Saturday, February 04, 2006

Presentation slides with LaTeX

  • TeXPower is a bundle of style and class files for creating dynamic online presentations with LaTeX written by Stephan Lehmke.

  • Ppower4 - A program written in Java that post processes (La)TeX files formatted with pdf(la)tex to be able to build pages step by step during a presentation. [Free]

  • Beamer - An excellent LaTeX class that supports dynamic effects (for both ps- and pdf-documents). [Free]
  • Prosper - A LaTeX class that supports dynamic effects (for both ps- and pdf-documents). [Free]
  • Utopia PDF Presentations Bundle - provides accessories which facilitate the production of PowerPoint-like presentations from (La)TeX source. [Commercial]

Saturday, January 28, 2006

25 words that hurt your resume

  • Aggressive
  • Ambitious
  • Competent
  • Creative
  • Detail-oriented
  • Determined
  • Efficient
  • Experienced
  • Flexible
  • Goal-oriented
  • Hard-working
  • Independent
  • Innovative
  • Knowledgeable
  • Logical
  • Motivated
  • Meticulous
  • People person
  • Professional
  • Reliable
  • Resourceful
  • Self-motivated
  • Successful
  • Team player
  • Well-organized

  • Monday, January 16, 2006

    Vim LaTex-Suite tutorial

    Latex-Suite is a comprehensive set of scripts to aid in editing, compiling and viewing LaTeX documents. This guide provides a quick 30-45 minute running start to some of the more commonly used functionalities of Latex-Suite.

    Saturday, December 31, 2005

    Diff, Patch, and Friends

    A quick tutorial on Diff and Patch. Another good HOWTO with more patching examples is here.

    Sunday, December 11, 2005

    Sed - An Introduction and Tutorial

    Sed tutorial with and loads of examples.

    Thursday, October 27, 2005

    Arch for CVS Users | Linux Journal

    Arch for CVS Users | Linux Journal
    • tla register-archive http://www.lnx-bbc.org/arch
    • tla get lnx-bbc-devel@zork.net--gar/lnx-bbc--stable
    • tla update
    • tla what-changed --diffs
    • tla changes -o ,,my-illustrious-changes

    Saturday, October 22, 2005

    The HELL that find is!

    Short tutorial on Linux find command.
    • To remove all files named 'a.out' or '*.o' that have not been accessed for a week:
      • find / \( -name a.out -o -name '*.o' \) -atime +7 -exec rm {} \;
    • The rm command is executed once for each file.
      • find / \( -name a.out -o -name '*.o' \) -atime +7 -exec rm {} +
    • To find all files below the directory 'documents' that contain the regular expression 'string':
      • find documents -type f -exec grep string {} +
    • To find all files in the directory 'home', not descending into its subdirectories:
      • find home ! -name home -prune
    • To check whether the file 'diary' has been updated within the last two days; the name of the file is printed if true, and is not printed otherwise:
      • find diary -prune -mtime -2

    Saturday, April 30, 2005

    Firefox 1.0+ Tab Switching

    If you miss switching tabs with CTRL+1, CTRL+2 ... CTRL+N key combinations from Firefox Keyconfig extension. It lets you modify some (not all) default key bindings. It is also possible to create new keybindings. You can create new keybindings from the Keyconfig dialog (Tools->Keyconfig). Then enter the following code in the code box. After that press CTRL+1 in the key capture textbox.

    /* CODE */
    gBrowser.mTabContainer.selectedIndex=0;

    This will let you switch to Tab 1 by pressing CTRL+1. For Tab 2 do the same with selectedIndex value set to 1 and so on.

    Sunday, January 30, 2005

    Linux Keyboard Mapping (Power Buttons)

    power = 222, Sleep = 223, Wake up = 227
    xmodmap output:
    shift       Shift_L (0x32),  Shift_R (0x3e)
    lock        Caps_Lock (0x42)
    control     Control_L (0x25),  Control_R (0x6d)
    mod1        Alt_L (0x40),  Alt_L (0x7d),  Meta_L (0x9c)
    mod2        Num_Lock (0x4d)
    mod3      
    mod4        Super_L (0x7f),  Hyper_L (0x80)
    mod5        Mode_switch (0x5d),  ISO_Level3_Shift (0x7c)
    

    GTK2 Configurable Keyboard Shortcut

    .gtkrc-2.0 gtk-can-change-accels = 1

    Linux Console Dumping

    setterm -dump N will dump the contents of the screen of /dev/ttyN to a file screen.dump in the current directory.

    Monday, December 27, 2004

    Linux Kernel - Selective Module Compile

    FedoraForum.org - kernel compile:
    cd /usr/src/linux*
    make modules SUBDIRS=fs/ntfs
    make modules_install
    ls
    /lib/modules/2.4.22-1.2188.nptl/kernel/fs/ntfs

    Wednesday, December 15, 2004

    Slashdot | What are Some Essential Java Libraries?

    Slashdot | What are Some Essential Java Libraries? Commons Logging. [apache.org] Yeah, you said you wanted to avoid extra libraries, but the overhead of commons logging is so incredibly small, and the extra libraries you'll want to otherwise use are going to require it anyway. It's a measly 28KB last I checked, and well worth it. HttpClient [apache.org] If you want to do any form of HTTP transfers, avoid HttpUrlConnection (built in to Java) at all costs. The HttpUrlConnection code is broken in many ways (too many to list), so you'll need another library. HttpClient does a good job of hiding the HTTP transfer behind the scenes, and has easy ways of letting you extend/change what you need. JGoodies Looks [jgoodies.com] Swing is getting better every day, but for that extra polish, you'll want to use the JGoodies Looks library. It does a great job of making Metal look just that much better, and also helps out the Windows L&F in some places. Xerces [apache.org] I'm not sure if the bulk of this is included in the latter versions of Java, but Xerces is definitely a must-have for any XML parsing. Other goodies... For rendevous (multicast DNS) support, use jmDNS [sourceforge.net]. It just works. If you need i18n handling (normalization, etc..), IBM's icu4j [ibm.com] does a great job. GlazedLists [publicobject.com] - UI List/Table Manipulation Doug Lea's Concurrency Utilities [oswego.edu] - If you haven't yet made the plunge to Java 5.0, this is indispensable for anything thread related. Trove4J [sourceforge.net] - High performance collections that work with primitives. We do wire-speed packet capture and flow analysis with this stuff. 'nuf said. * Logging - log4j (I agree with the previous poster. Don't write log4j off) * Unit Test - junit * Xml Serialization - xstream (very light-weight and easy to use object->xml serialization ) * Data access - iBATIS (a beautifully simple data access layer) * App framework - Spring (not just for the web controller... the IoC and AOP stuff is quite nice.) cglib [sourceforge.net], a library that lets you do metaclass programming efficiently in Java; it's similar to java.lang.reflect.Proxy, but more flexible and compiled to bytecode. Cglib is commonly used to create decorators -- for example, Hibernate uses it to generate proxies, to transparently track whether persistent objects have changed in memory and must be re-saved to the database -- but there are other uses, such as mimicking the mixin pattern. Xalan [apache.org] for XSLT and XPath processing. Here's a tip: Never, ever use SAX for XML parsing of application-specific data structures. SAX is a nice low-level interface for building upon, but unless you're programmatically emitting a document from scratch, it's painful to use -- you always end up writing a stack-based content handler to keep nesting state. XPath makes parsing a breeze. JGroups [jgroups.org] (formerly JavaGroups) is a protocol stack for building reliable, fairly efficient network communications based on, among other things, multicast IP. The entire stack is user-defineable, so you can pick and choose the level of reliability and which features you want (TCP support, pinging, group membership management etc.). Lucene [apache.org] is a text-indexing engine. It's actually pretty crap, and does not scale very far (we're talking a few seconds for result sets of only a few thousand documents), and the code is pure spaghetti (abstract base classes! Inheritance!), but if you need a little indexing engine or some decent text tokenization classes, and your performance requirements are modest, it works well enough. SableCC [sablecc.org] is a good BNF-based parser generator that generates type-safe parse trees that can navigated at runtime. Unlike the more well-known JavaCC [java.net], it's easy to get started, not least because the BNF-like grammar is so simple. JFreeChart [jfree.org] - for all your plotting needs. Robust, quick, and fairly bug free. Not perfect, but hackable. iText [lowagie.com] - a free Java PDF library. My preferred method for creating reports, especially since a lot of my output needs to be e-mailed or submitted to the government, not printed out. JAMA [nist.gov] - a Java Matrix package. The fact that this library has a working singular value decomposition has saved me bunches of time programming a boring and tricky algorithm. I guess it has other stuff, too.

    Tuesday, November 16, 2004

    Mounting Bochs hard disk image

    Today I have made some tests with the loop device, because I want to exchange files with the bochs disk images. This is what I found out: 1. Using Floppy images is easy, because there is no partition table: losetup /dev/loop0 /usr/local/bochs/dlxlinux/floppya.img Now you can use the image like a real floppy: - format : mkfs.minix /dev/loop0 - filesystem check : fsck.minix /dev/loop0 - mount : mount /dev/loop0 -o loop /mnt/floppy Before you want to restart bochs you must do this: losetup -d /dev/loop0 Don't forget to umount before. 2. If you want access to a hard disk image, you have to calculate the size of the first cylinder. This value is the offset argument for losetup. offset = bytes per sector * sectors per cylinder The command for dlxlinux image looks like this: losetup /dev/loop0 /usr/local/bochs/dlxlinux/hd10meg.img -o 8704 For images created by bximage you must use the value 32256. 3. The hard disk image access doesn't work if the image contains more than one partition. 4. I have made this tests with linux and I don't know how this could be done with other operating systems.

    Wednesday, September 01, 2004

    Modifying Styles with Javascript

    Manipulate CSS with javascript