WordPress – List your most popular Posts

This function below creates a list of links of the top commented posts on your WordPress blog. It builds this list based on the posts that have the most comments. Place it in your footer or sidebar item!

Call the function in your sidebar of footer like this:


Update your Twitter status using PHP

Twitter is an awesome service! I use it on a daily basis and have grown addicted to it. Posting to twitter VIA an application is something that I’m sure you’ll need to do at some point. Using this simple little script below, you can post updates to twitter accounts fairly easily. Don’t forget to add your username, password and message below.

Now call this method to send your tweet!

Follow me on Twitter 😉

Groovy – a programming language to look into

So what is Groovy? Groovy is like a super version of Java. It can leverage Java’s enterprise capabilities but also has cool productivity features like closures, builders and dynamic typing. If you are a developer, tester or script guru, you have to love Groovy. Below are some of it’s features.

  • Is an agile and dynamic language for the Java Virtual Machine
  • Builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk
  • Makes modern programming features available to Java developers with almost-zero learning curve
  • Supports Domain-Specific Languages and other compact syntax so your code becomes easy to read and maintain
  • Makes writing shell and build scripts easy with its powerful processing primitives, OO abilities and an Ant DSL
  • Increases developer productivity by reducing scaffolding code when developing web, GUI, database or console applications
  • Simplifies testing by supporting unit testing and mocking out-of-the-box
  • Seamlessly integrates with all existing Java objects and libraries
  • Compiles straight to Java bytecode so you can use it anywhere you can use Java

A simple hello world script:

A more sophisticated version using Object Orientation:

Leveraging existing Java libraries:


How does Google compile the list of links below some search results?

The links shown below some sites in Google’s search results, called sitelinks, are meant to help users navigate your site. Their systems analyze the link structure of your site to find shortcuts that will save users time and allow them to quickly find the information they’re looking for.

They only show sitelinks for results when they think they’ll be useful to the user. If the structure of your site doesn’t allow thier algorithms to find good sitelinks, or they don’t think that the sitelinks for your site are relevant for the user’s query, they won’t show them.

At the moment, sitelinks are completely automated. They’re always working to improve their sitelinks algorithms, and may incorporate webmaster input in the future.

Referenced from: Google.

J-Crop – the jQuery image cropping plugin

Jcrop is the quick and easy way to add image cropping functionality to your web application. It combines the ease-of-use of a typical jQuery plugin with a powerful cross-platform DHTML cropping engine that is faithful to familiar desktop graphics applications.

Feature Overview

  • Attaches unobtrusively to any image
  • Supports aspect ratio locking
  • Supports minSize/maxSize setting
  • Callbacks for selection done, or while moving
  • Keyboard support for nudging selection
  • API features to create interactivity, including animation
  • Support for CSS styling

Cross-platform Compatibility

  • Firefox 2+
  • Safari 3+
  • Opera 9.5+
  • Google Chrome 0.2+
  • Internet Explorer 6+

Simple to implement.


How to Fix “Internet Explorer Cannot Open the Internet Site- Operation Aborted” Error

This error shows up when the page loads (or tries to load). There are many scenarios that can cause this error which occurs in IE. Microsoft has even issued a patch for solving it.

This error is being caused by calling a piece of Javascript within a page (after the tag). Adding the defer=”defer” tag to the script quickly resolves the issue.

Hope this helps someone! 🙂

Creating a TinyURL with the TinyURL API

The popular URL shortening service TinyURL provides a quick API that creates TinyURL’s on the fly. Here’s how you can access that API.

Make a call to our function above, and it outputs a new tinyURL.


WordPress – Embed Adsense in your posts

Adding Google Adsense to your blog’s post is easy. No need to download and add another plugin to your WordPress installation. Just follow these easy instructions! First, you have to add the following code to your theme’s functions.php file.

Saved the functions.php file and upload it. Now you can embed an Adsense unit into your posts easily by pasting the following code in the editor, in html mode:


Page 8 of 11« First...234567891011