Friday, April 25, 2008

HP laptop service chain

  1. The INVENT number given out for service questions connects you with the first tier service who have no powers and really just repeat the info on the website.
  2. You can ask (at the central HP number) for a senior case manager. They claim to have more powers, but so far have done nothing of note
  3. HP's service is taking VERY long:
    I sent in the unit on March 24th their revised repair estimates go:
    April 7th
    April 15th
    April 29th

I will stop buying HP.

Tuesday, April 22, 2008

Windows photo gallery metadata tag names

  1. Windows photo gallery reportedly stores metadata like captions and tags in the metadata, so that you keep all your hard done organization when you move your pictures from one folder to another, one computer to another, one program to another, one OS to another...
  2. So where does Windows Photo Gallery store all that organizational data
  3. Using Phil Harvey's great ExifTool [queens U] I dumped jpg metadata and found that:
  4. Tags are stored in
    Subject
    Last Keyword XMP
  5. Captions are stored in
    Title
    XP Title

I will top-post no more

From the wikipedia article on posting etiquette
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
But what to do about impatient people like myself who don't want to scroll down a lot of junk to get at an answer? The old dilemma remains...

See all files in Finder and searches (Mac)

From an awesome hint here [macworld].

Want to see all the files, but finder won't let you? Break out of the Nanny State of Mac OS X. Change the appropriate key in Finder's preferences

defaults write com.apple.Finder AppleShowAllFiles YES

Then kill the finder process to restart it. This will let you see . files (preferences etc)

This will still not show you system files. For that, in the finder window, underneath the search string, drop down the 'kind' box, select other, then add 'System'

EEPC in a hamster ball : xkcd

http://xkcd.com/413/

But, I don't understand why the webcam is outside the hamster ball, unless, of course, its there because putting it inside makes too much sense...

PS. Colloquy is a nice mac OS IRC client, but you can do IRC over telnet.

Monday, April 21, 2008

PogoSticker

is a great game - you gotta hop your character around the screen on a pogo stick. Getting hit on the head hurts! Get it here.

Mac sound files are in

/System/Library/Sounds

Reading excel spreadsheets into Python

ftp http://www.lexicon.net/sjmachin/xlrd-0.6.1.zip
unzip xlrd-0.6.1.zip
sudo python setup.py install

xlrd - works as advertized, no mess, no fuss. "There are no dependencies on modules or packages outside the standard Python distribution." - that's what we like to hear.

Quick start is here.
    import xlrd
book = xlrd.open_workbook("myfile.xls")
print "The number of worksheets is", book.nsheets
print "Worksheet name(s):", book.sheet_names()
sh = book.sheet_by_index(0)
print sh.name, sh.nrows, sh.ncols
print "Cell D30 is", sh.cell_value(rowx=29, colx=3)
for rx in range(sh.nrows):
print sh.row(rx)


Reading dates is here.
xlrd.xldate_as_tuple(sh.cell_value(rowx=120, colx=0),1) (1 for Mac OS)

Opensource games on mac

There's a nice list of free games for mac here [macrumors], mostly open source. Beyond the red line looks nice.

Video chat app shootout mac

  1. iChat
    Native mac chat program
    Does not play well with PC
    Rumored to work with AIM
  2. MSN Messenger
    Does not have video chat
  3. Mercury messenger
    Has video chat, but frame rate is very jerky
    Works with MSN messenger
  4. aMSN
    Decent video framerate
    Works with MSN messenger
    Can not do audio!

Sunday, April 20, 2008

Python IDE shootout (Mac)

  1. Eclipse + PyDev
    Code folding
    Code browser
    Syntax highlighting
    Nag screen (PyDev extensions)
    No code completion
  2. Xcode + Marxy's scripts
    Code section highlighting (rather than folding)
    Syntax highlighting
    No code completion
    No code browsing
    Not a tabbed interface
  3. Komodo Edit
    Code folding
    Syntax highlighting
    Code completion (but doesn't work on pylab for some reason)
    No code browsing
  4. PIDA
    To try out
http://blog.doughellmann.com/2008/01/python-development-tools-you-can-live.html

Expose & Spaces - screen corners

  1. In system preferences -> Expose & Spaces you can set up 'active screen corners' which will allow you to do various actions my moving the mouse pointer to one of the four screen corners. This is great to cut down on keystrokes to say, see all your desktops and move windows between them
  2. Use 'ctrl' + cursor key to shift between desktops
  3. Drag a window to the edge of the screen (your mouse pointer must be at the edge of the screen) and wait momentarily: your window will be moved to the adjacent desktop

Mencoder on mac

UPDATE:
I've switched to ffmpeg


ftp http://downloads.sourceforge.net/freetype/freetype-2.3.9.tar.bz2
tar -xvf freetype-2.3.9.tar.bz2
cd freetype-2.3.9
./configure
make -j8
sudo make install

ftp http://www.mplayerhq.hu/MPlayer/releases/mplayer-export-snapshot.tar.bz2
tar -xvf mplayer-export-snapshot.tar.bz2
cd mplayer-export-2009-03-24/
./configure
make -j4
sudo make install

ftp://ftp.mplayerhq.hu/MPlayer/releases/codecs/essential-macosx-x86-20060611.zip
unzip essential-macosx-x86-20060611.zip
sudo installer -pkg Essential\ Codecs\ Package\ \(Intel\).pkg -target "/"


Image sequence to movie that QuickTime can play

mencoder mf://*.JPG -mf fps=2:type=jpg -ovc lavc -o rig.avi -vf scale=600:450 -ffourcc DX50

Saturday, April 19, 2008

Mac broken in

  1. After three days the mac has been set up.
  2. What is missing is a good photo album app. iPhoto is fancy, but it keeps all these copies of photos around (even with the 'copy' option unchecked, and the originals unmodified) and it can not read the IPCT metadata that windows photo gallery has written.
  3. Firefox editor shows some visual glitches
  4. Thunderbird composer garbles text, and the cursor is not positioned correctly.
    UPDATE - Only Ariel does not have this problem:







  5. RRiki is much, much faster - instantaneous response, even when it has been inactive for a while. This could be the larger memory, faster processor or the different OS

/tmp on finder

Finder (which is what the folder navigation thing is called on a mac) does not show you the /tmp folder, and there is no option that will reveal such dangerous system folders to you apple users - move along. From a tip here [metafilter], you need to hit the 'go' menu and type in /tmp

UPDATE: Or change Finder's Nanny programming by

defaults write com.apple.Finder AppleShowAllFiles YES

(This post)

LaTeX on mac

  1. This page [pennstate] has a great comparison of latex related stuff on macs.
  2. I went with the MacTeX-2007 package [tug.org] - this seems to have EVERYTHING, since my thesis compiles just fine, and I recall vaguely I used a bunch of extra styles and packages.
  3. I'm used to Texniccenter, which helps organize files into projects and uses \section, \chapter etc. commands to build a document structure. TeXShop lacks in that. I'm trying out Texmaker.
  4. Follow texmaker's instructions to set up the paths
  5. use fink to install aspell
    sudo fink install aspell (this will require a few dependencies)
    sudo fink install aspell-en (this will install the english dictionaries)
    the path to set is /sw/bin/aspell

Friday, April 18, 2008

Startup programs/services on Mac OS 10.5

UPDATE: This page has a better tutorial which I have adapted in this post.

From this page [osxfaq.com]:
  1. Startup commands are found under /Library/StartupItems/
  2. Each application has its own folder
  3. The folder has:
    XXX - A startup shell script
    StartupParameters.plist - A message and information file
    Resources - A folder with translations for strings etc.
  4. XXX is a shell script with root ownership e.g.:
    #!/bin/sh
    . /etc/rc.common
    ConsoleMessage "Starting RRiki"
    cd /path/to/rriki/
    rrikiserver &
  5. StartupParameters.plist is a text file with some info:
    {
    Description = "RRiki server";
    Provides = ("RRiki");
    Requires = ("MySQL");
    Uses = ("Ruby");
    OrderPreference = "Last"; (can be Late,Last,None)
    Messages =
    {
    start = "Starting RRiki server";
    stop = "Stopping RRiki server";
    };
    }


  6. sudo /sbin/service
    is the commandline way of manipulating services.

Enabling root on Mac OS 10.5

From this great page [spy-hill.com]:

% sudo passwd root
Enter Password: -enter your current admin pwd-
Changing password for root
New password: -enter password for your new root act-
Verify password: -repeat it-

Thursday, April 17, 2008

Firefox and Thunderbird migration vista to OS X

  1. Links are in this post.
  2. Firefox - ~/Library/Application Support/Firefox/profiles.ini
  3. Thunderbird - ~/Library/Thunderbird/profiles.ini (Note the difference, which is not given correctly)
  4. Firefox + extensions seem to port with the profile just fine onto mac,
  5. Thunderbird's tags etc work fine, the lightning layout seems a bit wierd...I uninstalled lightning and installed the mac version, and my panes look better now
And can I just state here, for the record, that I'm becoming a mac fan not because of the mac eye candy (which vista has) but because of the bash shell in which I used vi to edit the profile files. Yee Hah, back to Unix! Basically, finally! A laptop that's running *nix out of the box ;-)

RRiki on Mac

Install MySQL

Ruby comes installed with Mac OS 10.5 [rubyforge.org].
sudo gem update rails --include-dependencies

Download the BlueCloth gem and do
sudo gem update bluecloth-XXXX from the directory you downloaded the gem in

To set up RRiki as a service see this post.

MySQL on mac

  1. Download the community server .dmg from the mysql website. Install as usual.
  2. Download mysql gui tools (if you are too lazy to use the command line stuff) and its a lot like MySQL on windows
  3. Setting up the service is involved, see here [osxfaq] and this post.
Mysql is installed under /usr/local/mysql/bin

UPDATE:
MySQL provides binaries for the great GUI tools for Mac OS 10.4 only, and I had some mysterious crashed when creating/editing tables. Downloading and installing the fixed prefpane [here] seems to have fixed that.

Inkscape on mac

Runs fine using X11. Some default mouse shortcuts are different:

Zoom in -> ctrl + right click
Zoom out -> shift + right click

Monitoring the Mac

One must keep an eye on things, so iStat menubar [on iSlayer.com] is nice unobtrusive widget that sits on your status bar and gives you, among other things, temperature, memory and CPU usage.

Transparency in plots

Set the alpha parameter:

N=100;m.scatter(m.rand(N),m.rand(N),m.rand(N)*2000,m.rand(N),alpha=.4)


Wednesday, April 16, 2008

The "We only use ten percent of our brain" Myth

Barry L. Beyerstein tries to dig a bit into this myth. [pdf]

Opening a bank account

Bank of America, somewhere in the Boston region. Took me 10 minutes to open the account. I needed my driver's license and my existing BOA debit card. They opened it even though I snuck in just at closing time.

Tuesday, April 15, 2008

Internet connection speed test II

From work:


Installing python and friends on a mac

  1. Get the latest python interpreter and some packages from here [from a pointer on python.org]
  2. To get matplotlib installed you will need pytz and dateutil, both found on the above mentioned page [pythonmac.org].
  3. SciPy is notably missing - get the source and the fortran compiler from here and compile as acc to the instructions.
  4. There are several IDEs, I'm giving eclipse and xcode a whirl. This [showmedo] is an excellent video tutorial on how to get PyDev for eclipse all set up. Also see this for PyDev installation. PyDev has a really annoying nag screen now. I'm stopping using it.
  5. Eclipse does not play sensibly with matplotlib - I'm using ipython to actually run the scripts and eclipse for the editing environment. Eclipse beats Xcode because eclipse will layout your methods and classes for browsing (like pyscripter).
  6. Marxy has some scripts for Python on Xcode here.
  7. ipython should be installed from source as detailed here.

EEK: A Mac!

  1. Use 'command' or 'apple' key instead of CTRL for copy and paste operations
  2. 'end' is 'command'+'right cursor', 'home' is 'command'+'left cursor'
  3. 'backspace' is Mac 'delete' and 'delete' is Mac 'fn'+'delete'
  4. On firefox (which is what I have used the most) moving the cursor quickly sometimes causes the cursor to have afterimages.
  5. Programs are sometimes installed by dragging the dmg into the applications folder (e.g. when you get Firefox for mac), but are sometimes installed by double clicking the .dmg file (which is basically an archive file of sorts) and then double clicking the .mpkg file which does the actual installation. e.g. for the python installer
  6. Create a shortcut to the applications folder on your desktop - now you can drag applications into this shortcut to install - e.g. firefox/mysql
  7. Screen shots are taken using command+shift+4 or 3 [from here]
  8. Finder doesn't show folders like /tmp, and there is no option to reveal it - you need to type in the folder name after hitting 'go'

Saturday, April 12, 2008

Internet connection speed test

The internet service at Graduate Hills, which is student housing at the university of Maryland and has internet service through the university is [from speedtest.net]:

6561 kb/s download
2428 kb/s upload

calculated with a server at Frederick Maryland



Other servers:

Wednesday, April 9, 2008

Remove field code from Word document

e.g. before submitting a MS, or hand manipulating some formatting because Word does things (like cross-references) so half-assed [from here]

Select all the text (CTRL-A)
Press Ctrl+Shift+F9

Editing to remove anonymous comments that only contain thanks. I really appreciate the thanks, but it makes it harder to find comments that carry pertinent information. I'm also going to try and paste informative comments in the body of the post to make them easier to find.

Sunday, April 6, 2008

Which animals have Milk teeth?

Milk teeth, baby teeth, primary teeth or deciduous teeth [wikipedia].

As far as I could find out; all placental mammals.

Thursday, April 3, 2008

Lighting change at UMD

They replaced all the lights in the corridor with these very depressing blue fluorescent lights. Apparently they're going to save a lot of money on the electric bill the environment and prevent our recovery from the last ice age.

Kevin Galloway was joking that he wondered if the univ. was also going to foot the counseling fees for the depression this was going to cause.

The logical solution would have been to have on-demand lighting, e.g. motion sensor activated etc. This will probably save a lot more power, and not skimp on the lighting quality.

But hey, its easy to whine after the fact. Who do we complain to? Hmm. There's a project. Who was the genius who thought of this any way, and have their lights been replaced?

Will your answer to this question be in the negative?

From recfunny

The Usenet Oracle has pondered your question deeply.
Your question was: Will your answer to this question be in the negative?
And in response, thus spake the Oracle: Memory fault. Core dumped

Firefox and Thunderbird Extensions

  1. Permit cookies - adds a button on Firefox status bar to adjust cookie preferences for current page
  2. Reminder Fox - simple and effective todo and reminder gadget - sits in Firefox status bar
  3. Lightning - calendar extension for Thunderbird - talks with your google calendar
  4. Provider for google calendar - needed by Lightining for google calendar access
  5. Nightly tester tools -
  6. SQLite Manager - wow! a sqlite databse manager in your browser! Can create databases, add tables.

Tuesday, April 1, 2008

XKCD

You should really look at xkcd today.

Gridding irregularly spaced data

To make nice contour plots from irregularly spaced data you would use griddata in matlab. In matplotlib this is not so smooth. See this note. Basically there is a module that you can use.

Windows photo gallery on win XP

One of the things I really liked about windows vista is the photo gallery. At work I'm using a win xp machine, which does not. Apparently you can get windows photo gallery on your XP machine - you need to install windows live, and then select what components you need and install those. Most of it, of course is junk, but you can get messenger and photo gallery.