Posted by: Oliver | Friday, 1st May, 2009

Installing Thrift on Mac OS X

First, Thrift requires Boost, which is not included in OS X by default. Go to the Boost site and download the latest version. Unzip and open Terminal for that folder. The configure script doesn’t seem to work, so we need to work around this. Follow these steps in terminal to install it:

cd ./tools/jam/src/
./build.sh
cp bin.macosxx86/bjam ../../../
cd ../../../
./bjam --prefix=/usr/local
./bjam install

Next we need to also get pkgconfig, which also isn’t on OS X by default. This assumes MacPorts is already installed:

port install pkgconfig

I’m using this for Facebook Puzzles, so I downloaded the recommended archived version of Thrift from here (direct link) but you can get the latest version from the Thrift download page.

Unzip the archive and open a Terminal window in this folder and do the following commands:

cp /opt/local/share/aclocal/pkg.m4 aclocal
./bootstrap.sh
./configure
make
make install

Now that thrift is installed, we can make the Thrift scripts for our chosen language. I started by using this for the Simon Says Facebook Puzzle, and I wanted to do it in python, so my Terminal commands looked like:

thrift --gen py simonsays.thrift

Also note that to get my python program to run, I needed to also copy the Thrift python folder to my working directory.

Posted by: Oliver | Sunday, 26th April, 2009

Triple boot Mac OS X, Windows XP and Ubuntu 9.04, on a Mac Pro

My goal was to triple boot Mac OS X, Ubuntu 9.04 (Jaunty), and Windows XP on a single HDD. I started with a well used Mac OS X 10.5 install, totally up to date. I then had an also well used Windows XP install that I already had working with Bootcamp, Parallels and VMWare. Using Mac Disk Utility (Applications>Utilities>Disk Utility) I tried to  make the current partition smaller by roughly 50GB as well as making a new partition in that space. Clicking apply produced a never-ending progress bar that I left “working” for more than half an hour. I became suspicios and google’d to find that Disk Utility does that sometimes, so I quit and tried these operations one at a time. Making the Macintosh HD partition smaller took a few minutes to apply, and then I added the other partition. Each of these gave an actual progress bar as opposed to the previous “working” bar.

I then downloaded the 64 bit version of Ubuntu 9.04, that was labelled as amd64, even though it is compatible with the Intel 64 bit chipsets. I was confused by this because I had previously seen 64 bit downloads listed as either x64 or x86_64, but apparently amd64 now refers to all of these, just because AMD were the first to release 64 bit chips. After burning the image using Toast, I restarted and held ‘c’ when my Mac Pro was booting so that it would boot from the CD. When the CD booted, I found that my “Apple keyboard with Numeric Keypad” (version at time of writing) didn’t seem to be recognised, so the keys were not working. Very strangely, when I connected an older keyboard in a front USB port, the newer one’s keys were now working. I would, as such, advise anyone trying this to have another keyboard close by, just in case, and good luck to anyone that this happens to and that doesn’t have a spare USB keyboard handy…

I then followed the simple installation wizard, except for two parts; the drive to install to, and the final option before clicking “Install”. The default in the installation when selecting a drive is to use the whole HDD. This would be a very bad idea! That would delete your OS X installation, which, I assume, you would not want to do. Choose “manual” and click next, which should then give you a window to choose which drive to install to. Given the same circumstances as my attempt, it would be safe to assume that you should be choosing “sda3″ which should be “HFS+” and using a minimal amount of HDD space already. You then want to format this as ext4. There is an ext2/3 driver for OS X (ext2fsx), but I was not able to mount the drive on a fully up to date Intel Mac Pro(1,1). I spent a lot of time on this, reformatting quite a number of times, but couldn’t get it to work. I read that it’s incompatible with Leopard on Intel, whihc is a shame, and I don’t see it being updated since the program hasn’t had a revision since 2006. I did not create a swap partition at this point and ignored the warning, but other users may want to do this (Keep in mind that it is possible to create a swap file on the partition later). You will also want to tick the box to format, and then choose the mount point as “/”. Follow the instructions up until the final “Install” button, which you should then click the “Advanced” button just above it, and choose to install GRUB on the same partition on which you are installing Ubuntu (for me, and I would assume most people, if any following this guide, was sda3).

At this point, I was not able to boot into Windows and neither Parallels/VMWare were working. If you don’t have it already, you should get MacFuse and ntfs-3g which will allow you to read/write your NTFS partition for Windows. Open boot.ini in TextEdit from the root directory of this drive, and change “partition(3)” to “partition(4)” wherever it appears. You then need to download rEFIt and burn a CD to boot from. Hold ‘c’ on boot to bring up rEFIt’s menu, and then choose to check the partition tables when it boots, and confirm if asked to fix it. If you like this rEFIt menu, then you can install that to the MBR from within OS X, but I prefer not having “rEFIt” written across the top whenever I wanted to change what OS I was booting to.

Remove the rEFIt CD and reboot the computer holding ‘alt’ and choose “Windows” from the two options that come up. This will either boot to Windows XP or Ubuntu’s boot-loader, GRUB. The first time I did this, it went to Windows XP, but the second time it went to GRUB (which I would prefer). You can then add Ubuntu to Windows XP’s boot-loader using bootpart, or you can add Windows XP to GRUB. This is a little annoying to have to choose “Windows” from OS X boot-loader and then being prompted again for Windows XP or Ubuntu, but I prefer that to rEFIt’s boot menu.

After booting into Ubuntu, it almost all worked straight away except for the wireless drivers, which I had to activate by logging in and then going to System>Administration>Hardware Drivers, click on “activate” for the wireless driver and then restart to be able to connect to my wireless network.

First impressions: “Wow, this is fast…”

Posted by: Oliver | Sunday, 14th September, 2008

Morgan Page – The Longest Road (Deadmau5 Remix)

Once again I have found another awesome song through Birago Jones‘ Podcast (Syndicated Beats); The Longest Road by Morgan Page (the Deadmau5 Remix is my favourite). Finding this has once again reinforced my feeling of how intertwined this genre of music is, because I recently became aware of (and a fan of) Deadmau5 (MySpace) through other means.

I think that even though this is only the second song that I have posted about so far, that there is a bit of a trend for electronic music with an deep beat, cool tune, beautiful female voice with awesome lyrics. I wonder if the next song that I’m infatuated enough about to post on my blog about will conform.

Read More…

Posted by: Oliver | Thursday, 4th September, 2008

ABN

I had a meeting with a Tax Agent (Ami Criticos) this-afternoon, embarrassingly, for the last 5 years of tax, and to set up an ABN. I have to admit, the reason for not doing my tax for the first 3 years, was that combined, they were still less than $250. I don’t have an excuse for the last two years, as each they were easily more than the 3 years prior combined.

The next step was to set up the ABN, which I had looked at doing by myself a few months ago, but didn’t want to do the wrong thing, seeing as, if I remember correctly, there were a whole bunch of different types, each with numerous different options. This only took a couple of minutes for the Tax Agent to set up, obviously, because she knew exactly what type and options I needed. She then recommended a nice free Software Application from the Australian Tax Office, eRecord, which is available for both Apple Mac OS X and Microsoft Windows.

Posted by: Oliver | Thursday, 28th August, 2008

Internet Explorer 8

While looking up links for my previous post, I noticed that Beta 2 of Internet Explorer 8 was available. I hadn’t bothered to look at Beta 1, and I had a quick look at some information about Beta 2, and it appears that, unless I am mistaken, it was only released yesterday.

One of it’s “Top Features” (strangely enough) is it’s “Compatibility View” that has the sole purpose of making it display web pages “designed for older browsers” (build with hacks to make it display properly in IE7). I tested this feature, and have found that IE8b2 in Compatibility Mode still does not display exactly the same as IE7. Isn’t it fantastic that it installs over the top of IE7! That was sarcasm, by the way.

Being a web developer, this is extremely annoying that apparently, I not only have to test IE6 and IE7, and now IE8, but also IE8 in Compatibility Mode… After quick searching, I was not able to find a standalone version of IE7 like I was for previous versions (Multiple IEs). I can only hope that by the time IE8 goes live, that there will be a standalone version of IE7 available (or, ideally, a forced upgrade to IE8, but that’s never going to happen).

Posted by: Oliver | Tuesday, 26th August, 2008

PHP Browser Detection

I was looking at ways to make web sites look the same in all browsers, and I came across a handy CSS hacks page at Web Devout. Some of this I already knew and had used, unfortunately including those that aren’t recommended. Since I am a big fan of valid CSS and Strict XHTML, I wanted a way that I could easily apply different CSS to specific browsers. After finding no simple JavaScript options, I searched for PHP options and came across a Drupal page that offered a “PHP Snippet” that I thought I could work with. As I posted on the site, I tested what the contents of the $_SERVER['HTTP_USER_AGENT'] variable were in the browsers that I would want to look the same, Safari, Firefox, Internet Explorer (6 and 7) and Opera.

Read More…

Posted by: Oliver | Sunday, 24th August, 2008

town last night

I went out into town last night, not drinking because of my antibiotics. I saw Chelsea and Caitlin again and had a good time, apart from AJ being an absolute dick… AJ and I were going to stay at a friends place, but we went to McDonald’s first and then walked the girls back to their car, but we ended up chatting to them for ages and then falling asleep in their car.

We went to McDonald’s again in the morning with the purpose to use the toilets, which I misunderstood Chelsea, thinking she wanted to go through the drive-through, coining the term “drive-through-toilet”. This McDonald’s trip was at about 7am, and after refuelling with hashbrowns, AJ and I were dropped off at out friends place to get our cars. After getting home, I then slept until 5pm.

Posted by: Oliver | Saturday, 23rd August, 2008

Ear infection

I woke up this morning feeling like a knitting needle had been shoved about 2 inches into my left ear. I had a couple of Panadol, but it was still hurting a couple of hours later, but it was too late for normal GP, so I went to GP Access at Belmont Hospital. It was as I assumed, I had an ear infection. He gave me a prescription for Amoxycillin 500g capsules, 3 per day for 2 weeks. Unfortunately I missed out on a friendly soccer game with another valentine team, which my team apparently won 7-1. Don’t think I will be able to go to Taekwondo this week either…

Posted by: Oliver | Sunday, 17th August, 2008

Broken leg

I get home from soccer and I am about to have a nap before heading out last night, and I get a call from Josh, a friend of mine that I went to school with, that is also on my brother, Iain’s, soccer team. I start the call with “Josh! How are you man? Haven’t heard from you in a while, what’s been happening?” to which I get a “uhh… you’re brother’s actually just broken his leg at soccer, we’re trying to call an ambulance now…”

Read More…

Posted by: Oliver | Saturday, 16th August, 2008

Soccer vs Dudley

It started off pretty dodgy, they got a player from their club that was going to play in the game after ours to referee, which seemed alright until he called half time 6 minutes early, not to mention he had to swap with some other guy half way through the second half to go and get changed for his game…

Read More…

Older Posts »

Categories