sayzlim.net

OS X Toolbox Workflow for Alfred 2 

My favorite productivity tool, Alfred, has entered its second version and released the beta for every Mega Supporters last night. The most useful feature in Alfred 2 is workflow that allows you to create a series of actions to complete a task.

The extensions support in the first version of Alfred were great but limited in term of creation. However, with the new workflow, everything are more powerful and easier to manage.

OS X Toolbox Workflow

Taking this chance, I’ve compiled all the extensions I’ve built and downloaded before into single workflow called “OS X Toolbox”. It’s a one stop toolkit to fix common annoyances and toggle states in OS X.

Attribution to each original extension creator can be found in the shell script action. The icon is designed by MacMod.

  • Rebuild Launch Services: A simple command to rebuild your launch services that manage all the “Open with…” menu item. If you see duplicate items, run this command to fix the problem.
  • Toggle Desktop: Turn desktop visible or hidden.
  • Toggle System Files by Don Southard: Turn system files visible/hidden.
  • Toggle Wi-Fi by Jonas Eriksen: Turn Wi-Fi On/Off.
  • Purge Inactive Memory: Clear away inactive memory without rebooting your Mac.
  • Relaunch Finder: If you’ve encountered a bug that stops you from revealing Alfred search result in Finder, then you’ll need this command. Usually it happened after you relaunch Finder without killing “appleeventsd” process. With this, you can relaunch Finder and kill the process in one stroke. Because we need sudo command, you’ll need to enter your user password in the workflows menu (see the Relauch Finder shell script). You’re no longer need to type in your password in the shell script. This action will use your password as argument and pass it along to the command.1

Alfred Password

The extensions are all packaged into one workflow so it won’t clutter your Alfred preferences, and the actual process is pleasant, even for beginner.

If you plan to build a better and complete version of this, send me an email and I’ll link it so others can download it. I simply want to show you how easy it is to create your own workflow in Alfred 2. If you haven’t upgraded to Mega Supporter license, don’t hesitate and hurry get the license.

Download: OS X Toolbox Workflow for Alfred 2

Aaron Swartz and Tangled Wires

I followed Aaron Swartz on Twitter last year after seeing several mentions of him on my timeline. I realized at once that he was a person that everyone look up to, mainly due to his contribution to technology at a very young age. He co-wrote the RSS specification when he was 14 which we still use nowadays. He helped to improve popular Markdown I use to write this post. He was a gifted kid every adults want to nurture and protect. He was a genius.

But, it’s not that he was a genius that his family, his friends, and his followers to grieve over his death. It’s his belief and preserverance to put everything in action. There are many geniuses in this world, but there aren’t many who hold onto their beliefs like Aaron did. Losing him now is equal to losing the future he believes.

Before his death1, Aaron spent the past few years fighting against corruption and dedicated his time to popularize information freedom. He was charged with stealing protected information in one of his discovered attempts. No one in his right mind would take that kind of risk when he could build a popular service and spent his rest of days peacefully. Yet, he kept fighting.

Today we’ve lost a future because of depression. Depression is like a tangled wires in a brain. It’s complicated, messy, and deadly. Sometimes you just can’t solve it. It has to be left unnoticed so we can take a break.

As a family, a friend, and a partner. We can only be more honest with our feeling. Make them feel good about themselves. Let them know you enjoy their present. Let them know that they’re important. By doing so, we can let them know that they’re not alone with the tangled wires.


  1. Cory Doctorow has written a perfect story on Aaron’s death. 

Reset and Remove Applications in Location Services on Mountain Lion

One of the best features in OS X Lion is a better privacy control which allows you to see all the applications that have access to your information. Some example of those informations are your location, contacts, and Twitter account. They can be found in System Preferences under Security & Privacy pane.

Remained Applications in Location Services

If you’ve installed Tweetbot for Mac before and removed it from your Mac, then now you should see the removed app remains in the Location Services item list. Normally, we can remove them with secondary click or the button under item list, but not on Mountain Lion.

The remained items won’t cause any problems to your Mac. However, I don’t like to see broken preferences. Therefore, I researched how to remove it and discovered a method to fix this problem.1

The method is to locate and edit the configuration file that stores the applications in Location Services. In order to do that, we need to open the folder that contains the file. Type Command+Shift+G in Finder and insert the file path below:

/private/var/db/locationd/

You’ll see many files and folders. Find and select locationd folder. You’ll see it has a small red badge. The badge means that you don’t have the permission to access and edit the folder. We’ll grant permission to ourselves by pressing Command+I or Secondary Click » Get Info on the selected folder.

Edit Permission for locationd Folder

Expand the Sharing & Permissions panel; you’ll see the privilege of each user. Unlock the panel by clicking the lock icon in the bottom corner right. You’ll be prompted to fill in your administrator password. Change everyone’s privilege into Read & Write as shown in screenshot above. With this modified, you can browse the files inside this folder.

Now we need to edit clients.plist. But before we do that, we’ve to convert it from binary mode into xml1 file. Run the command below in Terminal — you’ll have to fill in your administrator password:

sudo plutil -convert xml1 /private/var/db/locationd/clients.plist

Following the steps you’ve used to grant Read & Write access to the locationd folder, you’ll need to do the same with the clients.plist file. Otherwise, you won’t be able to edit and save the file.

Open the clients.plist and remove the key and dictionary pair in the configuration file. If you’re not sure which line to remove, see the example below.

Contents of clients.plist File

Let’s say I want to remove the Matilde key pair in the list. It means I have to find the Matilde key in the and remove its associated item. That would be the line between:

<key>Application ID</key>
<dict>Application Information</dict>

Delete those lines and save the file. Don’t forget to convert back the client.plist into binary file using the command below in Terminal:

sudo plutil -convert binary1 /private/var/db/locationd/clients.plist

The last step is to restart the daemon that monitor the change of location. Type this command in Terminal:

sudo killall -KILL locationd

Clean Location Services in Mountain Lion

All the removed applications will disappear from Location Services when you log out from your Mac. Until Apple fix this bug, we’ll have to do this manually with this method. For all the file permissions you’ve changed so far, don’t forget to revert it back to none. They’re clients.plist and locationd folder.

If you have any questions regarding this tutorial, feel free to contact me.


  1. The discussion provides a very brief answer which proves to be confusing for new Mac users. 

ads by Yoggrt