markupboy

Latest Notes

Alfred Tip: Hotkey a Folder

I switched to Alfred from the once great Quicksilver not too long ago and instantly bought the Alfred Power Pack solely to have access to the system-wide hotkeys it provides.

One trick I found helpful was to hotkey a folder for quick access to my most used directories on my computer. If you have the power pack, it’s quite simple. Open up your Alfred preferences and go to the Global Hotkeys panel. Add a new hotkey and instead of selecting an app or a file, just select a folder for the “action” and set your hotkey.

Hotkey a Folder

Now, using that hotkey will open a finder window for that directory; it’s that simple. I currently use CMD + ` to open my Dropbox folder and CMD + ALT + ` to open my mounted file server.

The Social Graph is Neither

We have a name for the kind of person who collects a detailed, permanent dossier on everyone they interact with, with the intent of using it to manipulate others for personal advantage - we call that person a sociopath. And both Google and Facebook have gone deep into stalker territory with their attempts to track our every action.

New, More Reliable RSS Feed

Last night I discovered that my RSS feed was down for the count. After a ton of debugging, some gnashing of teeth, and googling how to properly write a 301 redirect in an htaccess file, I think I’ve cracked it.

The original feed http://markupboy.com/rss should continue to work and all of the old urls for that feed should be redirecting to it. There is also an new alternate feed at feeds.feedburner.com/markupboy that will be the new canonical feed going forward.

ExpressionEngine Add-On Templates Made Easy

I’ve recently gotten more into custom EE Add-On development and have found Pkg.io to be an invaluable resource. You can package up templates for every type of add-on imaginable, and it pretty much does all the work for you short of, you know, actually writing the add-on.

Nearby

Nearby is a simple ExpressionEngine plugin that uses the GeoNames.org API to find places near a known zip code.

You can view the project over on github or download the plugin from devot:ee.

Installation

Place the nearby plugin folder in your ExpressionEngine installation’s third_party folder (system/expressionengine/third_party by default).

Since Nearby makes user of the GeoNames API, a GeoNames user account will be required to use more than the demo mode provided. You can sign up for one at www.geonames.org/login

Once your account is created and activated, you will need to log in to the GeoNames site, click your username in the top right of the page to bring up the user control panel and then click the “Click here to enable” link under the title “Free Web Services” to enable API usage on your account.

Once your account is fully enabled, you can pass your username to the plugin via the “username” parameter or set your username in your config.php file with the code:

$config['nearby_username'] = "YOUR USERNAME";

Usage

{exp:nearby}

Parameters:

  • zip (required) - the zipcode you’d like to search on
  • limit - limit the number of results returned
  • radius - distance in miles to search surrounding the desired zipcode
  • username - your GeoNames username

Single Variables:

  • {zip} - zipcode of result
  • {placename} - plain text descriptor of result
  • {latitude} - latitude of result, in decimal
  • {longitude} - longitude of result, in decimal
  • {distance} - the result’s distance from the searched zipcode

{/exp:nearby}

See the rest of the notes →