Saturday, June 28, 2008

Firefox 3 on mac os X

I'm happy with FF3.
  1. The intelligent address bar is nice. I can see it eventually making bookmarks obsolete
  2. The new bookmark maanger is great. On mac I missed the ability to drag/drop reorganize my bookmarks, I'm glad its back.
  3. Bookmarks, thanks to the address bar history - and now the intelligent address bar -, are now only really needed for those pages I only visit like once a month, like you know to pay bills, and really I don't WANT a bookmark for those pages...

Thursday, June 26, 2008

TV converter box

Looked at consumer reports and decided to get the Insignia NS-DXA1 which is the same as the Zenith DTT900. Some reports say that there is an audio problem, and some guys actually did an fft of the signal output and showed that there are mysterious peaks at 12kHz and 16kHz. I'll be able to tell later tonight if this is gonna be a problem. Isn't it convenient that this simple piece of electronics is prices around $60? Which comes to $20 after our pooled tax money supplies $40? I think the guys at the company decided that people would be willing to pay $20 for this thing, and hence the price.

UPDATE: One trick for the sound apparently to bump up your TV volume all the way and use the Insignia to control the volume. [here] See my experience below

UPDATE: The box works well
  1. I got 22 channels. This depends on antenna positioning. With another position I got 19
  2. The signal is really really clear. We used to get grain all the time with analog
  3. Sound doesn't have a hiss problem. I boost the converter volume to 100% and adjust the TV volume.
  4. The hiss problem goes away when audio is set to Mono.

Aspell on Mac os

  1. Get cocoAspell
  2. mount the dmg, install the package
  3. go to /Library/Application Support/cocoAspell/ and find any dictionaries that are install, or go to and install some new dicts
  4. go into the dictionary directory and do
    sudo ./configure
    sudo make
    sudo make install
  5. aspell is now ready

Wednesday, June 25, 2008

Incremental backups

From here:
rshargs = -C

perms = 1
path = Unison-test

backup = Name *
#backuplocation = local
backupdir = Laptop-Backup/ZZ-Old-versions --> NOTE RELATIVE PATH!!!
backupprefix =
backupsuffix = .$VERSION
maxbackups = 100

root = /Users/kghose/
root = ssh://**.**.**//Volumes/Blur File Server/Users/kghose/Laptop-Backup

Tuesday, June 24, 2008

Icons on mac

  1. Crop square image file from photo or from scratch using a picture editor e.g. GIMP
  2. Open up Icon Composer (Comes with xcode, /Developer/Applications/Utilities)
  3. Drag and drop the image file onto Icon Composer
  4. Save the file (say 'myicon.icns')
  5. Open myicon.icns in preview
  6. Copy the image
  7. Select the folder/file whose icon you want to change
  8. Right click and 'get info'
  9. Click and highlight the small icon at the top left (just above 'spotlight comments')
  10. 'Paste'

TeXlipse (aspell for Mac)

Eclipse is an IDE for everything. There are at least two plugins for Latex. I'm using texlipse. You need aspell and can get a Mac OS X version here. [cocoAspell]. After installation it will be available at /usr/local/bin/aspell

  1. There is a nice simple table editor. Yay!
  1. There is a small bug in the project setup. I like to keep projects under my directory structure, not under .eclipse. In texlipse if you click 'Create project at external location' and select a folder, then fill out project name, it will get created under .eclipse. You need to first fill out project name, then click 'Create ...' and then choose the directory.
  2. When you create a new file, it tries to open the editor but dies with some error. Closing the editor window and double clicking on the file opens it
  3. Outline view does not work
Too many bugs, things not working, going back to texmaker... The good thing is that I found aspell for Mac, that integrates nicely with the system preferences etc.

Friday, June 20, 2008

QT designer

  1. Can no longer add arbitrary slots to a widget, do that through the subclass [here].
  2. Add menu items my clicking on the 'type here' text on the widget [here].

QT on mac

#include <QtGui> //For the GUI components

#include "ui_main_window.h" //generated from QT Designer

void setup_menu_bar(QMainWindow *mw) {
QMenu *fileMenu = mw->menuBar()->addMenu("&File") ;

//QT on Mac automagically moves these to the application menu item because
//they have the strings 'quit', 'about' etc. in them

fileMenu->addAction("&About", mw, SLOT(close()));
fileMenu->addAction("&Quit", mw, SLOT(close()));

int main(int argc, char *argv[]) {

QApplication app(argc, argv);

QMainWindow *mw = new QMainWindow;

Ui::MainWindow ui;

//putting this line before setupUi causes menubar to be erased

return app.exec();

[code -> html conversion using Francois' tool]

Thursday, June 19, 2008

  1. Reinstalling steam does not wipe your downloaded games
  2. Bittorrent downloads can be resumed even after a reinstall of windows and bittorrent, because there are no messy states that bittorrent keeps lying around.
  3. Windows can be reinstalled without wiping the data

Wednesday, June 18, 2008

Google sketchup hints

  1. If updating gets slow, go to View and turn off 'section planes' and 'section cuts'
  2. For the tape measure tool hitting 'option' (on Mac) will allow you to add guides
  3. Measuring from a guide line results in a infinite guide line parallel to the starting guideline, measuring from a component point results in a finite guideline in the direction chosen
  4. Panning and rotating with any tool active slows things down - it could be that sketchup is doing a lot of computations with tools active. When I need to pan, I just switch to the pan/zoom/rotate tool.
  5. Drawing plane depends on where the horizon is. If Horizon is high ('ground' fills 2/3 or more of the screen) drawing happens on the horizontal plane. If the horizon is low ('sky' fills most of screen) drawing will happen on the vertical plane

Tuesday, June 17, 2008

Unison on Mac OS X

Works swimmingly. I have 10.5 on my laptop (Darwin Kernel Version 9.3.0) and there is 10.4 on the lab server (Darwin Kernel Version 8.11.0) and Unison synchs just fine over ssh. Thanks to Alan Schmitt for the binaries.


lsof is a fun tool to use. It lists files opened by a process.

Man page here.

Example usage

lsof -p 6415 (list files open by given process)

Thanks to Jon Hendry for introducing me to this tool!

Monday, June 16, 2008

Sourceforge wiki space

is nice but has some annoyances:
  1. Its a great place to put project notes. Saves the trouble of having a separate space on the local computer where notes are stored and have to synched etc etc.
  2. Its a great place for documentation and manuals etc.

  1. It will not warn you if you have lost your session - if you save your work, it will lose the draft and say you need to be logged in to edit
  2. Its slow
  3. It has annoying ads on top. Almost half the screen is taken up by non-wiki stuff

Sunday, June 15, 2008

Mounting isos

MagicIso Maker - windows (works on vista)
Loopback device ? mount -o loop -t iso9660 filename.iso /mnt/iso ?

Friday, June 13, 2008

Mime type modif on FF2

Firefox 2 allows you to modify which application opens what, but not add new mime types [here]. There is an add-on that allows you do do this [here].

No filing system compares to the Human brain

In the end, no electronic or physical filing system can keep up with the magic of the human brain.... ah if only we did not forget what we wanted to remember...

Thursday, June 12, 2008

In some ways Macs are well thought out

  1. The multiple monitor handling is well done:
    multiple desktops are handled seamlessly over two monitors
    a screen shot will result in two images, one for each monitor
  2. The operation animations are not only eye candy, but assist the brain by creating a continuous change rather than an abrupt one
  3. Fan exhaust is aimed backwards, not intakes/outtakes on the bottom.
  4. The magnetic power plug
  5. LED on power plug changes color when the computer is fully charged
  6. The battery has a LED charge indicator
  7. The decent battery life

Archery in Boston

In Maryland there was a public archery range 5min walk from home. Its not that simple up here. From here, we see that MIT has a club, but it is restricted to MIT affiliates. Harvard has a club, and they meet at the QRAC. I will try that out. Their mailing list is here.

There is a group doing outdoor practice, but that's far away.

Now, if you go to the national rifle association's webpage (thereby losing all your 'liberal' credentials) you find that Massachusetts has 95 gun ranges. (Compared to California which has 212, beating out Texas 179). Surely some of them should be closeby and should allow a meek archer to practice once a week...

Well if you go down the list there are 16 public ranges, of which 6 have archery:

Edgartown - Martha's Vineyard Rod & Gun Club , 265 The Boulevard, Edgartown, MA 02539.
Phone: 508-627-3537
Facilities include: Outdoor Pistol (50 yds), Pistol Silhouette, Muzzleloading, Trap, Skeet, Archery, Airgun
Range Access: Public
Web Site:

Gloucester - Cape Ann Sportsman's Club, PO Box 301, Gloucester, MA 01931.
Phone: 978-283-0304
Facilities include: Outdoor Pistol (100 yds), Indoor Pistol (50 ft), Outdoor Rifle (100 yds), Indoor Rifle (50 ft), Muzzleloading, Trap, Sporting Clays, Archery, Airgun
Hours of Operation: Call
Range Access: Public
Web Site:

Lee - Lee Sportsmen's Association, 565 Fairview Street, Lee, MA 01238.
Phone: 413-243-9721
Facilities include: Indoor Pistol (50 feet), Outdoor Rifle (200 yds.), Indoor Rifle (50 feet), Muzzleloading, Trap, Skeet, Archery
Range Access: Public

North Harwich - Cape Cod Fish & Game Association, Depot Street, North Harwich, MA 02645.
Phone: 508-430-0973
Facilities include: Outdoor Pistol, Outdoor Rifle, Muzzleloading, Trap, Archery
Range Access: Public

Westport - Fall River Rod & Gun Club, 309 Sanford Rd., Westport, MA 02790.
Phone: 508-673-4535
Facilities include: Indoor Pistol (50 Ft.), Trap, Skeet, Sporting Clays, Archery
Range Access: Public
Web Site:

Worcester - The Boston Gun Range, 225 Grafton St., Worcester, MA 01604.
Phone: 508-755-9955
Facilities include: Indoor Pistol (100 ft), Indoor Rifle (100 ft), Rifle Silhouette, Pistol Silhouette, Archery
Range Access: Public

Public ranges without archery are:

Granville - Wester Mass Bird Dog Club, 87 Farnum Lane, Granville, MA 01034.
Phone: 413-786-0773
Facilities include: Sporting Clays
Range Access: Public

Leyden - Leyden Rifle Range, Inc., 24 Old Frizzell Hill Dr., Leyden, MA 01337.
Phone: 413-773-3548
Facilities include: Outdoor Pistol (50yd), Outdoor Rifle (200yd), Indoor Rifle (50ft), Sporting Clays
Range Access: Public

North Attleboro - American Firearms School, 5 John Dietsch Square, North Attleboro, MA 02763.
Phone: 508-695-5869
Facilities include: Indoor Pistol (75 ft), Indoor Rifle (75 ft), Rifle Silhouette, Pistol Silhouette, Airgun
Hours of Operation: m-f 9-9 s/s 9-6
Range Access: Public
Web Site:

North Dartmouth - High Hill Fox and Coon Club, P.O.Box 541, North Dartmouth, MA 02747.
Phone: 508-995-7461
Facilities include: Outdoor Pistol, Outdoor Rifle (100 yds), Trap, Airgun
Range Access: Public

Princeton - Norco Sportsman's Club, Inc., 91 Houghton Rd., Princeton, MA 01541.
Phone: 508-795-5406
Facilities include: Outdoor Pistol (25 yds), Outdoor Rifle (25, 50 & 100 yds), Muzzleloading, Trap, Airgun
Range Access: Public

Rehoboth - South Seekonk Gun Club, 61 Reed St., Rehoboth, MA 02769.
Phone: 508-336-7282
Facilities include: Outdoor Pistol (50 yds), Outdoor Rifle (75 yds), Muzzleloading, Skeet
Range Access: Public

Salisbury - Bay State Arms LLC, 90 Lafayette Road, Salisbury, MA 01950.
Phone: 978-465-5561
Facilities include: Indoor Pistol (75 feet), Indoor Rifle (75 feet)
Hours of Operation: 7 days 10-9
Range Access: Public
Web Site:

Southampton - Easthampton Fish & Game Association, Inc., 92 College Highway, Southampton, MA 01073.
Facilities include: Outdoor Pistol (40 yds), Outdoor Rifle ( 200 yds), Muzzleloading, Trap, Skeet, Airgun
Range Access: Public

Springfield - Shooting Sports Center, 299 Page Blvd., Springfield, MA 01104.
Phone: 413-846-6400
Facilities include: Indoor Pistol (25 yards)
Hours of Operation: M-F 12pm - 8:30pm
Range Access: Public
Web Site:

Worcester - Boston Gun Range Inc., 317 Southwest Cutoff, Route 20, Worcester, MA 01604.
Phone: (508)755-9955
Facilities include: Indoor Pistol (75 ft.), Indoor Rifle (75 ft.), Airgun
Hours of Operation: seven days a week
Range Access: Public
Web Site:

Boston Commute

I commute between the Malden area and the Longwood area. There are several ways to solve this problem:
  1. Orange Line to Ruggles (30min) + walk (10-15min) ~ 45min
  2. Orange line to Ruggles + Free Longwood area shuttle (No ID required) - 35min to 45min
  3. Orange line to Ruggles + Bike (Haven't tried this, wouldn't work during peak)
  4. Orange line to North Sta (15min) + Green (Heath) to Longwood (20min to 1hr)
  5. Orange line to Ruggles (30min) + walk one block (5min) + Green (Heath) to Longwood (10min to 20min)
The Green line is a bit of a crapshoot. Some days its just fine, some days it crawls. The commute is faster/more reliable if you can put it out of the equation. The Orange line is fast, reliable, and during peak hours, very frequent. I would say near Malden, about 1 every 5min. In the evening, at North Station, perhaps one every 10min

The great thing about trains is that you can read on 'em. I get a paper a trip (about), which is decent.

Wednesday, June 11, 2008

HTML code in Blogger post

Use Francois' applet.

Web gallery with Image Magick

I had trouble getting Gimp to do my bidding via the console for batch processing. Learn Scheme? Yet another language? Well, Image Magick is amazing, and Darwin comes with a version of it. So, from here (IM tutorial) and here (Bash scripting guide) we have a pretty simple script to make a quick and dirty image gallery:

#Call using say ./ "*.JPG"

mkdir Thumbs
mogrify -format jpg -path Thumbs -auto-orient -thumbnail 100x100 *.JPG
echo "
<body>" > $gfn

for img in $1
echo "<a href=\"$img\"><img src=\"Thumbs/$img\"></a>" >> $gfn

echo "
</html>" >> $gfn
And BTW, putting code in Blogger is a pain, because blogger interprets the html, so here is an applet from Francois to do the conversions. Thanks Francois!

Tuesday, June 10, 2008

GIMP in batch mode on OS X 10.5

Gimp has a batch mode. On Mac calling Gimp as

Applications/ -b

Brings up the whole GUI and not interactive mode. from a hint here, we see that we can do

/Applications/ -b -

which does not bring up the GUI and puts gimp in batch mode.

Removing fink

sudo rm -r /sw

If you need to get rid of XFree too

sudo rm -rf /usr/X11R6 /etc/X11 /Applications/

From here.

Monday, June 9, 2008

Mac OS X software equivalents to some windows software

tortoiseCVS -> eclipse's built in CVS interface
winCVS -> Cyber Duck
SciTE -> smultron
bloodshed dev cpp -> eclipse
texniccentre -> texmaker

jollysvnc -> a vnc client (From Jon)
omnidisksweeper -> a gui for du (From Jon)


The post Nick mentions in the comments is here.

Opensource Mac OS X scp client : Cyber Duck

The replacement for winSCP is Cyber Duck. Its very nice, and its released under the GPL.

I also tried out Fugu. It looks elegant, and it has the respectability of a copyleft software hosted under a .edu domain, but you can't store sessions in it (i.e. setup things os you can login to a particular server into a particular local and remote directory).

Finding OSS for Mac OS is a bit of a hurdle. Mostly they have commercial stuff. magicpubs carries some listings of Mac OS software, but not exclusively OSS.

setup CVS on eclipse

xattr @ HFS and the junk Mac OS X puts on top of *nix

  1. ls will sometimes yield a '@' in the file permissions string. This means that the file has extended attributes - a new feature of HFS
  2. Its supposed to be cool - you can add metadata to your files - that only Mac OS can understand - not so cool [here]
  3. Use xattr -d to get rid of these things, especially if you didn't put them there in the first place. e.g. xattr -d IMG_7086.JPG

Sunday, June 8, 2008

Adding libraries to QT pro file

qmake -project is great. You can also add non QT libraries to be included into the .pro file [from here, and here]


qmake -project "LIBS+=-lexiv2"

Friday, June 6, 2008


  1. QT projects can be made from this
  2. Does have code completion - hit f5, haven't figured out how to get QT classes etc to be included in this
  3. Will do code completion for Python
  4. Will not do code completion for Ruby

Xcode and QT

qmake is a powerful thing. QT is serious about the cross platform thing.

Adapted from hints here [Qt-interest Archive]:

qmake -project
qmake -spec macx-xcode

This will produce myproject.xcodeproj, which can be opened in xcode

Setting default application on mac

  1. For single file:
    Right click on file, open with, choose app
  2. For every file of give type:
    Pick an instance of the type (eg a .txt file)
    Right click on file, get info
    Under 'Open with', select the correct app
    Click 'change all'

Tip from drcombie [here]

Right click to create new file

is missing from Mac OS. The following apps try to cover this mistake (yes, you heard me, mistake)

  1. Document palette (donationware, closed source) - can do templates, keywboard shortcut driven
  2. NuFile (donationware, closed source) - right click context menu


  1. Remembers last directory
  2. Last opened file history
  3. Can change line endings
  4. Has projects
  5. No code completion
  6. Tabs (implemented as a side pane)
  7. Syntax highlighting

Looks like a SciTE replacement for me

Wednesday, June 4, 2008

Nexiuz is fun...

...because of the grappling hook

Free Multiplayer Online games

There is a nice big list here.

KumaWar is a kind of ad supported valve. The games are based off the source engine, so they have a counter strikey feel to them, but most of them are just big frag fests.

Some of the MMPORPGs look interesting

Securing a wireless router

  1. Disable SSID broadcast. Router still remains discoverable but not by general users. Causes intermittent problems on Mac OS X but not Vista
    UPDATE: Windows machines expose the SSID when they connect, so Microsoft suggests that the SSID broadcast is kept enabled and encryption turned on [here].
  2. Enable MAC address filtering. MAC addresses can still be spoofed, but not by general users.
  3. Use WPA or WPA2 rather than WEP. Vista and Mac OS X support WPA2

From practically networked.