freaking code code code … I wish I knew what I was doing wrong ?

5Dec/091

Colibri – Quicksilver for Windows

I was looking for a quicksilver replacement for windows ... I'm a commandline person for launching applications, what can I say. So I installed colibri. It works great but for a few oddities with windows 7 64 bit: when I want to launch a 64 bit application (like photoshop) via a shortcut to the "C:\Program Files" directory (it works well with 32-bit application launch via shortcuts to the "C:\Program Files (x86)" directory) I get the following error message:

"Path to Shortcut"
The specified path does not exist.

Check the path, and then try again.

after come looking arround I found a workaround (link):

1. create a folder somewhere on your disk.
2. hold down shift on that folder, right-click and select open command window here.
3. type: mklink /D foldernameyoucreate "full path to original folder in quotes"
example: i created a folder called x64Fix on my disk to hold all my symbolic links for the apps that aren't working. i created my symbolic link inside of it like so (using photoshop as an example):
C:\x64Fix>mklink /D Photoshop "C:\Program Files\Adobe\Adobe Photoshop CS4 (64 Bit)"
4. verify message that symbolic link was created (you should also see a shortcut arrow on the Photoshop folder).
5. You should then have a folder path like C:\x64Fix\Photoshop
6. Create your shortcut for the jumplist from C:\x64Fix\Photoshop folder path to the exe rather than the real path.
so, instead of your shortcut being:
"C:\Program Files\Adobe\Adobe Photoshop CS4 (64 Bit)\Photoshop.exe"
it will be
"C:\x64Fix\Photoshop\Photoshop.exe"

This works it seems and now I can launch a 64 bit applicaiton from colibri. Anyway, colibri is great, look here: http://colibri.leetspeak.org/ and it works on windows 7

31Oct/091

ruby and mysql on OSX 10.6

here are some note on installing ruby on OSX ... as usual this probably will not work for anyone and these are just some notes on mistakes I made:

  • I used the installed version of ruby on OSX 10.6 - Snow Leopard
  • Install the 64 bit version of MySQL from the mysql site (link - and selec the x_86_64, I've used the 5.1.40 installation)
  • install ruby dbi module (dbi-0.4.3) : sudo gem install dbi
  • install ruby dbd module (dbd-mysql-0.4.3):  sudo gem install dbd-mysql

I've also installed mysql (mysql-2.8.1) (though I don't think you need it with DBI/DBO described above). this is the command line I used to install it:

sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

note: the mistake I made earlier was to not use the "x86_64" parameter and I (I think) as a result for the following error message :`load_driver': Could not load driver (uninitialized constant MysqlError) (DBI::InterfaceError)

So after this I was able to execute the simple DB queries via the ruby dbi interface:

begin
    # connect to the MySQL server
    dbh = DBI.connect("DBI:Mysql:#{$DB}:#{$DB_SERVER}", $DB_USER, $DB_PW)
    # get server version string and display it
    row = dbh.select_one("SELECT VERSION()")
    puts "Server version: " + row[0]
rescue DBI::DatabaseError => e
    puts "An error occurred"
    puts "Error code: #{e.err}"
    puts "Error message: #{e.errstr}"
ensure
    # disconnect from server
    dbh.disconnect if dbh
end