SpicyCode

The ramblings of Chad Humphries

Archive for the ‘osx’ Category

Using MacVim and want the same ruby bindings in console VIM?

leave a comment »

Just alias vim to the following.


alias vim='/Applications/MacVim.app/Contents/MacOS/Vim -p'

Written by spicycode

November 7, 2008 at 2:49 pm

Posted in osx, programming

Tagged with ,

Hiding /opt from Finder

Simple way via the command line:

sudo SetFile -a V /opt killall Finder

Written by spicycode

December 4, 2007 at 6:49 pm

Posted in osx

Tagged with

Make it fast please

I love OSX. It’s my favorite OS this side of BeOS. However I still get frustrated some times when things move more slowly that I would like. That’s why I was very happy to find this tip at macosxhints

From MacOSX Hints

If you are willing to sacrifice the visual feedback, disabling animation can provide a snappier experience. To disable animation in the Finder, open your favorite Terminal Software and enter this command:

defaults write com.apple.finder DisableAllAnimations -bool true

killall Finder

I definitely don’t have a slower system, but I still like being able to disable the zooming windows here and there. When I want a folder open, just open the folder please.

If you decided it wasn’t for you, just reissue the command and restart finder again.

defaults write com.apple.finder DisableAllAnimations -bool false

killall Finder

Written by spicycode

May 27, 2007 at 6:08 pm

Posted in osx

Tagged with

Going out with that other database…

After growing tired of mysqls fast and loose approach I thought let’s try PostgreSQL. Here is the tale of my journey on OSX.

A lot of the instructions are gotten from Robby on Rails.

1. Get MacPorts

2. Install PostgreSQL

sudo port install postgresql81
--->  Fetching postgresql81
--->  Attempting to fetch postgresql-base-8.1.5.tar.bz2 from ....
--->  Verifying checksum(s) for postgresql81
--->  Extracting postgresql81
--->  Configuring postgresql81
--->  Building postgresql81
--->  Staging postgresql81 into destroot
--->  Packaging tgz archive for postgresql81 8.1.5_0+darwin_8
--->  Installing postgresql81 8.1.5_0+darwin_8

3. Add the new postgres location to your path. You could put it in your local profile or /etc/profile.

/opt/local/lib/postgresql81/bin/

4. Install postgres gem:

sudo gem install postgres --  --with-pgsql-include-dir=/opt/local/include/postgresql81 --with-pgsql-lib=/opt/local/lib/postgresql81/

5. Finally, manually finish up (Anyone know why the gem doesn’t properly finish?) Switch to the gem directory on your install and run.

sudo make install

6. Working with postgres (taken from the Argon walk-through).

  • Open up iterm and go to your home directory
  • Init your new PostgreSQL database with: initdb -D pgdata
  • Start up PostgreSQL with: pg_ctl -D pgdata -l pgdata/psql.log start
  • Create a new database with: createdb yournewdb_dev
  • Test the new database with: psql yournewdb_dev

7. Change your database.yml

  development:
    adapter: postgresql
    database: yournewdb_dev

  test:
    adapter: postgresql 
    database: yournewdb_test

  production:
    adapter: postgresql
    database: yournewdb_production

And there you go. Hopefully my journey with postgres will be fun filled 😉

Written by spicycode

December 3, 2006 at 6:33 pm

Posted in osx

Tagged with ,

bundlus = (textmate + sharing is caring)

t0fuu has put up Bundlus for TextMate. It is a simple repository for people easily share, document, and find bundles for TextMate.

From t0fuu:

To share a snippet/command/bundle, just drag and drop it onto your desktop from the bundle editor. You can upload it (for bundles, you have to zip it before you upload), write a short description of how it works, and search for other useful bundle items. Anyone who downloads it can just double-click on it, and it will automatically install onto their copy of TextMate.

Written by spicycode

November 7, 2006 at 6:39 pm

Posted in osx

Tagged with