Writing with Sinatra...
Thursday, 05 February 2009
My fiancee really wants a portfolio site to show off her freehand work. After watching Peepcode's tutorial on HAML & SASS markup I'm going to have a go at using Sinatra to put one together for her.
Mock it up in photoshop, chop up the psd and use haml & sass markup to get it done.
sudo gem install sinatra haml
Then the TextMate Bundle
git clone git://github.com/handcrafted/handcrafted-haml-textmate-bundle.git HAML-Handcrafted.tmbundle
It runs with rack so should be fine with thin and my nginx setup.
Was going to replace Thin & Nginx with Passenger, but that just seems a waste of a really good layout. I've got Github setup to handle the code backups, and Strongspace as a secondary failover in case the worst happens. Should go good.
Some really awesome design examples here...
- Single-Page Portfolio Sites
- My Web Arts
- Sample CSS layout code
- The One-Page graphic design portfolio guide
- Elliot Jay Stocks
...watching Gone Baby Gone, good acting from Casey Affleck (can very much see his brother in the role, however I think Casey's got a better chance at the rough story acting). Gran Torino was excellent, not what you expect but really great story and good acting all round.
...can't wait to watch Benjamin Button
Matilda's done, you smart
Monday, 05 January 2009

Matilda is a project of mine that came about from the growing reality that I needed a blogging engine that could adapt and grow to my needs, and in turn use as a teaching tool to develop more manageable solutions.
I'd used Wordpress before for about 3 years, and to a point was happy with the experience but had little control over what I was getting, and whether each upgrade would install ok against the multitude of plugins I needed to have the features I wanted.
I started hunting for more options, Feather looked promising with the MERB engine but still left me with something that wasn't simple to effect and all-you-need solution.
With my previous engine Typo sucking up more server resources than a kid on an ice-cream binge it was finally a time to discover exactly how hard it'd be to build my own, which turned out to be not as hard as I first imagined; in fact it was and still is incredibly exhilarating.
What came out of all this is...
- Something that has every page cached, so it's faster to the user and a one-hitter on the database.
- Sweepers that cleanup when posts, pages, notes & links change; behind-the-scenes and automated so the Admin guy needn't worry.
- Automatic pinging to Google & Pingomatic when a new post is added to boost site traffic and keep google in the know.
- One-step integration to Twitter, Akismet and social bookmarking all embedded in the core without needing another plugin.
- Dynamic sidebars, tagging and multiple categories.
- 404 catchers to track holes in the site, especially when migrating to a new engine so those dead links in google don't infuriate future visitors to your site.
- Quick Notes and Quick Links so you can quickly record anything that crosses your mind before you forget it again.
- A simple Contact form, and all comments moderated & filtered with anti-spam Akismet, so only approved stuff ends up on your site.
- Lightning Fast Full-Text searching with Sphinx and UltraSphinx for quicker searches at little cost to your database engine.
- Prototype replaced by jQuery for quicker load times.
Ok, the entire thing took 3 months of my spare time but in terms of speed and usability it's really tight and such a strong learning tool ;-)
Source Githubbed here
Plus tutorials I've wrote that can help with you're own;
- Implementing RSS & ATOM Feeds
- Implementing Akismet
- Implementing Social Bookmarking
- Textile and MarkDown filtering
- Mongrel Clustering replaced with Thin
- Apache replaced with NGINX
photo courtesy of koller93
Running under THIN
Monday, 03 March 2008
As I really want to push THIN (the light mongrel rails server) and see how it really stands in a production environment I've decided to run this site on it for a week and see how the thing handles.
For the inquisitive, this is the command I ran to start it up...
thin start --port 8000 --environment production --servers 2
Starts 2 THIN rails servers at ports 8000 and 8001 under production mode.
Currently they're consuming about 64mb of memory (less than mongrel's 120mb).
Let me know how you think it handles.
Update
So far running pretty sweetly, much more responsive than Mongrel and the memory usage is down a heck of a lot. Considering using ArchLinux for my server box, have liked using that linux distribution.










