Output Text on Image using PHP imagettfbbox

Easily create an image with text written on it using PHP imagettfbbox. This function requires both the GD library and the FreeType library.

Resize images inside element with Mootool

In my another website, some images were larger than DIV element, and it was causing whole layout to distort. It would’ve been little easier with jQuery but since I was using Mootool library, I needed to come up with some sort of resize snippet, so I wrote this small mootool function which will calculate width of DIV element and resize images inside it to fit to its size.

Creating Google OAuth 2.0 Client API Keys

Google API lets you play with the core of Google system, by building queries, a client can access required data from various Google services, which can be used to build all types of Google based applications. Before sending API queries, a client application needs Google API keys. Just follow these basic steps to obtain your own Client ID and Secret Key for your web application.

Change Selection Color of Text using CSS

If you want to change the default highlighted color of the text in a webpage, just use CSS3 ::selection Selector to achieve the result. ::selection will match the selected text and override the default text highlight color with the one provided by you.