diff --git a/published/2006.02.22-intelligent-migration-snippets-0.1-for-textmate.md b/published/2006.02.22-intelligent-migration-snippets-0.1-for-textmate.md index 0e452e3..e8e09e6 100644 --- a/published/2006.02.22-intelligent-migration-snippets-0.1-for-textmate.md +++ b/published/2006.02.22-intelligent-migration-snippets-0.1-for-textmate.md @@ -7,7 +7,7 @@ Tags: mac os x, textmate, rails, hacking, migrations, snippets *This should be working now. I've tested it under a new user account here.* -*This does requires the syncPeople bundle to be installed to work. That's ok, because you should get the [syncPeople on Rails bundle](syncPeople) anyways.* +*This does requires the syncPeople bundle to be installed to work. That's ok, because you should get the [syncPeople on Rails bundle][syncPeople] anyways.* When writing database migrations in Ruby on Rails it is common to create a table in the `self.up` method and then drop it in `self.down`. The same goes for adding, removing and renaming columns. diff --git a/published/2011.12.10-static-url-shortener-using-htaccess.md b/published/2011.12.10-static-url-shortener-using-htaccess.md index e1305b1..318ab2b 100644 --- a/published/2011.12.10-static-url-shortener-using-htaccess.md +++ b/published/2011.12.10-static-url-shortener-using-htaccess.md @@ -5,11 +5,11 @@ Author: sjs Tags: s42.ca, url, shortener, samhuri.net, url shortener ---- -This blog is statically generated. A few Ruby and Node.js scripts along with a Makefile and some duct tape hold it all together. All of [samhuri.net is on Github](GH) if you want to take a look. Most of it is quite minimal, sometimes to a fault. Little improvements are made here and there and the most recent one is neat [.htaccess](htaccess-wiki) hack. I want to automatically announce new posts on Twitter so short URLs are in order. +This blog is statically generated. A few Ruby and Node.js scripts along with a Makefile and some duct tape hold it all together. All of [samhuri.net is on Github][GH] if you want to take a look. Most of it is quite minimal, sometimes to a fault. Little improvements are made here and there and the most recent one is neat [.htaccess][htaccess-wiki] hack. I want to automatically announce new posts on Twitter so short URLs are in order. -I try to strike a reasonable balance between writing everything for this site myself and using libraries. A quick look at a few short URL projects was enough to see they weren't what I was looking for. They were all database backed servers. Comments on this blog are served up dynamically but everything else is static and I try to avoid dynamic behaviour when possible. Comments are moving to a more static system sometime. Anyway I registered the domain [s42.ca](s42) and nabbed [an algorithm for creating the short codes from Jonathan Snook](snook) before diving into TextMate to implement my idea. +I try to strike a reasonable balance between writing everything for this site myself and using libraries. A quick look at a few short URL projects was enough to see they weren't what I was looking for. They were all database backed servers. Comments on this blog are served up dynamically but everything else is static and I try to avoid dynamic behaviour when possible. Comments are moving to a more static system sometime. Anyway I registered the domain [s42.ca][s42] and nabbed [an algorithm for creating the short codes from Jonathan Snook][snook] before diving into TextMate to implement my idea. -The result is about two dozen additional lines of Ruby in my static generator, and a command added to a Makefile. The Ruby code generates a short URL for each of my blog posts and then creates a [RewriteRule](RewriteRule) directive to redirect that short codes to each corresponding blog post. Then the directives are dumped into a .htaccess file which is [scp](scp)'d to s42.ca when I run `make publish_blog`. +The result is about two dozen additional lines of Ruby in my static generator, and a command added to a Makefile. The Ruby code generates a short URL for each of my blog posts and then creates a [RewriteRule][RewriteRule] directive to redirect that short codes to each corresponding blog post. Then the directives are dumped into a .htaccess file which is [scp][scp]'d to s42.ca when I run `make publish_blog`.