Ghost
June 23rd, 2009 by pyrat
Ghost is a nice way to configure your development machine for subdomain based application access.

Ghost is a nice way to configure your development machine for subdomain based application access.
I like car adverts, especially ones like these.

Dont you hate running out of stuff?
Im fed up of running out of things so have been developing a healthy? obsession with buying stuff in bulk. Its a good feeling when you know that you have enough supplies to eat beans on toast for another 10 days straight.
This is rails specific to a certain extend and involves setting the expires header on static asset to make browsers cache. This can be dangerous so is best used with timestamped css and javascript assets.
By default: rails helpers will add a timestamp onto the end of the asset so when you redeploy the file the browsers will recache the file because the timestamp has changed.
eg.
<script src="/javascripts/all.js?1242919746" type="text/javascript"></script>
To setup mod_expires apache on debian based:
sudo a2enmod expiresThen in your config
ExpiresActive On <FilesMatch "\.(js|css)$"> ExpiresDefault "access plus 1 year" </FilesMatch>
You can easily add image types to this as well but often css loads images and designer often forget to use these helper methods. So in the real world just doing it with js and css makes it safer to do with maximum performance gain.
When doing some performance tuning for iformis I have noticed a lot of HTTP overhead in serving pages in modern web applications. This is often due to image heavy designs, large javascript libraries and since the average connection speed of clients has increased, asset number and size are being pushed to the background.
By default apache does not perform gzip compression. I recently turned this on and along with a small increase in load I noticed a large performance increase from the client side.
To turn it on (debian / ubuntu)
sudo a2enmod deflateNow im not a fan of copy and paste configs but included below is the mod_deflate config I am currently using. At least read it before using. (Doesnt gzip certain file type and turns off some gzipping for older browsers.)
SetOutputFilter DEFLATE SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ \ no-gzip dont-vary SetEnvIfNoCase Request_URI \ \.(?:exe|t?gz|zip|bz2|sit|rar)$ \ no-gzip dont-vary SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
When you have an old version of ubuntu but want a new version of git. And potentially have it already installed.
sudo apt-get update sudo apt-get remove git-core sudo apt-get install tcl8.4 tk8.4 sudo apt-get build-dep git-core wget http://kernel.org/pub/software/scm/git/git-1.6.3.1.tar.gz tar -zxvf git-1.6.3.1.tar.gz cd git-1.6.3.1 ./configure make sudo make install sudo ln -s /usr/local/bin/git /usr/bin/git
Mainly to help me remember in the future. Might be useful to you also..
sudo apt-get update sudo apt-get install imagemagick sudo apt-get install libmagick9-dev sudo gem install rmagick
I recently started venturing outdoors to climb instead of at the normal sweaty climbing wall. Its great to climb outside and I like the natural feeling of climbing on rock.
Got a long way to go to hone my technique.
Here is a video of a californian dude, showing us how its done.
The beast day. 30km due north and we had to get a train at 15:08. An early start was on the cards.
Up at 6am, started at 7am with a good tailwind and hard snow. The time constraints changed the feeling of the day, we were in race mode. Skinning a lot faster, and resting was kept to minimum. Helen kept hurrying me along and was a bit more stressed about the situation than me.
After 2.5 hours we made it to kvilebu (pictured above). This tiny little hut has 2 beds and must take a beating in the winter as it is in a really exposed spot. At this point we realised that we were 1.5 hours ahead of schedule. The combination of determination, tail wind and favourable snow conditions had really paid off.
We pressed onto the first descent of the day. The snow was in bad shape having been destroyed by strong winds at some point. The gradient was pretty serious though which made for a good time, something like 35-40 degrees I reckon.
This is were we really appreciated our wide skis with sharp metal edges. Although lighter mountain skis are better most of the time, they are rubbish for descending. For me, its mostly about descending!
Next we skated out of the frozen riverbed and onto the next descent where we passed a bewildered group of men inspecting some hydro equipment. Again the snow wasnt ideal, we straightlined a lot of the descent to maximise speed. This meant that as we entered the hundalen valley flow we managed to get a fair way across it!
We stopped for a power break and basked in the glorious sunshine. (It really warmed up after about 12pm most days. But was often cold circa -15 at the start of the day.)
Next we skinned towards katterat and as we approached the final section I became very excited and took off my skins. This was a mistake. It turned out to be very undulating so we had to skate for a lot of the uphills with heavy rucksacks. I ended up exhausted and sweatier than a ‘paed in a playground’. Finally the frustration was over and there was a sloppy powder descent back to Katterat station, where it all began.
This is a former German stronghold from the German occupation of Norway during the second world war.
I heartily recommend ski touring in the mountains around Narvik. April is a great time it seems, as days are longer and warmer, whilst the snow conditions are still good.
See this post for a list of things we took on the trip. Really cutting down on what you take avoids a heavy pack which really spoils the fun.
We met one guy who has a packed to the brim 130L rucksack; and others who were pulling sledges as well as rucksacks. Not my idea of a good time.
Next on the list is some ski touring in either the swiss or french alps. Also planning on taking up the sport of splitboarding to keep the snowboarder in me alive and well.
Introducing daily photo a wee web application which lets you upload photos to flickr on a daily basis. This allows you to make the most of RSS feeds and social applications that link to your flickr account.
Daily photo will also be useful if you run a photo blog which is powered off flickr. The ability to decide when photos appear is functionality which flickr is sorely missing.
Daily photo is a wee app, written in hours rather than days. Functionality is as minimal as possible while getting the job done. Steps to getting your flickr uploads scheduled are as follows:
So if you have a need for daily photo, your welcome! Fill your boots.