November 28, 2011
by Peter
0 comments

Cut and Paste Files in Mac OS X

I’ve been using Mac OS X for 4 years now, but only now did I learn of this one.

If you’re used to moving files in Windows by selecting them and using ‘Ctrl + X’ and ‘Ctrl + V’ to cut and paste them from place to place, there’s actually a Mac equivalent command.

Use ‘Command + C’, then ‘Alt + Command + V’. If only someone could have told me about that one years ago.

November 5, 2011
by Peter
0 comments

Drupal 6 page.tpl.php template based on path

Use custom page.tpl.php files based on the URL path alias of your pages to create custom template files. Add the following code to your theme’s template.php file.

function phptemplate_engine_preprocess_page(&$variables) {
$alias = drupal_get_path_alias($_GET['q']);
if ($alias != $_GET['q']) {
$template_filename = 'page';
foreach (explode('/', $alias) as $path_part) {
$template_filename = $template_filename . '-' . $path_part;
$variables['template_files'][] = $template_filename;
}
}
}

Create a copy of page.tpl.php and rename it to page-YOURPATH.tpl.php and begin to make your own custom edits specific to that path. Now, if you’ve got a www.yoursite.com/blog path, then Drupal will pick up page-blog.tpl.php as the template for that page. The above code is for Drupal 6. You may need to clear Drupal’s cache after you’ve done this for it to take effect.

October 15, 2011
by Peter
0 comments

Fix for Smart Playlists broken in iOS 5

I use a Smart Playlist called “Recently Added” a lot on my iPhone. Whenever I add a new track, that’s my go to list. With the latest update to iOS 5, the list started to display in reverse order when synced onto the phone, which makes it impossible to play a series on newly added songs in sequence, since the newest is the last on the list.

Luckily, I found a solution. You need to edit the playlist by right clicking and selecting “Edit Smart Playlist”. Under “Match the following rule”, I had “Playlist” is “Music” previously. I editted the playlist and chose “Media Kind” rather than “Playlist”. After that, everything went back to normal after I synced it onto the phone. If you’re having the same problem, perhaps this will solve it for you too.

October 5, 2011
by Peter
0 comments

iPhone 4S Pre-Orders Start 12:01am on Oct. 7!

As much as people around the internet have been complaining that they were expecting more out of this iPhone release, I’m desperately in need of a new phone. Here in Canada, we’re stuck with 3 years contracts for carrier subsidized iPhones, so I’ve been using an iPhone 3G for over 3 years now. The iPhone 4S is so much better than my current phone that I have no problem buying an iPhone 4S. I certainly can’t stand my 3G for another year. Besides, even if it looks like last year’s model, the internals and software are a huge step above the iPhone 4.

Naturally, I want to get my iPhone 4S as soon as possible. When I heard that pre-orders were starting this Friday, I needed to know when I could order mine to make sure I could get it right away. There doesn’t seem to be too much consensus on the exact time the pre-order will start on the 7th, but MacRumors is reporting that Apple reps are telling people that it’ll be 12:01am PST, so I’ll be frantically refreshing the page then to try to be one of the first online to order one. Wish me luck!

November 13, 2010
by Peter
0 comments

jQuery Shine animation effect

I’ve been diving deeper into jQuery lately, because a few clients have been requesting Flash-like functionality for their websites, and I’ve been avoiding Flash since before Steve Jobs made it cool to do so. I have to say, there is more and more that jQuery can do that Flash used to only do. I recently came across one great example of this while researching button effects for a personal project (release coming soon). Addy from AddyOsmani.com posted this great article about a shine effect using jQuery called “ShineTime – A Kick-Ass New jQuery & CSS3 Gallery With Animated Shine Effects.” The best part of the effect is that it’s so simple to implement and if you’re at all comfortable with jQuery and CSS, the method used with background-position opens up a world of possibility with other effects other than shine, which at least I wasn’t aware of. Check out his demo to see the effect in action.

The entire thing really boils down to a few lines of jQuery Javascript code and some CSS. When a event happens, such as a hover or a page load, a shine PNG image is changed from a background position of off the screen to one that crosses to the other side off the screen. With a little modification, I made the effect display a few seconds after the page loads using setTimeout, rather than when you hover over an element, which produced a great little embellishment for a button or a logo when a visitors comes to the site. It’s a great little effect that you used to only be able to do with Flash.

January 19, 2009
by Peter
3 Comments

Partial Fix to your iGoogle for iPhone problems

Evidently, I’m not the only person totally pissed off about Google’s move to get rid of the iPhone version of iGoogle. From the looks of things, Google has no intention of turning back the clock on this one. I guess there still hasn’t been enough public outcry. I have, however, found a partial fix to your iGoogle for iPhone problem.

In mobileSafari, go to the following address:
www.google.com/ig/i?source=mofe

That should allow you to load the proper iPhone optimized version of iGoogle. The only problem is that all my descriptions come up with “Information is temporarily unavailable.” I’m not sure if it’s going to stay that way, or if you’ll have different results, but at least this is better than using the standard mobile version of iGoogle.

Hope that helps someone out there.

January 17, 2009
by Peter
4 Comments

iGoogle for iPhone is gone: Google, you suck

Well, it seems that what I thought was a revision to iGoogle for the iPhone was in fact just Google redirecting everyone to the standard iGoogle mobile version, dropping the iPhone version completely. I also don’t seem to be the only person completely pissed off about it and swearing Google’s name.

I found the following explanation from a Google employee on the Google support pages, which had a lot of angry people sounding off:

Hey everyone, I have an update for you. We’ve decided to direct iPhone users to the standard mobile iGoogle page. We’ve found that people hit iGoogle from lots of different phones — we want to ensure you’ll all see the same version.

Most or all of your existing content should translate over to the standard mobile version. The only exception would be any gadgets that aren’t compatible with most mobile browsers.

Honestly, Google, if you’re listening, this was the stupidest decision I’ve seen you make yet. Your iPhone support had been so great and suddenly you fuck all of us iPhone users without even any notice. Not only am I pissed off because we’re losing some great functionality that I used on a daily basis, but also because it tarnishes my view of Google, which up until now, I believed could do no wrong. Well, you did wrong Google. You really fucked it up on this one. As I was discussing with someone on Twitter, more people need to get angry about this and they need to create some visible public outcry.

If you’re as pissed off as I am about this majorly bone-headed move my Google that basically tells us iPhone users that we don’t matter anymore, then go over to this discussion and tell Google how upset you are.

P.S. Google, your new favicon also sucks!

UPDATE: I found a partial fix, check it out.