Latest Blog Entries
Lots of times we don't have control over what tables get dumped into a database backup, or we have to work with an .sql file that someone else made. Drupal's cache and temp tables can make those dumps mighty large, so here's a quick bit of command line magic to delete those parts of the database dump:
What is jReject?
Often times, either through lack of manpower or will, we'll create a web page that looks great in modern browsers but falls apart in old ones. Rather than fielding comments like "Your page is broken!!", wouldn't it be nice to let your visitors know that their browser is out of date?
jReject is a jQuery plugin that determines the browser type and version a visitor is using, and conditionally presents the user with a modal message prompting them to upgrade their browser.
I was disappointed with the response in the Configuration Management Initiative session with Greg Dunlap (heyrocker) when I asked a really important question — how do we deal with changes in production conflicting with what's in version control?
The DVCS craze drives me nuts, especially with regard to git. The big plusses of a DVCS are that it's fast, branching is local and cheap, and it's distributed (i.e., no central repository). Joel Spolsky started gushing over git and Mercurial (hg) not too long ago, and then even built a SaaS app for hg.
The Drupal 7 version of admin_menu isn't done yet, and once in a while you'll get an admin menu full of stupid duplicate links, like so:
Here's a sql query that will find and delete the offending duplicates for you (use at your own risk):
- DELETE FROM menu_links WHERE mlid IN (SELECT duped_ids.mlid FROM (SELECT max(mlid) AS mlid, menu_name, link_title, link_path, router_path, module, count(*) FROM menu_links GROUP BY menu_name, link_title, link_path, router_path HAVING count(*) > 1) AS duped_ids)