Posted on December 21, 2007
Ubuntu comes with a nifty script installed that is run when you type a non-existing command. It checks to see if there is a package that will provide this command and if there is it will show you a nice message how to install it. I do like this functionality but now that my system has pretty much all I need, the slight delay caused by running the script has become annoying. I could just do a 'sudo apt-get remove command-not-found' but I would still like to able to quickly check if there is a package providing a command if I want to. A few lines added to my ~/.bashrc can do exactly that:
command_not_found_handle() {
return 127
}
alias check-command=/usr/lib/command-not-found
This redefines the command_not_found_handle defined in /etc/bash.bashrc to just display an error message and gives me check-command to check if a package is available for a command. And finally again 'l s-l' will barf at me instantly again :). And:
$ check-command aatv
The program 'aatv' is currently not installed. You can install it by typing:
sudo apt-get install aatv
$ check-command emacs
Command 'emacs' is available in '/usr/bin/emacs'
Posted on December 13, 2007
This one has been on the inter tubes for a while but comes highly recommended by me. Ali Davis kept a journal of stories about her experiences
working at a video store.
Posted on December 11, 2007
My foremost personal hero is Richard Feynman: extravagant extraordinaire and reluctant Nobel prize winner. His skill at explaining his field (theoretical physics in general and quantum mechanics in particular) was so remarkable that the notes he prepared 44 years ago are still used by physics majors world wide. More impressively: after listening to his lectures even I briefly feel like I understand the subject :). He had the guts to stand up for what he believed was the right thing to do against advise by others: a quality that seems to be all too rare these days.
Here is a list of available online resources of Richard Feynman:
xkcd
Posted on December 11, 2007
A novice of the temple once approached the Master Programmer with a question. "Master, does Emacs have the Buddha nature?" the novice asked. The Master Programmer had been in the temple for many years and could be relied upon to know these things. He thought for several minutes before replying. "I don't see why not. It's bloody well got everything else."
(shamelessly lifted from ykr)
Posted on December 10, 2007
I sure do love my autotest but I have been having problems due to how it interacts with emacs.
Emacs rails mode uses flymake to do syntax checking while you type and to do this it creates a file called buffer_name_flymake.rb in the current directory. When autotest detects this file, it starts to run it but by that time emacs has closed and deleted it already which causes autotest to crash.
The only solution I could find online was to set exceptions of the Autotest instance so that it will match the flymake file, but autotest only prunes directories and therefore this does not work.
My solution was to add one line to the find_files method in gems/ZenTest-3.6.1/lib/autotest.rb after line 292 that makes it always ignore flymake files:
289 ...
290 next if test ?d, f
291 next if f =~ /(swp|~|rej|orig)$/ # temporary/patch files
292 next if f =~ /\/\.?#/ # Emacs autosave/cvs merge files
293 next if f =~ /_flymake\.\w+$/ # Emacs flymake files
294 ...
Download the entire patched file
I have submitted
a patch with this fix so hopefully the ZenTest people will include it in the next release.
1 comment
Posted on December 04, 2007
Putting a weblog online has been long coming - being a web professional and all that - so I thought I'd spend my day doing just that. And here it is!
Featuring: Ruby on Rails (on edge), Mephisto, Haml, Slicehost, Gutsy Ubuntu, Apache, Mongrel and many others.