Peter's Web Site

Lite Tech Archives

Fun with optical mice

I just discovered that you can use an optical mouse in mid-air. Since its on-board sensors generate images in the infrared band of the spectrum, if the mouse's sensor is exposed to a moving, high-contrast infrared light source, it will cause a corresponding reverse motion of the cursor on the screen. For instance, you can make the mouse detect motion by holding it upside-down and moving a candle across the field of view of its optical sensor.

Furthermore, if you have an incandescent light source some distance away, you can point the bottom of the mouse at it and move the cursor by rotating the mouse from side to side.

Posted by Peter on October 09, 2005 | Comments (1)

Cygwin startup problem and Ext2Fsd

After installing Ext2Fsd, and open-source driver for mounting ext2 partitions under win32, my Cygwin installation magically stopped working. Well, it took me some time to establish this chain of causality but I finally figured out the problem: ext2fsd installs a win32 version of mount.exe into c:\windows\system32. This preceeds c:\cygwin\bin in my path, and every time the Cygwin environment is started up, it basically executes the following mount commands:
mount -fst c:/cygwin /
mount -fst c:/cygwin/bin /usr/bin
mount -fst c:/cygwin/lib /usr/lib

These commands end up running Ext2Fsd's version of mount.exe, which doesn't know anything about -f, -s, or -t. I've emailed the author of ext2fsd alerting him to this problem, but until he fixes it for good, I've just renamed his mount.exe to mount_ext2.exe.

Posted by Peter on October 07, 2005

Acrylic

Microsoft has released the technology preview of their vector drawing package, code named Acrylic.

A friend showed me some examples sketches he had done, and they were very cool.

Posted by Peter on August 23, 2005

Firefox tip

If you're like me and are constantly running into problem pasting multi-line text into Firefox's address bar, you can rectify the problem with this one simple fix:

type "about:config" into your address bar, and change the editor.singleLine.pasteNewlines setting to 3.

Tada!

(credit: Gravitonic)

Posted by Peter on August 07, 2005

"Why blogs?"

Well, there are a lot of stories to tell, but the reason that blogs existed, like mammals after the fall of dinosaurs, is nimbleness. The bloggers delivered the content that dotcoms promised without the massive overhead.

http://stevegilliard.blogspot.com/2005/01/fundraising-its-really-begging-but-im.html

Posted by Peter on April 19, 2005

Simple VI Cheat Sheet

Here's a really clean and comprehensive vi cheat sheet.

Posted by Peter on September 04, 2004

iTunes Applescripts

Doug's Applescript site is pretty famous, but I didn't realize he had a special section just for his iTunes Applescripts. (One cool one is "make bookmarkable", which makes any track have the "resume playback" feature that is enabled by default on audiobooks.

Posted by Peter on August 23, 2004

Picasa kicks ass

After getting fed up with iPhoto's inability to handle a large photo library (and its repeated crashes), I downloaded Picasa. OMFG this app is sweet. Windows only for now; I don't know if it'll run on Linux with WINE. It imported several over 4,000 images pretty quickly (< 1 hour) and organized them by date. The user interface isn't perfect (it's still got too many wordy options on menus and context menus etc.), but it's the best thing I've seen to date on the PC.

Posted by Peter on August 07, 2004 | Comments (1)

Blog spam solutions

This weblog got over 60 spam comments yesterday. I am not amused.

So, I got off my lazy ass and installed MT-Blacklist, which will (hopefully) be much more effective than my hacking of Comments.pm to reject spam URLs. It's trivially easy to install. It also has a nice De-spam feature that will search through your existing comment database and remove the spam.

Now all I need is to add a CAPTCHA plugin and I'll be all set.

Posted by Peter on July 30, 2004

300 Icons

Some dude gathered up 300 of the most interesting icons from around the web (1800 sites, to be exact). Included are arrows, bullets, shopping cart icons, etc.

Posted by Peter on May 10, 2004

LPR Options

In case you were wondering, here is a pretty complete list of printing options available to command-line LPR: http://wwwcascina.virgo.infn.it/lpoptions.html

Posted by Peter on May 04, 2004

SSL Certs and CAs

Just for reference, I'm putting up the instructions for creating your own CA and certs and whatnot using OpenSSL.

Create a Random Seed File

cat /dev/random > $HOME/.rnd
  • Let this command run for a while and kill it.
  • In linux /dev/random or /dev/urandom will work fine.
  • The openssl.cnf specifies the file used to seed the random number generator.

Generate a CA

- openssl req -out CA.pem -new -x509
  • generates CA file CA.pem and CA key privkey.pem

Generate server certificate/key pair - no password required

  • openssl genrsa -out server.key 1024
  • openssl req -key server.key -new -out server.req
  • openssl x509 -req -in server.req -CA CA.pem -CAkey privkey.pem -CAserial file.srl -out server.pem
    *The content of file.srl is a two digit number. eg. 00; it's incremented when the CA issues a certificate. You can create this file by hand using a text editor. (I'm not sure if CA.sh minds having a newline at the end; for safety I would just put the two digits into the file and omit the newline.)

Generate client certificate/key pair

  • Encrypt the client key with a passphrase
  • openssl genrsa -des3 -out client.key 1024
  • openssl req -key client.key -new -out client.req
  • openssl x509 -req -in client.req -CA CA.pem -CAkey privkey.pem -CAserial file.srl -out client.pem
Posted by Peter on January 27, 2004 | Comments (2)

Longhorn

Bill Gates says that Longhorn will be late because it's driven by technology and not a release date. He then goes on to make predictions about how much RAM desktop users will need:

"64 bit is coming to desktops, there is no doubt about that," he said. "But apart from Photoshop, I can't think of desktop applications where you would need more than 4 gigabytes of physical memory, which is what you have to have in order to benefit from this technology."

Tsk tsk tsk... when will you learn, billg? Two words: Immersive Porn. (<strongbad>"you gotta have blue textures.."</strongbad>)

Posted by Peter on October 15, 2003

The Mac in IT

Businessweek has an article about the rise of the Mac in corporate IT.

A couple of my friends who go to LinuxWorld say they saw more Linux lovers toting PowerBooks than ever before. These are people who appreciate the Apple interface and the desktop software but also like being able to do heavy Unix and Linux lifting if need be.

Posted by Peter on October 01, 2003

MS Love-in

For those who hate MS, or for those who love it: some facts about everyone's favorite monopoly.
While we're on the subject, here are some hilarious Will Ferrell "Switch" ads: two ads from MacWorld two ads on apple's site

Posted by Peter on March 03, 2003