Not only can it save enormous amounts of bandwidth:
Presto reduced the updates to 2.9 M from 74 M which is a 97% savings.
What I like about the presto deltarpms plugin for yum is, that it shifts the burden especially for large updates from a potentially scarce resource to a more plentiful one: from the network to the local CPU. Also, I find the bit of reporting that it comes with just exactly right.
Finishing rebuild of rpms, from deltarpms <delta rebuild> | 74 MB 00:56
Nice!
This morning my machine totally stalled: first thing I noticed was that there was a cat process causing heavy IO wait, next thing the hard drive was nearly full. After some digging it turned out that some unsuccessful printing attempts had left 75G worth of messages like below in the message log, which had just been archived. Printer still doesn’t talk to me …
... prnt/hpijs/services.cpp 386: unable to write to output ...
I personally don’t believe, that a printer driver should keep writing the same error message to syslog a gazillion times, even if that is an effective way of making the system go quiet eventually.
After about 8 months, I felt that it was time to part with my Eee PC 1000HA Netbook, especially after I had gotten to actually touch (and lift) an Acer Timeline Laptop.
I had originally bought the Eee for its being small and light and the 6 hours of (new) battery runtime. The latter had naturally gotten lesser over the past few months and there were also times when the Atom CPU just didn’t cut it. Now that the CULV class of thin-and-light laptops is out on the market, I felt that this was what I had actually been looking for in the first place.
The specs of the new machine excel in several places: CPU (Intel Core 2 Duo SU9400), hard drive (Intel X25-M), RAM (4GB DDR3) are all performance relevant parts of the package that the Eee is no match for. Thanks to the hard drive being an Intel SSD (hdparm -tT says we’re reading at 160MB/s), I can now boot Linux entirely in the same time that my X58 Core i7 machine needs to get through all if its BIOS initialization screens (ugh!), which is about 10-12 seconds. Incredible. The CPU is a joy (compared with the Atom) I like having a digital display output (HDMI) and I got an actual 6 hours of work out of the thingie when I tried.
What’s the catch You ask? The model with the Intel SSD I bought (AS3810T-6775) appears to have disappeared from the market. And the keyboard and touchpad do not get a recommendation, especially the former definitely reminds me of the low price ($799) of the laptop as it feels like a toy.
The to_sentence method is nothing terribly new – just another reason why one would want to work with Ruby on Rails:
irb(main):005:0> require 'rubygems' => true irb(main):006:0> require 'activesupport' => true irb(main):007:0> ['John', 'Paul', 'George', 'Ringo'].to_sentence => "John, Paul, George, and Ringo"
Not the hardest thing to do, certainly not as complicated as I had thought it to be and next to perfect for my file server at home. Here is what I had to do:
- get the brackup sources via svn (from http://code.sixapart.com/svn/brackup/trunk/)
- on my Fedora 10 Server, I had to install perl-Net-Amazon-S3 and perl-DBD-SQLite via yum, ymmv
- perl Makefile.pl, make and make install did their usual trick (you’ll end up with an installed program that is)
- after that, just execute brackup in your home directory once: it will come up with a help message and create an example config file there (~/.brackup.conf)
- Add your backup source description and S3 credentials there
- to complete the configuration, you will also need your gpg key available (I had to create one with gpg –gen-key)
Now with a source like, say Documents configured, you can just brackup –from=Documents –to=amazon and it will just encrypt and backup everything in there to your S3 account. Stop making up excuses – start backing up your digital photos!
Here is an example config file:
[TARGET:amazon]
type = Amazon
aws_access_key_id = xxxxxxxxxxxxxxxxxxxxxx
aws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxx
keep_backups = 5[SOURCE:Documents]
path = /home/steffen/Documents/
chunk_size = 5m
gpg_recipient = F179E120
As this has never worked right out of the box (the necessary files are in places not expected by the gem installer), here is what I do:
sudo gem install mysql -- --with-mysql-config=/usr/lib/mysql/mysql_config
In this nice blog entry is some description of how to make rails work with passenger on site5. As I liked to have Sinatra working for myself (and had the sinatra and rack gems installed locally), here is how it works for me:
- As usual with rails apps, have a symlink point from within $HOME/public_html to the public folder of your sinatra app.
- Create a .htaccess file in the same public directory, looking like
PassengerEnabled on RackBaseURI /linkname
which certainly means that you have to put in the name of the symlink
- Create a config.ru file in the app root
ENV['GEM_PATH'] = "#{ENV['HOME']}/gems:/usr/lib/ruby/gems/1.8" ENV['GEM_HOME'] = "#{ENV['HOME']}/gems" require 'rubygems' require 'sinatra' set :env, :production disable :run require 'app'The only significant change to a plain config.ru is the addition of the GEM_PATH at the very top of the file – this way your locally installed gems are being picked up by passenger
One more thing: it turned out to be a good idea to include the ENV['GEM_PATH'] = “#{ENV['HOME']}/gems:/usr/lib/ruby/gems/1.8″ line on top of the rails application file as well. Without that, starting a fresh passenger fork will cause an exception – it will however work on the second attempt. Will have to look into this …
As part of a Sinatra project, I gave Haml a try. The What is it section promises (among a number of technical aspects) positive feelings galore, which I was a little sceptical about:
Give yourself 5 minutes to read the Tutorial and then go convert one of your RHTML templates to Haml. Feel the power of the “DELETE” key. Simplify. Enjoy. Laugh. 20 minutes later, you will never go back.
But after having converted all of my erb templates in about 45 minutes, I was indeed smiling. Try it yourself!
Ok, this was easy. Some googling revealed the reason that none of my generated rspec tests would ever be picked up by autotest. You apparently have to export RSPEC=true in your shell, prior to starting autotest. So here is the getting started list:
- Install gems rspec, rspec-rails, ZenTest, redgreen
- generate scafffolds/models/controllers with the rspec method (installing the gems gives you, among others, the additional generator targets rspec_controller, rspec_model, rspec_scaffold)
- export RSPEC=true and start autotest
One quote from my first autotest run:
Finished in 0.963479 seconds
400 examples, 400 failures
While being all convinced of and impressed with all the advantages of developing with RSpec, cucumber and autotest, I have yet to find the time to actually start doing it. And there is not that much information out there (the bigger pieces probably being the screencasts on peepcode.com). I will try and document some of the more interesting findings as a convert. Right now, my rails project has reached its first milestone and is (or appears to be) functionally stable. Even if this was the case (which I do not really believe), keeping it that way would be worth writing tests.