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.
Homebrew rocks as a package management tool for Max OS X. Except when it doesn’t.
A couple of days ago when I ran
brew doctor
I got a whole slew of messages instead of the
$ brew doctor
Your system is raring to brew.
output that I expected. The primary issue centered around a file called voldemort.rb. I have no idea what in my collection of brews required that formula. Rather than go through a potentially lengthy debugging session to figure out how to untangle the mess I decided to just wipe out brew and reinstall everything.
I started by making a list of all the brews I had installed
$ brew list > ~/Desktop/brews.txt
Next quick Google search lead me to Uninstalling brew (so I can reinstall) by Eneko Alonso. His posting neatly outlined these steps for removing brew from your system:
$ cd `brew --prefix`
$ rm -rf Cellar
$ brew prune
$ rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
$ rm -rf ~/Library/Caches/Homebrew
To install brew again:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Next up you need to reinstall any brews you had on hand. Since doing this to my laptop my brew doctor output is clean and raring to go.
The landing sequence for getting Curiosity safely onto the surface of Mars is wildly complex and seemingly improbably. Since communication takes 14 minutes one way to reach Earth from Mars, and since the landing sequence is 7 minutes long, by the time we know the landing sequence has started Curiosity will have been safely on Mars for 7 minutes or already destroyed.
You know how dolphins like to play in the bow wave or wake of ships? Turns out Orcas do too. They’re just really big dolphins. All of which brings to mind the line from Jaws where Sheriff Brody says, “[You’re gonna need a bigger boat](http://www.youtube.com/watch?v=8gciFoEbOA8 “You’re gonna need a bigger boat””)".
For the past three weeks my wife and I have been using Lose It!, an iOS App, to track our daily caloric intake. In a word the app is fantastic.
Six years ago I lost 57 pounds in 12 months. I did it by eating less and exercising more. And by tracking what I ate in a spreadsheet. I recorded calories for each meal and tracked my daily weight. By tracking my foods it was easy to see where snacking and poor food choices were hurting me. I was able to eliminate about 1000 calories a day from my diet and lost weight rapidly for a few months.
I wasn’t able to sustain my lowest weight for more than a couple of years. Over time it slow crept up until I had gained about 20 of the lost pounds back. I was eating more and exercising less. While my weight has been stable for the past 3 years I wish I weighed a bit less.
Lose It! makes it very easy to track all the foods I eat in a day, and it tracks my exercise to give me a more accurate feel for my net calorie intake. I can see in graph form my weight loss and I have a historical record of my food, including a nutrient breakdown day-by-day or week-by-week.
##Extensive Database of Foods One of the best features of Lose It! is the extensive database of foods. You can perform brand name searches for both supermarket and restaurant foods. Want a Starbuck’s chocolate brownie? 410 calories. Olive Garden Lasagna Classico? 850. Frosted Flakes cereal? 427 for 2 cups. The app also includes a bar code scanner making it very easy to add foods. Instead of searching for Crispex cereal I just scanned the box.
Once you’ve had a food there are two ways to repeat it. Lose It! keeps a list of “My foods” that has everything you’ve ever entered into the app so you can quickly find a favorite again. The app also keeps track of your previous meals making it simple to repeat them. I tend to eat the same thing for breakfast several days in a row - Crispex cereal (220 calories) with milk (81 calories), and a glass of orange juice (165 calories). Until the box empties and I switch to a different cereal I’ll eat the same meal, so being able to just look up yesterday’s breakfast and reuse it today is a real time saver.
You can also easily repeat portions of a meal. Once you’ve selected a previous meal you can swipe any food item listed to delete them. Had a sandwich with pickle yesterday and the same sandwich again today without the pickle? Reuse the meal and delete the pickle with a swipe.
##Recipes Lose It! lets you record your recipes. Once you’ve entered in all the ingredients you can set the number of servings the dish makes and get a calories per serving estimate. In the three weeks we’ve been using the app I’ve already created 7 recipes. Best of all through the Lose It! website it’s possible to share these with my wife so she can track her portions too.
Now I know a bowl of my homemade chili is 264 calories or that 7-layer cookies are 316 calories per cookie.
##Usage Patterns In my use of Lose It! I’ve found it’s best to enter foods prior to eating them. As with anything you need to budget knowing the cost before you spend a limited resource is important. Based on my weekly goal of losing a pound per week I can only net 2064 calories per day. Eating first and recording second makes it all to easy to over indulge and exceed my calorie budget for the day.
The first time I eat something where there’s any question as to the size of the portion I get out a measuring cup and determine the exact size. I always thought I had about a cup of Crispex or Frosted Flakes in my cereal bowl. Turns out it’s 2 cups.
Exercise works the opposite way. I don’t enter my music playing, gardening, or walking exercise until I’ve completed the activity. It’s all too easy to think I’ll walk for 30 minutes on the treadmill and enter that into Lose It! and then not finish the walk for some reason.
##Goal Setting and Tracking When you start with Lose It! you can set a weekly weight loss goal and it determines a calorie budget for you. I set my gaol to be one pound per week and so my budget is 2064 calories a day. I believe your height and weight are factored into this calculation as my wife (who is as tall as me) has a different calorie budget goal.
The app lets you record your daily weight and produces a nice graph of your weight loss.
##Success In the three weeks since I’ve started using Lose It! I’ve lost 3.8 pounds - just a little ahead of my pound-per-week goal. Just as recording everything in a spreadsheet 6 years ago increased my awareness of what I was eating using Lose It! has me thinking about my diet proactively. I’ve also started exercising on a daily basis - seeing the net calories go down as I walk is a great motivator.
I highly recommend Lose It! Having an app on your phone to track your exercise and calorie intake is wonderful. No matter where I am I can easily track my nutrition and exercise. Best of all it’s free.
Six years ago in early July 2006 I joined eHarmony hoping to find someone to spend my life with. I wasn’t at all sure it would work but I was determined to try.
Six years ago today I received the following email at 6:31 am in the morning.
Dear Mark and Sibylle,
eHarmony’s Compatibility Matching System has found that you two are a highly compatible match, based on our rigorous 29 Dimensions scale. With this level of compatibility, we believe you two will have a lot to talk about and may even find true love together.
So, Mark and Sibylle, we’d like to make an introduction.
Sibylle lives in Manhattan, Kansas United States. Mark lives in Overland Park, Kansas United States.
The next step, Mark, is for you to begin communicating with Sibylle. Explore your shared areas of compatibility, and have fun discovering if there’s chemistry.
Remember, your match has been carefully selected from millions of candidates because you share extraordinary levels of compatibility in the areas proven to create relationship success. So we encourage you to consider this match with care and find out what lies beyond your summary profiles.
The next step is simple—just begin communicating today!
Sincerely,
Dr. Neil Clark Warren Founder, eHarmony.com
At the time I didn’t know that Sibylle would become my companion, lover, best friend, partner, and wife. We moved through the first questions and then “must have’s and can’t stands” followed by second questions and finally to sharing messages through eHarmony. Within a week we were emailing each other multiple times a day. In the three weeks between our introduction and when we first met in person on August 12th, we sent over 400 emails.
In the intervening six years we have lived together, traveled together, moved together, and grown together. We are very fortunate to have each other, to have the relationship that we share.
Yes, we are an eHarmony success story. More importantly we are our own success story.