Useful OS X Tools: Gas Mask

Gas Mask Editor

Gas Mask is a free and open-source hosts file manager for OS X. This is a small, yet very useful utility for web developers.

Gas Mask Editor

Normally, you’d have to manually edit your hosts file each time you need to make a change, and then flush your local DNS cache, to force the change, by running:

dscacheutil --flushcache

Now it’s as simple as picking from a dropdown in your menubar to switch between hosts file setups for different sites. Gas Mask handles the DNS cache flush for you, and the switch is instantaneous.

Gas mask menu bar

I initially started using this app when I would run local servers using the same domain as the live site. This made swapping WordPress databases between local and production much easier as I wouldn’t have to deal with find/replace on serialized data. Since that time, I’ve started using newer tools like WP Migrate DB Pro and Interconnect/it’s Search and Replace script which make migrating databases much easier and running a local server on the live domain is less important. I still use this to manage my hosts file when switching between sites running on MAMP Pro.

A few things to watch out for

In the screenshot above, you’ll see I have my computer’s hostname Joshs-MacBook-Air listed after the initial localhost declaration. The default hosts file content in Gas Mask won’t include this, but I found that I had trouble using hosts files without my machine’s hostname included there. Also, the editor could use some work, as some of the standard OS X keyboard shortcuts don’t function the same. The project is open source, so anyone who knows Objective-C can hop in and make changes, or make a donation to fund a feature for the project.

Price: Free (open source, donationware)

Download from GitHub | Donate

Responsible Holiday Snow

The WordPress Jetpack plugin includes a feature that will show falling snow on your site during the holiday month(s).

Snowy homepage

Snowy homepage

What seems like a fun little feature for your site can actually have harmful side effects for certain users, causing seizures and migranes.

This is no good, so I built a plugin for Jetpack that will disable this by default and allow your users to opt-in to the snow. You can see it in action on this site, just click the snowflake at the top of the screen to turn on the snow.

2013-12-09 at 9.20 AM

Download Jetpack Holiday Snow Opt-In

Now, this was mainly an excuse for me to build a small plugin to solve a problem that bothered me. It will only be useful if people install it, and let’s face it, they probably aren’t going to. So I also built a Chrome Extension Block Holiday Snow that any user can install (if you use Chrome) which will prevent the snowstorm.js file from being requested by any site. This is a better solution if you are prone to seizures or migraines and want to ensure that no snow will fall on the sites you visit.

The easiest way to install this extension is to download the .crx file from the build directory and drag that into your Extensions page in Chrome (until I can figure out how to submit it to the Chrome Web Store.)

Download Block Holiday Snow

I hope this is useful for someone!

Holy Mac n Cheese with Gruyere and slab bacon. SLAB BACON #smac #nyc

Find me today if you want one of these! (Latte not included, maybe later) @reaktivstudios #wcsf