Sporcle 1-100 minefield cheat!

Is the Sporcle 1-100 minefield driving you insane? Time to cheat, here’s how to beat it with a tiny snippet of code.

Bootstrap 2.3: Make the carousel swipeable on mobile & tablet

How to make the Twitter Bootstrap Carousel swipeable for your mobile and tablet device users.

HTML5 placeholder fallback for crappy old browsers

One of the features of HTML 5 that I really love is the placeholder. This post shows you how to make a jQuery callback for the placeholder attribute for older browsers that don’t support it.

PHP: Scrape the largest image from a page without downloading every image

You have the URL of a HTML page, and you want to scrape the largest image from that page using PHP. Here is a nice little function that will do that for you…

CakePHP: Shortening URLs with the bit.ly API

So you want to shorten a URL using the bitly API, and you’re using CakePHP? Create a new component (I called mine UrlShortenerComponent), and use this code:

CakePHP: Redirect to WWW subdomain from non-WWW requests

Google and other search engines will think that ‘www.domain.com’ and ‘domain.com’ are two different sites. For SEO purposes you will need to make one of them redirect to the other. Most websites choose to use the WWW subdomain, so that’s what I do. To implement this redirect in CakePHP, you need to…

Fatal error: Class Facebook not found in…

After setting up a new development environment and trying to get a PHP project up and running that featured Facebook login, I was getting the following error: Fatal error: Class ‘Facebook’ not found in…

Hiding the 3 Dot Action Bar in your Android app

Android is moving away from physical menu buttons, to a 3 Dot action bar at the bottom of the screen. Some apps, such as games, will not want this displayed, so this article explains how to hide it.

Sencha Touch 2: Extending the Carousel class

Pretty much every example of the Sencha Touch 2 Carousel that I can find creates a customized instance of the carousel rather than extending it. I had a good deal of difficulty figuring out how to extend it (as I’m fairly new to Sencha Touch 2 and Ext.js), and kept getting the dreaded “Invalid config, must be a valid config object” error.

I got it eventually though, and here is an example of a correctly extended carousel.

Web Dev Tip: Optimize PNG images with TinyPNG

TinyPNG is a fantastic little web based tool for compressing your PNG images. I found it via The Toolbox, and was stunned to see the file size savings that could be made using it. It uses Lossy compression to reduce the file size of your images, but with no visible reduction in the quality of the image.

« Older Entries