2010
December
- Wills & Kate unofficial commemorative mug by Chris Shipton
I ordered a nice Wills & Kate royal engagement commemorative mug by Chris Shipton (www.chrisshipton.com) from Zazzle. It arrived today. The mug quality is really nice. Some unpacking shots will follow, just to keep Chris happy - I think I’m the first person to have one of these!
- A simple solution for a jQuery animation loop memory leak
I’m probably stating something very obvious to everybody, but this is something that caused me a couple of hours of confusion. When creating a new slightly-fancier page to be displayed on omgmog.net I had a problem in that after a certain amount of time the browser would become unresponsive (or in Google Chrome the page would die - but I love how Google Chrome handles this). The problem I soon realised was in my animation loop. I’ve got a couple of lines of jQuery that move some elements on the page around randomly, to give a floating effect. The original code was as follows: $("h1 span").not("#h1p3").everyTime(0,function(){ $(this).animate({'margin-left':rand_no(),'margin-top':rand_no()}); }); It turns out the problem with this code is that the animation was looping before it had completed, so the browser presumably is stacking up all of these $().animate(); functions, which in turn caused the browser to become unresponsive. To remedy this, I specified a time for the $().animation(); function, and set the $().everyTime(); timeout to slightly longer than this: $("h1 span").not("#h1p3").everyTime(500,function(){ $(this).animate({'margin-left':rand_no(),'margin-top':rand_no()},490); }); With these small changes in place, it seems my problem is solved! I don’t have any “lessons learned” speech to close the post with, it’s just something that I found interesting :)
October
- Using Greasemonkey scripts with Google Chrome
This isn’t new news, but it’s something I’ve found quite useful. You can use userscripts created for Firefox/Greasemonkey in Google Chrome. Many of the scripts that you can find over on userscripts.org can be used effortlessly by Google Chrome, and once installed can be disabled/uninstalled from the Extensions tab.
- Waka Waka - Pacman Moleskine! and some Objective-C
Today my Pacman Moleskine arrived - I’m pretty excited, but I won’t be using it until I fill my regular lined Moleskine. I’ve been learning Objective-C along with @tmayr, so far covering just basic things such as processing user input and displaying output, using Cocoa/Interface Builder. Most recently we’ve been looking at filesystem things. I’ll probably post some of the haphazard things I’ve put together here eventually. Some pictures of the Pacman Moleskine… Unable to recover the image :(
- Minecraft and cinnamon coffee
A typical weekday for me: 7:30 wake up 7:31 check email 7:32 shower, eat, leave the house 8:30 arrive at work 12:30 lunch 1:30 work some more 5:00 leave work 6:00 get home, eat 7:00 - 12:16 start up minecraft … … 1:00 go to sleep Today would have been no different, except I’ve had to be productive this evening. Anyway, productivity as it is, procrastination rearing its ugly head I decided to try out some new plugins on my minecraft server.. The server is already running Hey0’s amazing server GUI/wrapper, which adds plugin functionality and a whole host of other awesomeness (such as kits and spawns) This plugin I was using (WorldEdit) allows you to edit areas of the map en masse - so after generating a bunch of huge glass spheres, making floating biodomes containing water, and even making underwater glass biodomes containing trees, I got bored and decided to mess with TNT. Now, by default TNT mass spawning is (quite rightfully) disabled with this plugin - but I figured out where to enable it, and so went about creating a region that was 20 blocks wide, 200 blocks long, and 3 blocks deep, filled with TNT.. …and then I set it all off: Unable to recover the image :( It took 10 minutes for Mac OS X to recover from this - which was ample time for me to make a cafetiere of cinnamon coffee.
- Minecraft player skins
So, since I bought Minecraft (during the Halloween update period!), I’ve been spending a lot of my free time playing it. I’ve also been creating skins for Minecraft. I’ve made a couple of skins so far: Unable to recover the image :( If you’d like to use any of these skins, you can change your skin at http://www.minecraft.net/skin/
- Upgrading Mac OS X Snow Leopard on the Dell Inspiron 1525 to 10.6.4
In this part of the guide, I’ll be covering upgrading to 10.6.4. You can read the first part of this guide here - Installing Mac OS X Snow Leopard on the Dell Inspiron 1525
- My first half-week with Kindle
I’ve got lots of gadgets. I love gadgets. I’ve got a drawer full of portable games, and have a number of other non-game gadgets (though they’re mostly all able to play videogames!) My most recent gadget purchase was a Kindle 3 Wifi edition. I bought this device after three days of deliberation - quite a lengthy amount of time, given my usually impulsive habit of purchasing things. Since it arrived I’ve tried numerous e-book formats on it, all with great results, tried out the “experimental” web browser, which works very well given the limitations of the e-ink screen, and even modded the Kindle to allow for custom sleep/screensaver images Here are a couple of the screensaver images I’ve made: Unable to recover the image :( If you’ve got a Kindle and you’d like to use these, first you will need to mod the Kindle firmware, using the installers found here - http://www.mobileread.com/forums/showthread.php?t=88004 Over-all the Kindle is a great device. The screen is readable from any angle, and I find that many people have a hard time understanding that it’s a screen. It’s really nice.
- Installing Mac OS X Snow Leopard on the Dell Inspiron 1525
This is an update to my previous guide. I’ve since changed platform for my site — and even changed computers — but there is enough interest in this guide to warrant a re-write, so here we go. I’m going to be walking you through installing Mac OS X Snow Leopard 10.6.4 on your Dell Inspiron 1525. The configuration of your Inspiron 1525 might differ from mine, but generally most of the hardware will be the same.
January
- Using jQuery to supply and clear default input values
This is a repost of a solution I provided over at the smashing magazine forums. I’m posting it here as it’s a pretty useful solution in itself. The original question is as follows: I’m building a new website and on this one page I need to use a huge form, instead of using labels I want to enter the “label” text in the value attribute and then use JS to clear the field on mouseclick. The problem is that every field needs to be filled out. I don’t want users hitting the submit button with some of the standard values still in place (easy to miss certain stuff) because this will mess things up. I can ofcourse check for empty fields but to do this I need to somehow check if all the fields have been changed on form submit. So I whipped up a quick implementation of how I would do it using jQuery.