I survived a few high traffic moments from Hacker News and was thrilled to see the site stay up even when I managed to break MySQL on the server.
Another benefit of static sites compared to dynamically generated pages is speed and reduced server load. Tyler Hall has a similar setup to this site, but he uses incron instead of a normal cronjob. This should reduce the server load even further if your hosting provider gives you enough access or you have complete control over your server. Once you install and configure everything posting new articles is even easier than with bookmarklets, e.g. for Tumblr or WordPress.
The PHP generator script runs on the server. The entire blog is kept in Dropbox, and through a dummy account linked to my server synchs automatically with the server whenever I make a change. Most iPhone and iPad text editors work with Dropbox, so I can write and publish wherever I am.
I always used WordPress for all of my sites. I also recommended the publishing platform to a lot of clients and friends who wanted to run a website that wasn’t necessary a blog. During the last couple of months I begun switching more and more sites to static sites that are automatically generated on the command line. This has not only the benefit of a much better performance, it is also more secure. There are no scripts that could potentially give an attacker the chance to take over the server or at least your user account.
I started with this site and migrated it to Jekyll. My publishing workflow was rather tedious. I had to manually create a text file, and then commit it to the server. An update hook on the server automatically updated the published site. Inspired by David’s article I got rid of the Git part and replaced it with Dropbox. The server instance runs as a separate user. It has only access to the raw website and not my whole personal Dropbox folder. I’ve written a small server-side script that checks every two minutes if there are any changes inside Jekyll’s post folder. When I modify an article or create a new one, the site is regenerated. I wanted to use incron, but this server doesn’t have inotify and there’s no chance to install it. Additionally I created a Keyboard Maestro script that takes the current selection from Safari, creates a new text file in the drafts folder and optionally opens BBEdit with a new article and the quote.
The best thing about this setup is that I can write articles and publish them from almost everywhere. I wanted to share all scripts, but they’re tightly coupled to installation and deployment paths. It needs a lot more work to clean everything up and make it usable for everyone.
2015-05-24 Update: I was contacted by the awesome folks at Smile Software. The workaround described in this article no longer applies for TextExpander 4.x and newer:
Unfortunately TextExpander expects that key to hold an array value, not a string value as you suggest. Making the described change makes the Settings.textexpander file unreadable by the application. The correct instruction would be to insert
Of course, that only makes a difference with TextExpander from the 3.x vintage, and on OS X prior to 10.7, so overall the instructions really aren't applicable at all for TextExpander 4.x and current OS X's.
TextExpander is the tool you need to install on your Mac. It works flawlessly in the background and substitutes all of your abbreviations with meaningful snippets. Newer versions of TextExpander support smart replacement which basically means that they don’t use the clipboard anymore. Instead they detect that you work inside a Cocoa text view and try to replace the abbreviations in a smarter and much faster way. Unfortunately MacVim uses its own implementation of Cocoa’s text view which misses some functionality. TextExpander doesn’t detect this and inserts strange characters into MacVim.
One workaround is to activate „Always use clipboard to insert snippet“ in the „Expansion“ tab of TextExpander’s preferences. This has the huge drawback that replacing abbreviations works slower than it should—everywhere on your Mac.
Fortunately Smile’s support ninjas mailed me a solution within a couple of hours. In three easy steps you can get the best of both worlds: the old clipboard replacement in MacVim and the new and blazingly fast replacement method in other applications without manually changing preferences.
/Users/rafael/Library/Application Support/TextExpander/Settings.textexpander(preferably with Xcode 4 or the Property List Editor).
forcePasteBundleIDswith the string value
org.vim.MacVimto the property list and save it; don’t forget to restart TextExpander.
That’s really everything you need to do to enjoy your TextExpander snippets in MacVim without having to use the old replacement functionality.