howtos » 2007 » July

This is a list of my “must-have” Mozilla Firefox add-ons. If you can recommend anything similar or better, be sure to drop me a comment.


Page Analysis & SEO
Minimise Nuisance
Bookmark Management
Download Management
Productivity
Web Development & Design
Security
Functional Extensions
Tab Management
Add-Ons Management


Page Analysis & SEO

About This Site Bookmarks - right-click on a page, select “About This Site Bookmarks” and you will see a list of handy links pointing off to informational sites such as Alexa, Compete, Netcraft, del.icio.us, etc.

SearchStatus

ShowIP


Minimising Nuisance

Adblock Plus

Adblock Filterset.G Updater


Bookmark Management

Add Bookmark Here

Bookmark Duplicate Detector

del.icio.us


Download Management

Download Statusbar - manage your downloads via the Firefox status bar.

DownThemAll - conveniently download all link targets on a page.

FlashGot - allows for single and multiple downloads utilising an external download manager of your choice (I prefer FlashGet).


Productivity

Auto Copy - highlight a piece of text and the selection is automatically copied to your clipboard.

FoxClocks - displays local times around the world in the statusbar or toolbar. Great for if you are dealing with friends and colleagues across multiple timezones.

FoxyTunes - operate your currently running media player from your Firefox statusbar.

Google Notebook - conveniently clip text and links to your Google Notebook.

Linkification - Converts text links (including e-mail addresses) into clickable links.

PDF Download


Web Development & Design

ColorZilla - eye-dropper tool that allows you to pick the HEX & RGB values of colours of elements on the page.

Firebug - the quintessential Javascript debugger. It also allows for excellent DOM and CSS debugging and manipulation.

HTML Validator

IE View - open the current page in an IE window.

Live HTTP Headers - view HTTP request and response headers in realtime.

User Agent Switcher - allows you to spoof the User-Agent string and have Firefox masquerade as the Googlebot, etc, to see how your site reacts to different user-agents.

View Source Chart - renders page source HTML in an easy-to-read manner.

Web Developer - a must for the serious web developer.

YSlow - an addon to the Firebug debugger. It allows you to profile a page and identify bottlenecks. Provided by Yahoo. Also see Yahoo’s articles on improving page load performance.


Security

CookieSafe

Edit Cookies

McAfee SiteAdvisor - lets you know if the currently viewed site is considered “safe” or not.

Functionality Extensions

CustomizeGoogle - customize your Google search and application experiences.

ErrorZilla - extends the standard page not found error screen with convenient links such as access to the page’s Google cached copy.

Secure Login

View Cookies


Tab Management

Faviconize Tab - minimize a tab’s width to the width of the favicon.

Tab Mix Plus


Add-Ons Management

Google Browser Sync

FEBE - a convenient extensions & settings backup tool. Allows you to also run scheduled backups. The backups can be used to transport your extensions and their settings to another machine or Firefox profile.

MR Tech Local Install - install power tools for add-ons

Secure File Copy (scp) allows you to copy files between hosts using the SSH protocol.

To copy from a remote host to your current host

PERL:
  1. scp -r user@remotehost:path/to/remotefiles localtarget
  2.  
  3. #-r recursive copy
  4. #you will be prompted for user's password @ remotehost

To copy files from your current host across to the remote host

PERL:
  1. scp -r localfiles user@remotehost:path/to/remotetarget

There are many examples where you would need to retrieve a random record or more from a set of tables. For example your page template may be cycling through QOTDs, testimonials, offers, specials, and so forth.

To retrieve a random row in MySQL, use the ORDER BY RAND() statement to randomly order the rows of a table. Then use LIMIT x to retrieve the first x rows from the randomised representation of the table.

For example:

SQL:
  1. /*  Retrieve 5 random special offers to display in your e-commerce store's sidebar */
  2. SELECT  offer_id
  3. FROM    special_offers
  4. ORDER BY RAND()
  5. LIMIT 5

Of course, we can make our query as complex as needed, and then randomly order the resultset.

SQL:
  1. SELECT  so.offer_id, i.title
  2. FROM    special_offers so
  3.           LEFT JOIN items i ON (so.item_id = i.item_id)
  4.           LEFT JOIN item_categories ic ON (i.item_id = ic.item_id)
  5. WHERE   ic.category_id = 2344
  6. ORDER BY RAND()
  7. LIMIT 5

This snippet of code reorders items in a table based on the number of steps you want to move an item from its current position. It moves the item of interest to its new position and shifts all other items to their new shifted positions.

PHP:
  1. function moveItem ($n_steps) {
  2. if ($n_steps == 0) {
  3. return;
  4. }
  5.  
  6. $cur_pos = $this->pos;
  7. $new_pos = $cur_pos + $n_steps;
  8.  
  9. if ($n_steps <0) {
  10. $min_pos = $cur_pos + $n_steps;
  11. $max_pos = $cur_pos - 1;
  12. $shift_sign = '+';
  13. } elseif ($n_steps> 0) {
  14. $min_pos = $cur_pos + 1;
  15. $max_pos = $cur_pos + $n_steps;
  16. $shift_sign = '-';
  17. } else {
  18. return;
  19. }
  20.  
  21. $id = $this->id;
  22.  
  23. //Reorder existing items that will be existed by moving this item
  24. $sql = "UPDATE  positions
  25. SET  order_num = order_num $shift_sign 1
  26. WHERE   id = $id
  27. AND position>= $min_pos
  28. AND position <= $max_pos";
  29.  
  30. $this->db->query($sql);
  31.  
  32. //Now set new position for this item
  33. $sql = "UPDATE postions SET position = $new_pos WHERE id = $id";
  34. $this->db->query($sql);
  35. }

In most projects there are going to be files that you wish to ignore in version control. These could be temporary files, log or debug files, and so forth. These are files that you can safely ignore when executing commands such as svn commit and svn st. The following shows how to configure your svn client to ignore particular files in your working copy.

svn propedit svn:ignore /path/with/files/to/ignore/

svn opens up your text editor of choice

Use file patterns to indicate which files to ignore from version control. Each pattern goes on a new line. e.g.

log_12*.log
*.tmp

Save your file and exit

Now whenever you perform commands like svn st or svn commit, svn will ignore files with the patterns you specified in the directories that you specified.