Thursday, February 7, 2013

New Website!

I have a proper website now. (Hosted on a Raspberry Pi in my lounge room. =D). I'll probably start migrating some of my old posts here over to my new site. You can check it out at

Saturday, October 6, 2012

Steam for Windows on Mac in Wine

I use a Mac, but occasionally I want to run Windows games. I usually try to use Wine if possible, because it means I don't have to reboot to run my games. The other day my friend told me about a cool sounding game on Steam, and suggested I play the demo. The catch? It was only released for Windows. I decided to try installing Steam for Windows in Wine, but every time I tried to run the installer, it gave me the following error message "wine: Bad EXE format for Z: /path/to/SteamInstall.msi"... At first I thought it was a problem with Wine, but after some research I found the following forum page, in which a helpful person called "schtufbox" gave instructions on how to execute .msi files in Wine.

Apparently (and this worked!) instead of typing "wine ./file.msi", you type "wine msiexec /i file.msi". I tried it and it worked! Yay!

Monday, June 4, 2012

Disk image: No mountable file systems

I downloaded a disk image recently, but it refused to mount, complaining that there were "no mountable file systems". I tried redownloading it, because I knew that this error can be due to incomplete or corrupted disk images, but it still refused to open. After reading through countless webpages which told me to use long convoluted methods and third party data recovery software, I finally found a nice short Terminal command that worked on this site. The command was

hdiutil convert /path/to/yourfile.dmg -format UDRW -o newfilename.dmg

After using this command, a new disk image was created, which worked when I clicked on it. =D
I've recently written a couple of programs using Python. They are both text based programs designed to be run from a command line. The first is designed to help learn about the charges on common ions, and can be downloaded from here. The second is a command line based version of Minesweeper, and can be downloaded from here. Both programs are very much alpha versions, but they should work. You will need Python 3 to run them, which can be downloaded from here. NOTE: The Minesweeper game relies on the *nix curses module, and won't work on Windows.

Wednesday, October 12, 2011

History and Memory: Mark Baker's Fiftieth Gate.

I've uploaded some notes on Mark Baker's Fiftieth Gate here, in case anyone studying the HSC module "History and Memory" wants to look at them.

Problems updating iPod Touch 4th Gen to iOS 5

I downloaded the new iOS 5 update for my iPod Touch this morning, but when I tried to install the update, it told me that it could not restore, as there was an internal error. I hit google, and looked through numerous potential fixes, before finally deciding that I would have to force restore it. As a last resort, before force restoring, I decided to try a different cable, as the one I was using was a little frayed. I was pleasantly surprised when the iPod happily backed up and restored. The moral is of course, that if your iPod isn't updating properly, there might be a problem with your cable.

Tuesday, July 19, 2011

Spoofing a MAC address in Snow Leopard (Mac OS X 10.6)

I heard that it was quite easy to spoof a MAC address in terminal, and thought it would be interesting to try it out on my own network. After reading through a number of sites which listed commands for 10.4, I finally found a method that works in 10.6. This worked for both wifi and ethernet.

  • First disconnect from the network if you are already connected. For ethernet, this involves disconnecting the cable. For wifi, it may be a bit trickier if you have instructed your computer to remember your passwords, as it will keep reconnecting, and there is no disconnect button. You can't just turn the wifi off either, as ifconfig will return an error. There are two possible methods for disconnecting from a wifi network without turning it off – the Terminal way, and the non-Terminal way. The Terminal way is easiest, and I don't know why you'd use the other method, unless you really hate using terminal. (Which is pointless, because you need Terminal to do the next steps anyway...)
  • The Terminal method is to copy the following into terminal, press return, enter your password, and press return again:
    • sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -z
  • The non terminal way to disconnect from a wifi network is to go to the wifi menu in the menu bar, and select "Join Other Network..." (This may seem counter intuitive,  but bear with me.) A dialogue box will appear asking you to enter a network name. Instead of following instructions, click the button in the lower left that says "Show Networks". This will display a dialogue box with all the networks available. Select the network that your computer keeps wanting to join, but type a random (wrong) password into the password box and press join. The computer will try to connect, but will be unable to. After a message appears informing you that your computer cannot connect, press cancel, and proceed to the next step. (If your computer reconnects to a different wifi network, repeat these steps with that wifi network, until it is not connected to any wifi network.
  • Now that you are disconnected from the network, open Terminal, and type the following command to find out what your current MAC address is:
    • For ethernet, type: ifconfig en0
    • For wifi, type: ifconfig en1
  • In both cases, the current MAC address will be found after the word "ether", and will look something like this: 00:11:22:33:44:55
    • MAC addresses are hexadecimal, so they can include letters from a to f
  • Record your current MAC address somewhere, in case you want to change it back.
  • Assuming you know what MAC address you want to spoof, type the following command, replacing 00:11:22:33:44:55 with the MAC address you plan to spoof.
    • For ethernet, type: sudo ifconfig en0 lladdr 00:11:22:33:44:55
    • For wifi, type: sudo ifconfig en1 lladdr 00:11:22:33:44:55
    • When you press Return, the computer will ask for your password. Enter your password, and press return. The MAC address should be changed. To confirm, type ifconfig en0 for ethernet, or ifconfig en1 for wifi.
  • Your computer should now be displaying a different MAC address. Note that the MAC address will reset to the original MAC address on restart.
If this didn't work, go back and make sure that you are disconnected from all networks. Ethernet cables should be completely unplugged, and wifi should be on, but not connected to anything.