December 2009 Archives

As I mentioned in my very first post on this blog, I plan on posting about personal finance and saving money in addition to web development. This is my first post along those lines. All of this stuff is very interesting to me, and I hope you get some benefits as well. I mean, everyone likes to save money right?

Over the past year, I’ve been way into Ramit Sethi‘s website and book. He targets people in their 20s and 30s and has some excellent strategies on saving money in ways that make a ton of sense. Ramit’s main point is to go for the big wins (like saving hundreds on cable) instead of the small things (not buying coffee in the mornings) that waste too much time and give way too little in return. Its important to get your finances under control, but still allow yourself the freedom to spend on the things that make your life enjoyable.

Continue Reading

Safari Have you ever noticed those sweet blue outlines around input fields when using Safari? Something that looks like this?

safari-blue-outline

In theory, it sounds like a good idea for Safari to automatically indicate what has focus on the page. However, I doubt the default blue is going to match your website color scheme too well. We can use a little CSS to prevent this default blue border.

Continue Reading

Here’s a pretty cool trick to help speed up image loading. I’m sure you implemented an image rollover before. Typically, you would make 2 images – one for the default state and one for the hover state. When you first rollover your image, there would be a slight pause while the new hover image loads. Once the image is loaded, the rollover is way smoother since the image has been cached.

You could use JavaScript to preload the hover image, and that is how the image rollover is typically implemented. Wouldn’t it be great if we could use only CSS to do the same thing? That’s where the background-position property comes in.

Continue Reading

SortablesWhen coding the admin for PowerGallery, I used the MooTools Sortables plugin to handle the drag & drop re-ordering of the images in the gallery.

This code worked great in Firefox, Safari, and Chrome. But then I tested in good ‘ole Internet Explorer IE Sucks. Oddly enough, IE6 worked fine when I tried to drag an image around. IE7 and IE8 were a different story though. When I clicked (and held) on an image and start dragging, the image would move a few pixels then freeze in place. If I released the mouse click, the image would then follow my mouse around until I clicked again and it would drop the image where indicated. Weird stuff to say the least, and definitely not the behavior I wanted.

Continue Reading

PowerGalleryWebAssist recently released a really cool PHP solution today called PowerGallery. I was the lead engineer on this solution and it was lots of fun to code it. Am I biased since I created this thing? Of course! But I have no doubts you’ll love it too. I don’t want this to sound like a sales pitch, but I am proud of the work we put into this solution pack. I also wanted to set the stage since some of my upcoming tips are direct results of things I learned during development of PowerGallery.
 
 

Continue Reading

Hard DriveAt home, I have an ubuntu linux box that I use to store all my media. I have multiple terabytes in this thing and it always seems like I am adding more and more hard drives to up the storage capacity. I found a really awesome command line tweak that will give 5% more space for each drive. So if we’re talking about a 1 terabyte drive, that’s another 50 gigs we can gain!

Here’s the deal, by default linux reserves 5% of every drive for the root user so that the operating system can still write to the disk even if it is “full”. Now this is great for the main linux partition, but for media storage that’s overkill. I’d rather have 50 gigs to store more media than have it reserved for the OS and just waste away.

Assuming your hard drive is formatted in ext2/ext3, just run this command to modify the reserved space percentage:

sudo tune2fs -m 0 /dev/sdb1

This example reserves 0% of the drive, but you can up that if needed. Also make sure to plugin your correct partition since it might not be sdb1. Running this command doesn’t affect the data on your drive, so its safe to use on a drive with stuff already on it.