Archive for January, 2009

Wi-Fi in Accommodation

I was talking to Michael yesterday, and we decided (I think I got this right) that university was really pretty cool because at times we actually get a say in the way things work. Today, that was verified as I got this reply back from the college administrator:

WiFi in Accommodation

I was all ready to write this post dripping with praise for the college, and the university and whatever, except I just got another reply explaining that we don’t have Wi-Fi because of the prohibitive cost. Really, "prohibitive cost"?

Campus Wi-Fi

The pink is where there’s currently Wi-Fi available on campus. The blue is where I asked for it. How is that more expensive to the point where it’s not possible?

Part of me is tempted to try and do something with this (meetings, petitions, voting?) but another part of me thinks it isn’t important enough to waste time on.

Hack Day ‘08

The Last.fm Hack Day took place last month, and I can’t believe I didn’t post anything about it at the time.

Last.fm Hack Day

It was a great day spent (for me) learning the basics of Python and, a technical term here, "pissing about" with the Last.fm API. There was a Microsoft Surface and Xboxes on hand to entertain us, and plenty of free food and drink.

While I didn’t accomplish anything particularly amazing (at the time, it was noted that you could do everything I managed with the actual Last.fm website), the environment was incredibly conducive to producing good code. Plus, some of the people who were actually trying (Your Next Favourite Band?) made some great little things. See the official Last.fm blog post for links to all the apps.

Russ (from Last.fm) and I (and many, many others) both have some photos on Flickr, though his are just a little better. You can see a video that was created of the day on the group page, and I’ve put a copy on S3 in case the original disappears. And yes, unfortunately I do make an appearance… :D

OS X Leopard on a Samsung NC10 Netbook

And now, something I’ve wanted to try for about two weeks now: installing Mac OS X Leopard on the Samsung NC10 Netbook. I followed a guide from Wired to try and get me through the process. On the "things you need" list, we have:

  • A Samsung NC10 (or similar)
  • A USB drive of some description
  • A copy of OSX86 courtesy of The Pirate Bay
  • The OSX86 tools from Wired

Master Boot Record

Format the USB drive as Mac OS X Extended (Journaled) with "Master Boot Record" selected from the options drop-down.

Choose to restore the OSX86 ISO that you’ve downloaded via BitTorrent to the newly formatted USB drive.

Use the OSX86Tools application to set up the USB drive: click Install EFI/Run FDISK, and then choose "Run Script". Enter your password in the terminal window that appears, then choose 4 to run Chameleon EFI. You’ll have to select which disk and partition you want it installed on. This is the part I had a little issue with – I had to use the exact version that Wired provides (don’t update if it prompts you to).

Eject the drive from your Mac, connect it to the NC10. Boot from the drive, and go through the fairly mundane install process (hint: it’s just like every other install of OS X, pretty much). Reboot, and you have a copy of Leopard running on non-Apple hardware.

This is another place where I had a problem. Because I’ve got Ubuntu installed on the same machine, I’m using Grub to choose which partition to boot to. In Ubuntu, you can cd /boot/grub/ and edit the file called menu.lst. Copy the layout of one of the existing ones (down the bottom), replacing the location of that partition with the location of your OS X partition.

And there you have it. A lot works out the box, including Bluetooth; not included is support for USB and Airport, but that may be forthcoming. One thing I was concerned about was that the USB ports might not work in Windows after installing Leopard either (the Wired article is ambiguous) but they do. This video’s a little crummy, but I needed something to make this post interesting (and distract me from the fact that I’ve been in my room revising for a few days):


Hackintosh from Alex Muller on Vimeo.

PHP as a Tiny Database

Here’s a little bit of code I put together this evening to use PHP as a kind of miniscule database. OK, so that’s a bit of a crap analogy; but hopefully the idea makes sense…

Oh, and also: it doesn’t have a front end of any kind. Because I’m lazy (and I think it’s impossible).

Essentially, the code below generates a random number between 1 and 2 (inclusive), and decides which of the selection of variables should be used from $theURL and $theAuthor.

<?php
  $thePhoto = mt_rand(1, 2);
  $theURL = ‘url’ . $thePhoto;
  $theAuthor = ‘author’ . $thePhoto;
  $url1 = ‘http://flickr.com/photos/hortulus_aptus/2367460316/’;
  $author1 = ‘Seán A. O'Hara’;
  $url2 = ‘http://flickr.com/photos/jule_berlin/571121649/’;
  $author2 = ‘Jule Berlin’;
?>

The parameters generated above are then placed into index.php using the following syntax:

<img src=”http://mullr.foo/img<?php echo $thePhoto; ?>.jpg” width=”340px” />
<p><a href=”<?php echo $$theURL; ?>“>Image</a> by <?php echo $$theAuthor; ?></p>

The procedure for increasing the number of images in the "database" is relatively simple: upload a new image with the name img#.jpg to the directory, and add $url# and $author# to the PHP file. Oh, and then increase the range of random numbers that the script can create.

I’m pretty much completely new to this whole server-side scripting thing, so this post is as much about you telling me a better way to do it as it is me sharing this "achievement". In any case, I’m pretty happy – it seems like a nice way of doing things and only took me an hour to get my head round.

Tilt-Shift

I’ve wished for a while that I had a camera and lens that could do tilt-shift photography, but I think I’ve found a site that will tide me over until I win the lottery or get a proper job.

Kevin Spencer linked to tiltshiftmaker.com, a site to let you upload photos and have them converted to look like they were originally taken in a tilt-shift style. Obviously they’re not going to look nearly as good as a proper camera, and I did find myself getting bored after a couple of different photos (as Kev points out), but it’s nice to spend a couple of minutes messing about with. Here’s the one that came out best for me:

Tilt-Shift Nimes

Perceptions

I find it really interesting hearing people’s thoughts on copyright, legality and entitlement. The red is me.

[03/01 00:56:51] limewire has free music
[03/01 00:57:05] limewire’s illegal
[03/01 00:57:37] last fm is doing exactly the same as limewire so technically it should b too
[03/01 00:57:54] except that they pay the artists… :)
[03/01 00:58:32] theres 1 positve

To summarise the conversation: It’s a good thing Last.fm pays artists; people like artists, and music, and want them to stick around (shocking!). Last.fm isn’t fluid enough at the moment, and is losing possible users to (loosely defined) piracy because of it. And it’s not obvious that Last.fm is any more legal than Limewire.

The reason this is being dragged up now is because I received an invitation for Spotify from Ernesto this evening. The complaints I’ve heard about Last.fm are that playing a song sometimes takes too long and it simply doesn’t have the catalog required to keep people interested. Spotify, it seems, solves these problems. After doing a couple of searches with people much more into shit popular music than I am, it passes the catalog test. It also passes the speed test, with songs playing instantly – if you put this in front of someone, I’m not sure it would be immediately apparently that it’s an online service.

The best news? At the end of last month, Spotify announced that they support scrobbling to Last.fm directly from the preferences of their application. The two services can play brilliantly together. Whilst I won’t be paying the £10 a month for Spotify’s premium service (hell, the adverts aren’t even intrusive or often), the UK-based scrobbling site should be glad to hear that they won’t be losing the £1.50 I pay them per month, either.

2009

Happy New Year all!

Seeing as New Year’s Day is a quiet one in my house, I thought it’d be worth doing a little bit of work on the blog. New year, and a few tweaks to the way it looks.

New Blog

Have a great day, week, month and year. All the best.