Archive for the 'OSX' Category

-image-NewNewsWire

I have posted about NetNewsWire many times on here before. Its been my favourite news reading application for a couple of years now (if not more) but recent development has severally hampered the usability of the software.

It seemed to be when they changed it to support sync to Google Reader – not a bad idea by any means, but releasing the software before it was full tested and working was a huge mistake. Trying to push it to people before it was ready was an even bigger mistake.

Now twitter & fb are full of messages about problems with the Mac OSX and iPhone version, and it really needs to be sorted out. I know its free now, but as I have said before I paid for it a long time ago and it worked, if its a question of money then release it as a paid version. Not too expensive ( VersionsApp – take note ) but working.

Do not recommend it at the moment, which is such a pity as it used to be one of my favourite applications.


-image-The beauty of the ssh config file

This is a tip that I have used on OS X and on Linux, which I presume works on other *nix and BSDs using SSH.

Basically in the .ssh folder in your home directory you can create a file called config with which you can put all sorts of configuration information for your ssh client but the real benefit for me was to use this to give extra information to hosts such as defining a different port number to connect on. For instance:

Host myservername
        User myuser
        Port 22222

This means that instead of typing:

ssh -p 22222 myuser@myservername

I can type:

ssh myservername

No need for nasty aliases in the shell or anything like that. This also works for the sshfs program on the Mac that makes use of MacFuse. Yes that’s right you can use different ports with SSHfs.

You can also change a much wider range of parameters than I have shown here, but often its probably better to introduce them on the server. But here is an example and have a look under the options flag in the Man page for SSH

Compression yes
CompressionLevel 9
FallBackToRsh yes
KeepAlive no

-image-Django test fixtures and contenttypes

Just came across an interesting problem with the contenttypes contributed application and the test framework.

If you are using fixtures in the test frame work you might find that the database gets out of date as you are working on it, particularly if you are creating new models all the time.

To get around this you need to regenerate the contenttypes database. If you depend on this, the following steps could give you problems so make sure that you back up your data (dumpdata) beforehand.

So first off drop the database:

python manage.py reset contenttypes

If the database has foreign key dependancies on contenttypes you will not be able to reset it like that. Use a database administration tool and drop cascade on the django_content_type table instead.

Then sync the database to create a new contenttypes table:

python manage.py syncdb

Now you are ready to dumpdata into a fixture:

python manage.py dumpdata contenttypes > fixtures/testdata.json

-image-PostgreSQL for Mac and language support – PLPGSQL

Seems sometimes the PostgresqlforMac package doesn’t have support out of the box for PLPGSQL or other stored procedure languages and you can’t simply change to the correct user to upgrade it instead call the createlang command like this:

/Library/PostgreSQL8/bin/createlang -l DATABASE -U USER;

Obviously changing DATABASE to your database and USER to your user. This will list all the languages enabled for that database.

To add PL/PGSQL, try this:

/Library/PostgreSQL8/bin/createlang plpgsql DATABASE -U USER;

Now you are free to create your functions.

If you want to save the change for each database that is created, apply the change to template1 database.


-image-Installing Windows 2008 on MacBook Pro 10.5

Windows 2008 Server is probably the most robust operating system to come out from Microsoft whilst still supporting most of the modern features users demand. The robustness and speed of it is just two of the advantages it has over Vista.

To install on a MacBook Pro its probably easiest to use Windows 2008 Server x86 CD 32bit. 64Bit and bootcamp is not recommended at the moment!

First steps of the installation:

  1. Step one is to start up the bootcamp assistant whilst you are running OS X.
  2. It will take you through the procedure
  3. Put in the DVD when prompted
  4. Follow through the questions asked for the install
  5. When prompted to enter a password make sure to use one of these three: numbers, symbols, capital letters, lower case letters. Password policy is setup on Windows 2008!
  6. It will continue to install and any reboot needed will take you back to the installation

After this is done the OS is installed, but as a workstation OS its a bit of pain to use.

Next steps straight after installation

  1. Start by downloading a webbrowser that you can actually use. IE is quite restricted so to even download something you must go into options and change the privacy options
  2. Insert your Leopard disk and install the drivers that you need, then reboot
  3. From here you can change the resolution of the desktop to the native display resolution

All the steps after this are optional, but are probably good to know:

Enable themes

  1. Open up “Server Manager”
  2. Click “Action”, “Add Features”
  3. Choose “Desktop Experience”
  4. Go into the Service panel
  5. Enable the themes service (its probably disabled, so you need to double click it and enable it
  6. Select a theme by right clicking on the desktop and selecting personalised
  7. Aero theme can be found at:
    C:\Windows\Resources\Themes

Enable wireless networking

  1. Open up “Server Manager”
  2. Click “Action”, “Add Features”
  3. Choose “Wireless LAN Service”
  4. Let it install

Enable hibernation

  1. Open up a command prompt and type
  2. powercfg.exe /hibernate on

For more information on turning Windows 2008 into a workstation check out:

http://www.win2008workstation.com/wordpress/

And for a program that easily enables the features of a workstation on Windows 2008 server:

http://www.win2008workstation.com/wordpress/2008/07/17/windows-server-2008-workstation-converter/


-image-Working with SVN on OS X

I use SVN (subversion) quite a bit, even at home to manage my own files, but recently I have been running the beta version for Versions by Sofa and Pico.

It turned into an excellent way of using SVN, being very visual and supporting everything that I needed, but alas the Beta period ran out and they released Versions 1.

Now I was all for buying this application, but the purchase price of 39 Euros totally puts my of. After all this is a nice to have, and only improves my life slightly. It just doesn’t seem worth the price – particularly when most software like this for OS X is about half the price (I would have easily decided to buy it for 20 Euros).

So after deciding whether to hack it, not really an option any more as I like to have all paid for or properly licensed software on my machines, or search for something else I looked back at what I could use.

SVN from the command line. So I started using this again, and I found myself checking in versions of things that are not ready and not having a nice overview of files. It works of course, but it didn’t suit my way of working since using versions – checking in some files, and generally knowing the status of projects that I am working on.

Then I went back to the SVN plugin for Finder. This is ok, but more often than not the rendering of icons showing whether a folder is up to date or not stops working leaving me in the dark.

Then I decided to check out textmate SVN integration. Its ok, but not really good enough, I don’t like the keybindings and the interface is not intuitive enough.

Finally I came across the ProjectPlus plugin for Textmate. After installing just configure it in the preferences to work with what ever source revision system you use (Its supports SVN, Git, Mercurial, Svk & Bazaar), and you can see the state of what you are doing in the system.


-image-2008 Applications of the year

So here are my most used OS X applications of the year, in no particular order:

* Spotify. This is just an excellent music application, the speed with which the streams start is simply amazing and I don’t find that I get that many adverts in the way of the vast array of songs on offer.

* Textmate. I probably use this more than any other application on the Mac, for me hands down the best text editor that I have ever used and I find more and more features in it everyday.

* NetNewsWire Pro. Having all my RSS feeds in one place is really just what I need. Must remember to integrate it with FriendFeed.

* Adium. Always there, some times a pain with XMMP but otherwise just awesome.

* Python 2.5. Best scripting language by far, but then I am biased.

All free (I did buy a license for NetNewsWire but you no longer have to) apart from TextMate which is more than worth the price.


-image-Last FM

I recently thought that I would check out my listing on Last FM to see stats etc.. and to see what features they have added.

Looks like I had forgotten to run last.fm on my Mac so it wasn’t updated since February. So that’s probably about 1000 hours of music unlisted, and lots of music missing. Gutted. Oh well, perhaps I will remember now.


-image-My top ten OS X applications

Its been a year with this Mac Book Pro that I am using so I thought that I would round up with my top ten Mac software – the software that I would install first of all after a crash.

1. Quicksilver. This is a must have on the Mac. I find out something new about it every week if not everyday and it makes using OS X even easier and more streamlined. For instance, finding a contact and then sending an SMS through skype can be achieved in a few keystrokes, far faster than clicking around in the GUI.

2. NetNewsWire Pro. Now free to download, I had a paid version of this and its the best way to read newsfeeds that I have come across. It syncs with a web version so I can still access the my newsfeeds when I am away, and there are clients for other platforms including Windows Mobile.

3. Knox. I use this to keep all my important documents and things that I don’t want to go missing. It backups to my USB thumbdrive everyday, and its easy to backup online.

4. SSHFS and MacFuse. Easy easy way to mount external SSH shares onto the desktop.

5. Address book, Apple Mail and iPhoto. At first I stayed away from the integrated applications, but they are REALLY integrated, and work so well together the extra functionality that you get from using them together is well worth the switch.

6. Adium. The best chat client that I have found for instant messaging on OS X. It doesn’t have all the features that individual applications might have (voice and webcam for one). But sometimes you just don’t need that, and really skype running along side is better for this. If it had all the features of skype it would be really the true all rounder.

7. Unison. I use Usenet alot. Its a great news client. Perhaps the best on any platform at the moment.

8. Textmate. Perhaps the best editor on OS X – I tried many until I paid up and bought Textmate. Its strong bundles and integration with svn plus the nice support for Django wins for me.

9. MarsEdit. Great blog posting tool.

10. Versions. This is quite new but it makes working with SVN just a little easier.


-image-Installing ffmpeg on OS X

This is a work in progress for installing ffmpeg on OSX by a custom compile

This is another thing that I have needed to do and decided to put what I am doing in a blog post, I might need it in the future or it might be helpful for others.

So firstly download LAME – this is needed for supporting MP3 audio files, such as those in FLV and also for vorbis support. LAME src can be located on sourceforge.

Unarchive the file (lame-3.98b6 at the time of writing )

cd lame-3.98b6
./configure --with-vorbis
make
sudo make install

The first time I did this I noticed a problem running make so I “make clean” and then went through the process again.

Next up we want support for AAC audio, and you can get packages called FAAD2 and FAAC from www.audiocoding.com/downloads.html for these and then unarchive them ( FAAD 2.6.1 and FAAC 1.26 at the time of writing).

cd faad2
autoreconf -vif
./configure --without-bmp --without-xmms --without-drm --without-mpeg4ip
make
sudo make install

Then faac

cd faac
./bootstrap
./configure --with-libmp4v2
make
sudo make install

x264 ( http://www.videolan.org/developers/x264.html )

cd x264
./configure --enable-pthread --enable-pic
make
make install

liba52

wget http://liba52.sourceforge.net/files/a52dec-snapshot.tar.gz
tar -xzvf a52dec-snapshot.tar.gz
cd a52dec-0.7.5-cvs/
./configure
./configure --enable-libmp3lame --enable-x264 --enable-liba52 --enable-gpl

And for amr_wb and amr_nb go into their directories and do the following:

./configure
make clean
make -j2 > /dev/null
sudo make install

Basically the -j2 switch is for enabling dual cores when compiling.

Now we get around to compiling ffmpeg itself:

./configure --enable-shared --disable-mmx --enable-libmp3lame --enable-libamr-wb --enable-libamr-nb --enable-nonfree --disable-vhook
make clean
make -j2 > /dev/null
sudo make install

And that should be it though I am currently trying this configuration and it seems to work well:

./configure --enable-shared --disable-mmx --enable-libmp3lame --enable-libamr-wb --enable-libamr-nb --enable-nonfree --enable-libx264 --enable-libfaad --enable-gpl --disable-vhook