Posts from February 2012
Alfred Shortcuts for Drupal Developers
During the BarCamp-style afternoon session at DrupalCamp MD last weekend, some people got talking about the tools they use on a daily basis, including one of my favorites: Alfred, a launcher app that's comparable to Quicksilver or LaunchBar. I have several Drupal-specific custom searches setup in Alfred, and I've been meaning to write about them for the benefit of other Drupal devs on Macs.
To add custom searches, open the Alfred preferences and go to the Features tab, then select Custom Searches in the list at left. Click the plus icon at the bottom of the window to add a new one. You'll be asked to provide some info for the search, including the keyword to use—the command you'll type into the Alfred window—and the URL that the search should go to. You'll put {query}
in the URL where the search string should go.
So, for example, I have a Netflix search. The keyword is 'nf', and the search URL is http://movies.netflix.com/WiSearch?v1={query}
. If I hit Command+Space to open Alfred, and type 'nf the goonies', Alfred will launch http://movies.netflix.com/WiSearch?v1=the goonies.
These are the Drupal-related searches that I have configured in Alfred:
dmod: Jump directly to the given Drupal module or theme. Example: dmod views
, dmod omega
Search URL: http://drupal.org/project/{query}
dmods: Search Drupal modules. Example: dmods feeds
Search URL: http://drupal.org/project/modules?text={query}
dapi: Search the API. If an exact function name is given, the d.o search will redirect to that API page. If not, it performs a regular search. This is limited to D6 since most of my current developement is still for 6. Example: dapi hook_nodeapi
, dapi taxonomy_term_
Search URL: http://api.drupal.org/api/search/6/{query}
d7: Same as dapi but for D7 only. Example: d7 hook_block_view
Search URL: http://api.drupal.org/api/search/7/{query}
capi: Search the contrib module API available at DrupalContrib.org. Like dapi, this searches D6 by default. Example: capi ctools_get_plugins
Search URL: http://drupalcontrib.org/api/search/6/{query}
d.o: This one isn't a search. It goes straight to my drupal.org dashboard, since I check it often for updates to issues I'm following. You'll need to swap in your own d.o user ID.
Search URL: http://drupal.org/user/660472/dashboard
php: Not Drupal-specific, but good to have on hand. This one searches the php.net function manual. Their search will redirect to the API page if a specific function name is provided, show manual pages for topics like arrays or XML, or do a sort-of search of function names if it's not an exact match. Example: php array_rand
, php simplexml
Search URL: http://us.php.net/manual-lookup.php?pattern={query}
Category:
Responsive Design Test Bookmarklet
Benjamin Keen has created a fantastic, customizable bookmarklet that, when clicked, will show the page you're viewing in multiple screen sizes. This makes it easy to check a responsive design in multiple screen sizes as a glance. Very handy, and very simple execution.