During evenings and over weekends my Internet browsing may lead me to items I want to pursue while at work. In the past I have sent my work email account mail with URLs to articles or software that I wanted to look into further while at work. The problem with this practice is that my work email account is read by my personal computer, so I end up with an unread email badge staring me in the face all weekend long.
Matt Gemmell’s recently released Sticky Notification tool allows you to quickly create a sticky notification (one that must be dismissed). This is great for ADD types like myself, to create reminders of what I was working on when I have to leave a task before it is completed for some reason. What would make it even better would be a way to create sticky reminders on remote machines.
One of the hints today on the Mac OS X Hints page is a method for creating Notification Center alerts from the command line. Using that hint, a short shell function, and the ability to shell into my work computer remotely, I am now able to create new notices on my work computer.
##Step 1: Install Display Notification Center Alert action The hint on Mac OS X Hints relies upon an Automator action created by Automated Workflows. Download the Display Notification Center Alert Automator Action and follow the directions for installing it. (Basically double-click on the action file.)
##Step 2: Create a DisplayNotification workflow
Fire up Automator and create a new workflow. Locate the freshly installed Display Notification Center Alert action from the list and drag it to your workflow. Follow the directions in the command line Notification Center Alert hint and create three variables (title, subtitle, and message) and associate them with their corresponding fields in the action. Finally save the action. I followed the hint’s suggestion and created a ~/Library/Workflows directory and saved my new workflow there.
##Step 3: Test the workflow From the command line test your new action to make sure it works. Once you tire of creating new alerts move on to Step 4.
$ automator -D title='Testing' -D subtitle='testing' -D message='Is this thing on?'
~/Library/Workflows/DisplayNotification.wflow
(Note: command should be all on one line, it’s broken into two lines here for readability concerns.)
##Step 4: Create a shell function to call the Automator workflow Rather than have to type the entire command necessary to run the workflow each time I want to create a new alert, I created a short shell function to encapsulate it.
notify() {
automator -D title=$1 -D subtitle=$2 -D message=$3 ~/Library/Workflow/DisplayNotification.wflow
}
With this function in place all I need to do to create a new alert is
notify 'This is my alert' 'It is a very fine alert' 'Filled with alert goodness'
##Step 5: Profit! Now I can create alerts on any of the (Mountain Lion) computers I use, from any other computer I use simply by secure shelling into them and running one command.
##Update After getting all of this to work, you may wish to visit the Notifications panel of System Preferences. In the list of alerts under “in Notification Center” you’ll find an entry for “Automator Runner”. Changing its display style from the default “Banners” to “Alerts” will cause any command line triggered alert to be sticky, requiring your dismissal. Excellent.
Apple’s latest update to iOS, the operating system that powers iPhones and iPads, is expected to be announced (if not delivered) within the next two or three weeks. On anticipated change in the OS is tighter integration with Facebook. I admit to having strong reservations about this turn of events. Ever since the the whole Beacon debacle with Facebook I have had an uneasy, tentative relationship with the service and its privacy (or lack thereof) practices.
This morning I learned that iOS 6 may allow Facebook to spam my contact list with their odious email addresses. This TÚAW article, “[With iOS 6, your address book may be invaded by @facebook.com email addresses](http://www.tuaw.com/2012/09/04/with-ios-6-your-address-book-may-be-invaded-by-facebook-com-em/ “With iOS 6, your address book may be invaded by @facebook.com email addresses””)", outlines what appears to be coming.
I will be waiting to turn on any Facebook integration in iOS 6 to see what others experience first. If what this article is saying proves to be true, and Facebook is spamming address books with their @facebool.com email address, then I will not be enabling Facebook integration on my phone. And I have absolutely no intention of ever using Facebook’s email.
The latest version of Xcode, 4.4.1 (4F1003), addresses the issue of organization name and copyright. Previously the copyright information was collected from your address book entry. In my case I had a single address card for myself that included my employer’s name. Every new project I’d create in Xcode spammed my employer’s name into the project’s copyright line. Through an obscure defaults write command I was able to force the organization name to be me.
With the release of version 4.4.1 you no longer need to worry about organization name. The new project creation panel allows you to set an organization name per project. This value is used for the “Created by” attribution line as well as for the “Copyright” line in the header on each file created for your project.

More than twelve years ago I started having pain in my left heel. Turns out it was a heel spur. The spur was reduced through a series of ultrasound treatments at my chiropractor’s office. Several months after my left heel was treated I developed the same pain in my right foot. Another round of ultrasound reduced that spur too.

In 2004 I started having constant pain in my right big toe. Massaging the toe at the end of the day helped some, but over time the pain grew worse and worse. I tried different shoes, icing, and over-the-counter pain medicines but got no long lasting relief.
In 2006 I went to see a chiropractor in Overland Park where I was living at the time to see what could be done. As soon as I explained my history of heel spurs and the pain in my toe she told my I had fallen arches. Sure enough, when I stand bare foot my arches are flat.
Since that day I have religiously worn arch supports in all my shoes. I never go bare foot. The arch supports helped but didn’t eliminate the pain. My toe often appears to be swollen and the base knuckle (metatarsophalangeal joint or MPT joint) is enlarged. When I use my fingers to explore the MTP on both my feet I can tell there is a large lump of something in my right foot.
This morning I met with an orthopedic surgeon to confirm that this was in fact arthritis, and to discuss treatment options.
It is arthritis and the specific condition is called hallus rigidus or stiff big toe. X-rays taken today confirm that there are a couple of bone spurs in that joint and one rather large “loose” piece of calcification. Loose in the sense that it isn’t attached to any bone in my foot. It’s held in place by the tissues in my foot so it isn’t moving around. Much.

There are several options for treatment. I can continue to live with it, using over-the-counter pain and anti-inflammatory medicines as needed to manage the pain. Or, I can have a Cheilectomy (kI-lek’-toe-me) to remove the bone spurs, the lose bit of calcification, and enough surrounding bone to return my toe to a “normal” range of motion. Or, I can have a Arthrodesis (are-throw-dee’-sis) to fuse the joint together permanently.

The surgeon said that my case didn’t scream out a need for the fusion. In the fusion all the cartilage in the effected joint is removed and a metal plate and screws are used to fuse the bones together. That joint is given a slight (30º) upward angle to facilitate walking without a limp. This surgery is done once and the hope is that it eliminates the source of the pain (an arthritic joint with bone spurs) forever.
The cheilectomy removes the osteophytes (bone spurs) that have formed allowing the toe to return to normal range of motion. In my case there is still some cartilage in the joint so it function properly. There is no guarantee that arthritis won’t return to the joint, therefore the surgery may need to be repeated in 5 or 10 years.

The recovery time varies from patient to patient, but is a minimum of 2-weeks in a wooden sandal to support the toe, followed by a gradual return to normal footgear. Swelling is the major side effect of the surgery, and can persist for several months after the procedure.
Since I’m committed to orchestra this fall, with rehearsals every Saturday and a concert in November, I am planning on having the cheilectomy performed the week after Thanksgiving. Once the pain from the procedure abates I am looking forward to vastly reduced soreness and pain in my toe for the next decade.
For the past year I have been using the oh-my-zsh framework to configure my zsh prompt and environment. My one complaint about oh-my-zsh is its slowness spawning a new shell. When I use Cmd-T in iTerm to create a new tab I often have to wait 3 or 4 or even 5 seconds for that new shell to become active. This is unacceptable.
Searching for “speed up oh-my-zsh” lead me to the zsh stars incredibly slowly discussion. From there I went to speed up a slow terminal by clearing log files. My /private/var/logs/asl directory did have some *.asl or Apple System Log Files. Using the suggested rm command I deleted all *.asl files in my /private/var/logs/asl directory.
$ sudo rm /private/var/logs/asl/*.asl
Prior to deleting the *.asl files I tested the start time of my shell like this:
$ time zsh -i -c exit
zsh -i -c exit 0.35s user 0.40s system 12% cpu 5.953 total
After deleting the *.asl files the time dropped considerably:
$ time zsh -i -c exit
zsh -i -c exit 0.27s user 0.21s system 96% cpu 0.496 total
NB: As with any low-level mucking about on your computer, proceed at your own risk. I don’t fully understand everything that ASL files are used for. Deleting the set my computer has accumulated seems to have considerably speed ip spawning new shells without any detrimental side effects. Your experience may vary.
In January 2008 I created a website for my wife’s piano studio. While we’ve made lots of content changes to the site in the past four years the design of the site has been largely unchanged. For the past few weeks Sibylle and I have been exploring different themes and options for updating her site. After much deliberation we decided to use Squarespace.
Squarespace sits somewhere in between a hand-coded site and a WordPress site. Your membership includes access to a couple dozen beautiful themes, a custom content management system (CMS), and a set of drag-and-drop controls that let you assemble the pages you want on your site. By switching to Squarespace we were able to combine her static, hand-coded studio site with her WordPress backed piano pedagogy centric blog, and do so in a way the will let her manage all the content on her site. Previously she had to rely on me to make changes to her studio site.
Using the free 14-day trial we were able to experiment with several different styles until we found one we liked. Next we created pages to match her studio site and copied over the content. Pages on Squarespace are assembled from blocks. There are different blocks for different content: images, videos, text, calendars, picture galleries, et cetera. By breaking the page content into blocks you can rapidly drag-and-drop the block to rearrange their order, whether the site is one column or two, whether images are page width or have text wrapped around them.
It is possible, and very easy, to import content from WordPress (and other popular blogging systems) to Squarespace. Just by providing the WordPress site URL and the administrator id and password all of her blog entries were migrated to the new CMS.
Where this got complicated was in handling the relationships between our name server (NameCheap), our primary hosting service (WebFaction), and Squarespace.
There are three major components to her site: the site itself, an email account for her studio, and a visitor analytics package called Mint. Since Squarespace doesn’t provide email and doesn’t provide any way to install an instance of Mint, those two components will remain on WebFaction’s servers. Through the arcane magic of DNS records web requests to her site can be directed to Squarespace, while requests for the Mint installation go to WebFaction. And all email goes to WebFaction’s email servers.
Had her studio site been a subdomain, e.g., **studio.**example.com instead of a root domain, e.g., example.com, I could have used what WebFaction calls “DNS Overrids” to direct web traffic to the subdomain over to Squarespace. Since her site does live at the root of the domain I was required to make the changes upstream, at NameCheap.
NameCheap allows you to configure the underlying DNS records only if you use their name servers. If you are using a 3rd party’s name servers then you have to make the DNS record changes at that 3rd party. So the first step was to switch her domain’s name servers back to NameCheap. This was very easy to do - select one check box and click save.
With NameCheap’s servers activated I now had access to all DNS records for the site. To direct web requests to the new Squarespace site I needed to configure both a Cname record and an A record entry. The A (address) record consist of the IP address for Squarespace (65.39.205.57). The Cname record gives the Squarespace alias, www.squarespace6.com.
To direct traffic for the Mint instance her site relies upon I used the sub-domain settings section to pair the mint subdomain with her site’s WebFaction IP address (108.59.4.77).
To cause mail to be handled by WebFaction I needed to add three MX records, one each for mx7.webfaction.com, mx8.webfaction.com, and mx9.webfaction.com.
Once these configuration changes were made and saved on the NameCheap host records page we got to wait for the DNS system to propagate the changes. I don’t know what the time-to-live (TTL) value was prior to my changes, but the changes I made all had a TTL of 1800 seconds or 30 minutes. The TTL countdown starts on each server when it receives the request. You have to wait while all the DNS servers get the request, countdown and then make the change.
Hopefully once the dust settles Sibylle will have a beautiful new site served by Squarespace, visits to her site will be analyzed by Mint served by WebFaction, and her email will continue to flow through WebFaction.
I am by no means a drinker much less a drinker of martinis. But I enjoy a well written piece about rituals and few things perhaps are as ritualized in America as the idea of a martini. Whether you imbibe or not this is worth the time it takes to read.
(via: Daring Fireball)
Hilariously accurate.
Updated: 21 January 2013
Saving all three directories under the Sublime Text 2 entry in
~/Library Application Supportis overkill. You really only need to keep the~/Library/Application Support/Sublime Text 2/Packages/Userdirectory. Read Sublime Text 2 Dotfiles Simplified for a more complete explanation and write up.
After reading more and more about Sublime Text 2 I decided to give it a try. The first thing you do with any new software is tweak the preferences and settings to suit your needs and aesthetics. Sublime Text 2 stores settings, themes, and plugins in the ~/Library/Application Support/Sublime Text 2 directory in three separate folders:
I’ve already got a dotfiles repository on Github where I store all my shared configuration files. Here’s how I added my Sublime Text configuration.
First close Sublime Text 2.
Next add a directory called Sublime Text 2 to the working copy of your dotfiles repository
$ cd ~/.dotfiles
$ mkdir Sublime\ Text\ 2
Move these folders from ~/Library/Application Support/Sublime Text 2 to the Sublime Text 2 directory in .dotfiles.
$ cd ~/.dotfiles/Sublime\ Text\ 2
$ mv ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages .
$ mv ~/Library/Application\ Support/Sublime\ Text\ 2/Packages .
$ mv ~/Library/Application\ Support/Sublime\ Text\ 2/Pristine\ Packages .
Next create symbolic links in the ~/LibraryApplication Support/Sublime\ Text\ 2 directory to the new location of the settings directories.
$ cd ~/Library/Application\ Support/Sublime\ Text\ 2
$ ln -s ~/.dotfiles/Sublime\ Text\ 2/Installed\ Packages ./Installed\ Packages
$ ln -s ~/.dotfiles/Sublime\ Text\ 2/Packages ./Packages
$ ln -s ~/.dotfiles/Sublime\ Text\ 2/Pristine\ Packages ./Pristine\ Packages
For each added machine where you install Sublime Text you will need to remove the three settings directories from their default location and replace them with links to the set in your .dotfiles repository.
Finally update the README for your .dotfiles repository with enough of these instructions to remind you what you did six months from now when you stumble upon it again.
One of my projects at work utilizes a Django-based API documentation tool. When I read Jeff Knupp’s Starting a Django Project the Right Way posting I decided I wanted to setup virtualenv on my machine. And not just install it but also add the virtual environment information to my zsh rprompt.
Here’s how I accomplished that goal.
##virtualenv Information Using Steve Losh’s excellent My Extravagant Zsh Prompt posting as a jumping off point, I added the following function to my zsh-theme file:
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
This function tests to see if there is an active virtual environment and then echos the name of it as the function’s output.
##RPROPMT
Next I added a call to the virtualenv_info function to my RPROMPT or right-prompt. I already had my RVM controlled Ruby version displayed there in red, so I set the virtualenv_info to be green.
case `uname` in
Darwin)
RPROMPT='%{$fg[green]%}$(virtualenv_info)%{$reset_color%}% %{$fg[red]%}$(rvm_ruby_prompt)%{$reset_color%}'
;;
esac
The case statement test for Darwin prevents this portion of the prompt from running on my Ubuntu virtual machine, where I also have zsh setup but where I don’t have RVM.
##Usage Creating a new virtual environment is simple,
$ virtualenv <environmentname>
Activating the new (or an existing) environment requires this command:
$ source ./<environmentname>s/bin/activate
By default virtualenv wants to prepend the name of the active environment to your prompt. Since I want it only in my right-prompt I need to set VIRTUAL_ENV_DISABLE_PROMPT to any non null character before activating the environment. To make the activation command shorter, and to ensure that VIRTUAL_ENV_DISABLE_PROMPT is always set I created a new function sourced from my .zshrc:
activate() {
export VIRTUAL_ENV_DISABLE_PROMPT='1'
source ./$1/bin/activate
}
Now I can just type activate <environmentname> and I’m switched to that Python environment with the virtualenv name shown in the right-prompt.
mhn at palantir in ~
○ activate apidoc [ruby-1.9.3-head]
mhn at palantir in ~
○ (apidoc) [ruby-1.9.3-head]
You can view my complete zsh setup in my dotfile repository on Github.