Your card has been captured

Irish Credit Unions recently announced that they would be rolling out an ATM system around the country. So far I’ve only seen one ATM. This one is in the Savoy in Cork and it looks like Credit Union members still haven’t got the hang of these pesky ATMs. It swallowed someone’s ATM card! Not a very successful start, eh?

Your card has been captured by the atm

How to replace and calibrate your new Macbook battery

Last week I bought a new Macbook battery from the Apple Store to replace the slightly aged one that came with the machine. I’m travelling shortly and I need enough juice to play MAME and Doom do some work while I sit in airports waiting for connecting flights.

Late last week a parcel came for me, my new battery! Here’s how I replaced the old battery and calibrated the new one, with nice pictures.

macbook battery box

Continue reading “How to replace and calibrate your new Macbook battery”

Ping. The ping heard across the world

If you’re wondering why trackbacks and pings aren’t working on your blog then you might want to do what I did earlier today: allow your blog to talk to other servers.

WordPress needs either allow_url_fopen to be set On or to have the Curl extension loaded. If you’re having problems receiving pings from other blogs then both of these are probably turned off or missing. Wouldn’t it be nice if Options->Discussion warned that pings wouldn’t work?

Look in your php.ini, or the output of phpinfo() to check for both. If you want to enable fopen, then the entry in php.ini should look like this:

;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On

I switched to Litespeed web server a while back and by default allow_url_fopen is set to Off and the curl library isn’t included. Check /opt/lsws/php/php.ini and make sure remote fopens are allowed!

Thanks Barry for helping me fix that.

PS. if you linked to this blog recently, feel free to save your post again. WordPress will ping my site again and this time the ping will get through.

Introduction to C64 demo coding

ozone
.C:2101   A9 3A      LDA #$3A
.C:2103   CD 12 D0   CMP $D012
.C:2106   D0 FB      BNE $2103
.C:2108   A2 09      LDX #$09
.C:210a   CA         DEX
.C:210b   D0 FD      BNE $210A
.C:210d   A2 00      LDX #$00
.C:210f   BD 00 09   LDA $0900,X
.C:2112   8D 21 D0   STA $D021
.C:2115   8D 20 D0   STA $D020
.C:2118   BC 00 0A   LDY $0A00,X
.C:211b   88         DEY
.C:211c   10 FD      BPL $211B
.C:211e   E8         INX
.C:211f   E0 65      CPX #$65
.C:2121   D0 EC      BNE $210F
.C:2123   A2 01      LDX #$01
.C:2125   CA         DEX
.C:2126   D0 FD      BNE $2125
.C:2128   A9 00      LDA #$00
.C:212a   8D 20 D0   STA $D020
.C:212d   AD 21 D0   LDA $D021

So, who knows what’s happening above? Come on, it’ll come back to you if you look at the screenshot! I found a great tutorial on C64 demo coding. Unfortunately it’s a 404 now, but Google cached it and I downloaded it here for safe keeping: intro-to-programming-c64-demos.html
Look for the part on $d012

$d012 might be the most important address of them all, when it comes to demo programming on the C-64. $d012 has two different functions:

* When read, it returns the number of the current raster line.
* When written, it is used to set the number of the line where the next raster interrupt will occur.

We’ll get back to raster interrupts later. You need to know about $d012 to understand them, so pay attention to the stuff in this section! The first item above is interesting, but it may not be obvious why it is interesting.

The current raster line is the line that is currently being redrawn on your screen. The whole screen is redrawn 50 times per second. Each time it is redrawn from top to bottom, from the left to the right. So, if you want something to happen 50 times per second, all you have to do is to check the current value of $d012, and when it reaches a certain value, call the routine that performs the desired task. When finished, go back to checking $d012.

That blew me away when I found out about that. You could literally change the background colour of the screen halfway down the screen, have multiple text and graphics modes, use more than the default 8 hardware sprites. The PC was disappointing in comparison.

That code above is for Justin who reminded me that Vice has an ASM monitor!

It's so hard to sell a laptop on eBay

Sometimes blog posts take on a life of their own. Occasionally they attract the wrong sort of attention. I made a brief post called, Laptop for sale back in 2003 and ever since that post has been collecting comments from Nigerian scammers. It’s bizarre.

Last month one of them got smart. They subscribed. Here’s the email Tobi sent me when he got the confirmation email from Feedburner.

laptop email

Being curious, I checked the email headers. Luckily, Yahoo records the IP of the user who sent the email:

Received: from [83.229.91.53] by web58309.mail.re3.yahoo.com via HTTP; Fri, 14 Dec 2007 19:23:22 PST

Armed with that bit of information, I checked out 83.229.91.53 only to discover he wasn’t in the grand old US of A at all! I was shocked!

inetnum: 83.229.89.0 – 83.229.91.255
org: ORG-SA410-RIPE
netname: Supernet
descr: Supernet
country: NG
admin-c: TS3788-RIPE
…….
[clipped for brevity]
…….
address: 8th Fl 21 Mobolaji Bank Anthony way
address: Ikeja Lagos
address: Nigeria

I toyed with the idea of stringing him along but it was the run up to Christmas and I never got around to it. I had to dig up the email this evening because this was too good not to share.

Anyone remember the 419 Monty Python sketch from a while back?

The Irish Army are staying alive in Lebanon

Staying alive, staying alive, Ah, ha, ha, ha, stayin alive.

This video is being investigated by Irish Military Police. I heard on the radio this morning that it’s unlikely that prosecutions will follow. Hopefully, because these guys have a great sense of humour! It must be good for morale too, especially in the face of road side bombs and resulting injuries.

Military police are investigating an internet video which appears to show members of the Defence Forces playacting with rifles while on peacekeeping duty in Lebanon last year.

The video, posted on YouTube, shows three soldiers with rifles dismounting from a personnel carrier and proceeding to jive to the Bee Gees song Stayin’ Alive.

I have to admit, the British Army did a great job with “Show me the way to Amarillo” ..

Can the US Army top either of those?

ladyproblems.com

When Aunt Irma visits the IT Crowd office it can only mean hilarious consequences for all involved. Even Roy and Moss suffer from menstrual cycle symptoms and grow irritable, delicate and emotional. Not to mention the breast tenderness..

It all blows up when Moss emails everyone he knows in the IT world asking, “Do we have PMT?” describing the symptoms in detail. Riots are the result and a website, ladyproblems.com is created!

ladyproblems.com

The producers of the show did actually register that domain, but it’s a shame they didn’t do anything with it. Even putting up a landing page with that image above on it would have been better. At least Warner tried a bit harder with “2 and a Half Men”, charlieharpersucks.com actually exists! Oh well.

Registrant:
FremantleMedia Limited
1 Stephen Street
London, London W1T 1AL
UK

Watch this episode on Youtube: part 1, part 2, part 3. (Watch the previous episode too, The Haunting of Bill Crouse. That was so funny I almost hurt myself laughing..)

On to series 2 of The IT Crowd, I hope there’ll be a third one!

Facebook advertising on a shoestring

You’ve got an interesting project to advertise but your advertising budget is, nil, nada, nothing. An empty box of air is worth more than you can spend on getting the word out.

That’s sort of what Frank said when he asked me (and I presume a number of his friends, the Facebook email is generic) to help get the word out about the new play in the Granary Theatre, They Never Froze Walt Disney.

I was wondering if you would help me out with an experiment… you may have noticed I am trying to get the word out about ‘They Never Froze Walt Disney’ – and I would love your help!

Would you mind changing your status on Facebook to read:

<your name> is letting people know about They Never Froze Walt Disney. See theatremakers. net for more details!

Always eager to help friends if I can, I updated my Facebook status. Will it help? Does anyone look at my profile? I doubt it, but it can’t hurt.

The latest teaser trailer is really, err, strange. Can’t we see a bit more please? TBH, it looks depressing!

Here’s what Frank said before the original production last year in the summer:

Funny and poignant, dark and yet light hearted, the writing is really tight and the story unfolds beautifully. Also the two performers (Jody O’Neill and John McCarthy) are excellent actors, and though I personally haven’t seen Jack Healy direct before he is extremely well known in the Cork theatre scene, and I have a lot of respect for him from acting with him and attending his workshops.

Check out my photos from one of Frank’s previous shows, The Importance of Being Earnest. We really enjoyed that show, but getting out to the theatre is a little harder to do these days with a small baby around!

They Never Froze Walt Disney
The Granary Theatre, Cork
8th-12th January at 8pm (preview January 7th)
Bookings & Info: 021 490 4275

Phoar! What a spike!

I released WP Super Cache 0.5.3 on Friday last. From the stats it looks like people are upgrading which is good news!

This version has a number of fixes and improvements:

  • If your blog is installed in a sub-directory you’ll want to upgrade. This version fixes the mod_rewrite rules that search for the cached files. If upgrading, make sure you delete the Super Cache rules so they’ll be upgraded. (Thanks Otto42)
  • With a click of a link in the backend page you can view your mod_rewrite rules to check that they are ok. This may help the adventurous who want to upgrade those rules manually too.
  • The plugin now warns if your blog’s root directory is writeable. Most of the time there’s absolutely no reason for this so it’s good to be reminded to fix it.
  • Check that $mutex is set. This is really only useful if your server is borked and the filesystem is mounted read-only but it’s good to be complete.

Wondering about the title? Check out this traffic graph Scott Beale posted a few weeks ago and you’ll understand. One of his posts hit the front page of Digg (twice) then Slashdot.org, and was covered by lots of other blogs and media. Wow.

On December 12th our blog hit a record high of 222,523 views in one day.

Best Buy Cease & Desist Traffic Stats

Apple Store Promotion Code

So I was looking for a new battery for my Apple Macbook laptop and popped on over to the online Apple Store, picked up the battery, filled in my credit card details and then I was presented with this tempting textbox.

Apple Store Promotion Code

Hmm, could I save a few quid if I had a promotion code? I went searching for one as I’ve had luck elsewhere saving a bit of money online. Clicking on the first link appeared to be a forum thread. It quickly became obvious that lots of people were in the same boat, and judging by the 51 pages of posts by “macrumors newbie” status users they’re a lot more desperate than I am.

Oh well. The battery was €139, including €24 VAT which isn’t too bad. Should arrive in a few days time. I’m using Coconut Battery again to monitor battery usage, but this time I’ll try the battery calibration techniques on the new battery first.

PromoCode Needed!
I got some money for Xmas and i want to buy a macbook at the apple.com store.

Can somebody please send me a promocode ?? Fast?

Looks like someone was offering promotion codes to the first 2 to PM him.

Apple is folding it’s biz agent program at the end of 2007. As a going away present, I’m putting my last two codes out there for you, dear reader.

The fine print:

* They expire 12/28 (yeah, that’s tomorrow)
* They are NOT good in the ed store
* They are NOT good if your company already as a deal with Apple
* They ARE good for refurbs

Please don’t ask for it if you can’t use it. If you CAN make use of it, PM me and I’ll send it your way!