April 2009
1 post
Logging the domain with Apache wildcard virtual...
If you have an Apache virtual host set up to respond to a number of different domains, the two typical access log configurations (common and combined) do not include domain information. So you can see what resource is being accessed, but not for which domain. This becomes significant if you are serving different content based on the domain, as we do with Blueprint. We use the NCSA combined log...
Apr 2nd
February 2009
3 posts
Prototype.js Function#wrap →
A little gem I only found just now in the prototype.js library.
Feb 24th
htop - an advanced command-line process monitor →
Feb 24th
“" Show spaces at the end of lines hi RedundantSpaces ctermbg=DarkGrey...”
– Pop it in your .vimrc.
Feb 24th
September 2008
1 post
“dpkg-reconfigure tzdata”
– Change the timezone in Ubuntu.
Sep 25th
June 2008
2 posts
New in Rails 2.1.0 →
Jun 2nd
New in Ruby 1.8.7 →
Jun 1st
May 2008
7 posts
May 30th
Alarming events in the life of your Rails project #1: you’ve just written a Rake task labelled :armageddon. True story. Actually, some theologians posit that the event in question has already occurred, when (unrelatedly) I dropped down to SQL this morning and executed DELETE FROM users WHERE god IS NULL.
May 20th
May 16th
MacVim vs YAML
Recent builds of MacVim (23 to 26, at least) contain a broken YAML syntax file. You need to replace it with this one: yaml.vim. It goes in $VIMRUNTIME/syntax, which normally resolves to /Applications/MacVim.app/Contents/Resources/vim/runtime/syntax — but you can run :echo $VIMRUNTIME in MacVim to be sure.
May 14th
Protecting the auto-migrating schema
If you’re using Err’s Auto Migrations, you’ll want to eradicate a default Rails task that clobbers your carefully-crafted schema file. Add this to your Rakefile: Rake.application.instance_variable_get(:@tasks).delete( 'db:schema:dump' ) namespace(:db) { namespace(:schema) { task(:dump) { puts 'Schema dump disabled' } } }
May 13th
Processing.js →
May 10th
Labnotes » Git forking for fun and profit →
May 1st
April 2008
8 posts
Using Visor →
Nice and neat for the part-time Terminal user (ie, me).
Apr 27th
“It is good to know the truth, but it is better to speak of palm trees.”
– Arab Proverb
Apr 22nd
Tempfiles and very large multipart forms
Ignore the fact that problems with very large forms suggest a user interface refactoring is on the cards. When a form is multipart, the Ruby CGI module creates a Tempfile for many or all of the fields, which on some systems causes the process to die horribly emitting Last Words like: Errno::EMFILE: Too many open files This is a workaround that verges on a hack. Adding it to config/environment.rb...
Apr 22nd
“The player itself is as stripped back as we could make it. We though carefully...”
– cityofsound: Monocle: design notes
Apr 14th
“.searchbar-engine-image { margin-left: -11px !important; margin-right: 2px...”
– How to use a Firefox3 GrApple theme and still see search engine icons (if you happen to be a Cmd-K, Cmd-Down type)
Apr 9th
Let my People Have Root →
I am at times wary of Joyent, but on this subject I agree with them. We’re looking forward to trying out some Google Apps here at the Labs, but our inclination to create one is born of merely mild curiousity, which we probably won’t indulge. Certainly nothing serious, for the reasons given in the link.
Apr 9th
Apr 7th
Apr 3rd
March 2008
6 posts
“There’s a pretty simple way to place a losing bet in the technology game. Try to...”
–  Living with the Trojan iBrain - Times Online
Mar 29th
Hypertextopia →
Somewhat related to this and to something we’ve got in the pipeline.
Mar 25th
Forgiving BlueCloth
class BlueCloth < String def transform_code_spans_with_forgiveness(str, rs) begin str = transform_code_spans_without_forgiveness(str, rs) rescue BlueCloth::FormatError # Forgive unmatched backticks end str end alias_method_chain :transform_code_spans, :forgiveness end Now when your users have unmatched backticks in their marked-down text, BlueCloth will...
Mar 25th
iphone-haptics →
Haptics is where the device buzzes when you tap stuff. Not convinced. Still, interesting.
Mar 24th
Home — gitnub — GitHub →
Some web developers are like the old and vaguely racist notion of domesticated savages — at the slightest opportunity, they revert to native.
Mar 24th
Penguin Classics →
A really clever Tumblr theme by friend o’ the Labs, Max Wheeler.
Mar 2nd
February 2008
17 posts
SFUCKEN →
Virginia pointed out that Is your new bicycle has a bit in common with this expletive generator I made a few years ago. I’m slowly coming around to the IYNB meme. Probably get there by the time it’s passe.
Feb 29th
Ebb →
Another entrant in this madcap race.
Feb 29th
Constructing email newsletters from RSS feeds →
This is a clever solution to something I’d (of course) imagined something much more complicated for.
Feb 27th
ExpanDrive →
Anything that would enable me to use that copious amount of Dreamhost space seamlessly would be a Good Thing.
Feb 26th
Multi-Safari →
This does not mean that Joseph excited about doing legacy testing for a browser that, in his opinion, should not exist at all. Still, nice.
Feb 26th
castanaut at master — GitHub →
GitHub seems like a solid piece of work. Certainly getting castanaut on board was painless.
Feb 26th
Castanaut: Automate your screencasts with a Ruby... →
(Made by us!)
Feb 24th
rush, the Ruby Shell →
I probably have too much invested in bash to switch shells just now, but this might be worth keeping an eye on. See also: fish.
Feb 22nd
AirPort Disk Agent for Leopard →
If you want Airport Disks to connect automatically on start-up — if, for example, you have a remote iTunes Library stored on an Airport Disk, and you don’t want to it sprout an exclamation mark for every track — then you need this archive. More info here. It took me two months of tracking and hunting to capture this elusive little beast. It was taken from...
Feb 19th
Feb 19th
Mr Bones →
A successor to Hoe, which was unnecessarily viral. (In fact, I’m actively weeding out dependencies on any Ryan Davis code here at the Labs.)
Feb 19th
Labnotes » Gem RDoc on Leopard →
Of course, remembering port numbers is not everyone’s thing. So after doing this you could create /etc/apache2/apps/rdoc.conf: <VirtualHost *:80> ServerName gem.docs ProxyPass / http://localhost:8808/ ProxyPassReverse / http://localhost:8808/ </VirtualHost> Make sure /etc/apache/httpd.conf has these lines near the end: NameVirtualHost *:80 Include...
Feb 19th
X.V and your ~/.irbrc
By the way, in Leopard if you want your own ~/.irbrc, you can still use the system-wide one (which has persistent history, tab-completion and other stuff). Just put this line at the top of your ~/.irbrc: load '/etc/irbrc'
Feb 19th
A little something for your irbrc
class Object def specific_methods (self.methods - Object.instance_methods).sort end def self.specific_class_methods (self.methods - Object.methods).sort end end Use it like so: >> "foo".specific_methods => ["%", "*", "+", "", ">", ">=", "[]", "[]=", "all?", "any?", "between?", "capitalize", "capitalize!", "casecmp", "center", "chomp", "chomp!", "chop", "chop!",...
Feb 19th
“Lots of computer scientists had been chiseling away at the problem for years,...”
– ongoing · XML People
Feb 18th
Feb 18th
“Wisdom is a river, not a pool.”
Feb 18th