How I Went Paperless And Clutter-free For $32

Ever since I discovered Dropbox, I felt weighed down by the clutter of physical documents.  I use it for all of my digital documents.  After a while, physical documents and pieces of paper began to get on my nerves.  It was much easier to have searchable PDFs that I could access anywhere.  To that end, I wanted to be able to convert any physical document I received into a searchable PDF.  See the video below for the entire workflow in action. Continue reading “How I Went Paperless And Clutter-free For $32”

Automatically Sort Dropbox Camera Uploads Based On Their Geographical Data

I have been a long time fan of using Dropbox to manage my photos, even with the release of Photos.  I have especially liked it ever since Dropbox enabled Camera Uploads from their iOS app.  With my latest script, I can now upload photos from my iPhone and have them automatically sorted into folders based on the city they were taken in.

To accomplish this, OS X’s Spotlight (mdls ) is used to extract the coordinates from the photo, and then those are sent to Google to get the city (or the state, address, and more). Continue reading “Automatically Sort Dropbox Camera Uploads Based On Their Geographical Data”

Bash Script: Fix Paused Printers In OS X

You need an administrator password to un-pause a printer in OS X.  It is possible to add a user to the lpadmin group.

sudo dseditgroup -n /Local/Default -o edit -a username lpadmin

This will give them rights to the printer, but if your users aren’t admins of their machines, this might not be something you want to open up.  This is the case for the school I work at.  My solution was to create a LaunchDaemon that would automatically detect and un-pause paused printers. Continue reading “Bash Script: Fix Paused Printers In OS X”

Python Script: pmset–Set Energy Saver Settings For Multiple Computers At Once

If you have 1,000 computers and don’t want them all to power on at the same time, but rather come on at different times, you can use a simple Python script to do so.  I use this in an educational setting where each lab needs a different power setting so that they don’t all power on at once and crash the server when they all try to contact it at once.  It is also a little easier on the power grid. Continue reading “Python Script: pmset–Set Energy Saver Settings For Multiple Computers At Once”

Bash Script: Set Favorite Servers In “Connect To…” Menu

The Connect To… menu (Command+K) lets you quickly connect to a server using different protocols.  If you are deploying these settings to a bunch of computers, it can be done quickly using a simple bash script.  Just replace or add whatever servers you want into the servers variable (one per line in single quotes). Continue reading “Bash Script: Set Favorite Servers In “Connect To…” Menu”

Prevent Access To Certain Wi-Fi Network SSIDs Via Bash Script

In enterprise environments, there is often an open guest network and a secured enterprise network.  Often, you do not want users to connect to the guest network because it is throttled down and does not grant access to organizational network resources.  Below is a script that can be run as a Launch Daemon, which will turn the wireless off and display a dialog if a user connects to the wrong network. Continue reading “Prevent Access To Certain Wi-Fi Network SSIDs Via Bash Script”

OS X: Triggering Automation Scripts Using launchd

Desktop management software, such as Casper, has the feature of running scripts when a computer meets a certain criteria.  You can create a similar effect using launchd by creating a Launch Daemon or Launch Agent.  These run in the background and you can use them to trigger a script to run.  Basically, if you know how to script something, you can get it to run automatically via launchd . Continue reading “OS X: Triggering Automation Scripts Using launchd”

Batch Rotate Photo Files With Hazel and sips

If you have a ton of photos that are all facing the wrong direction and don’t want to do them individually, you can use Hazel to automatically go through a folder and rotate the images for you.  All it takes is a one-line bash script and a Hazel rule.

sips -r 90 "$f"

This rotates the image 90 degrees.  You can set it to 180 or whatever else you want. Continue reading “Batch Rotate Photo Files With Hazel and sips”