Weewar

September 17th, 2007

Weewarкомпютри втора употреба is a fantastic waste of time - but not too much time that you don’t get any work done when you inevitably become addicted.

Its a turn based strategy game, so games can go on for weeks but you can spend five minutes making your moves and then get back to work while others take their turn.

In my first attempt at writing facebook applications, I’ve melded together the facebook and weewar APIs to create a widget which displays your weewar stats and current games on your profile. Links to weewar.com on the widget are also accredited to you as the referrer, which means you gain the points needed to become a Weewar Pro!

Facebook app

Weewar is currently invite only. If anyone wants an invite, leave a comment.

Check UK National Lottery script

June 5th, 2007

This script checks a feed of the UK National Lottery results and checks it against your numbers. It then saves a text file informing you how many numbers you have matched and I use GeekTool to display that information on my desktop.

I also use a program called Cronnix to run this script at various intervals the day after the draw (osascript “/Library/Scripts/lotto.scpt”).

lotto.scpt

iGroupChat

June 3rd, 2007

This little app that I wrote might prove handy to someone - especially those who are trying out Friday’s Poker post.

iGroupChat

You may know that when using iChat over the local network with Bonjour there is no facility for a group chat so I wrote iGroupChat. You type the message and then hit return and the message is sent to everyone in the iChat Bonjour buddy list who’s status is Available. “>>” preceeds the message so people can tell that it is a group message.

We have noticed recently that it is not 100% reliable, some people get missed out - quitting and restart that persons iChat seems to work but I’m not sure why its not working every time.

Local Network Texas Hold’em Poker with folders and applescripts

June 1st, 2007

I set this up because I was becoming increasingly mythed about the lack of small and simple network games that can be played in an office environment without the risk of being sacked.

The idea is quite simple, though I will probably complicate things more than necessary, but here goes . . .

The idea is that all the players connect to a hard drive (or maybe a network server), on this drive is a folder called Poker that contains a number of subfolders. One subfolder is called Deck, this folder contains 52 images of each card in a standard deck. Each player has their own folder in the Players folder, and each players folder contains a Hand folder and a Chips folder. There is also a Community Cards folder which everyone can see.
Layout of the folders for poker

At the start of a game, chips (image files again) are shared out into everyone’s Chips folder. Then the Deal applescript is run by the dealer, this script first deals two player’s cards to their Hand folder. A round of betting is made by dragging chips into the Pot folder and iChat Bonjour is used to announce what you are betting.

When everyone has bet, the Deal script is run again, this time dealing the first three cards to the Community Cards folder - this is followed by another round of betting.

After all the community cards are dealt and all the bets are made, there is the showdown via iChat, the winner drags the chips from the Pot to their own Chips folder and everyone drags their cards (not forgetting the community cards) back to the Deck ready for another game.

There is a little bit of set up involved. The Deal script needs to be opened in Script Editor and the possiblePlayers property set up with each players name. A folder for each player needs to be set up in Players (the name must match the name in the Deal script), each players folder needs to contain a folder called Hand and a folder called Chips (there is also a script in the Chips folder that can be double clicked and will add up the value of the chips in this folder).

The property theGame needs to be edited to provide the path to the Poker folder (this is an applescript path - /Volumes/ not required). There is another script which updates the name of a file called TOTAL - $0 in the Pot folder with the value of the chips in the pot. This script needs to be moved to /Library/Scripts/Folder Action Scripts/ and you will need to attach this as a folder action to the Pot folder.

I think that’s about it. Leave a comment if it doesn’t work or if I’ve missed anything and I will try and sort it out. Here’s the download. Enjoy!

Poker.zip (4.1Mb)

Source Code and Sh*t

June 1st, 2007

This is going to brief as its my second attempt to write this post - the first was interrupted by a system wide crash. (Mac’s don’t crash my arse!)

I’ve been trying to learn cocoa and have found developers blogs and especially their sample code to be very helpful, so I’ve decided to post my collection of (probably useless to most) scripts and source code.

So you can expect to see a few test projects and scripts posted as soon as I sort through all the crap.

Spam On!

May 3rd, 2006

**********Start moan*********

Does anyone have a list of spam keywords I can add to the Wordpress blacklist of words it will not allow in posts?

This is getting ridiculous. The more I add to the blacklist, the more seem to get through.

**********Moan over**********

A Car Alarm for your iBook

April 10th, 2006

There has been alot of interest lately in an app called iAlertU, an alarm for your MacBook Pro, and a video showing it in action.

I had been working on a similar project for fun and for my own use, however, iAlertU doesn’t currently work with iBooks or PowerBooks, so I thought people might be interested in this.

In the stuffit file is a version for the iBook, a version for the Powerbook and also it’s source (an Xcode project). It may also work on the MacBook Pro, but I am not able to test that.

It differs from iAlertU in that there is obviously no remote activation, though this could be set up to work from a bluetooth phone using an app like the excellent Romeo. To activate the alarm simply double click the icon, to deactivate, quit the app.

Uses motion.c. Copyright Christian Klein.

Click here to download app and source (zipped)
Click here to download app and source (stuffed)

IP Address Confusion

November 11th, 2005

While checking out my site stats to see how many people have visited, downloaded iQuotes, and how many people have accessed the RSS feed of quotes, I noticed that I had over 20,000 hits from one IP address. The next highest number of hits for one IP address is only 2,500, and the next 263.

Obviously, I felt compelled to find out who it was so I googled for IP address Trace and entered the address. The name came back as 17-202-13-240.apple.com. A traceroute tells me that it passes through San Jose at some point.

Now I don’t fully understand the IP address so I wondered if anyone could enlighten me on the significance of this.

Is it really Steve Jobs, sitting at his desk at 1 Infinite Loop reminiscing about the old times while watching my screensaver on his Intel Powerbook, or is there another explanation for this?

Quartz on your Desktop

November 10th, 2005


While researching Quartz Composer I came across very cool application called Quartz Desktop.

It enables you to play Quartz Compositions, such as iQuotes and Apple’s RSS screensaver.

Steve

iQuotes - Steve Jobs Quote Screensaver

November 8th, 2005


Collated together in a stylish, Apple-esque screen saver - the best quotes from Apple CEO, Steve Jobs.

Mac OS X 10.4 Only. Sorry.
And an internet connection is needed.

Download (.zip)
Alternative Download (.sit)
or download the quartz composer file that needs to be dropped into your Library/Screen Savers folder. Then you can go to System Preferences - Desktop and Screensaver and select the iQuotes screensaver.
Download iQuotes.qtz

Please donate to help with my bandwidth and future development.
Thanks.