top: 0; bottom: 0; /* Aligns Vertically */ left: 0; right: 0; /* Aligns Horizontally */ } /* Make sure the centered element fits into its container. If you know that's the case, you...
...unknown, technique in Ruby. For certain types of problems (e.g. when you have a set of rules) this gives you such an elegant way of describing the solution. There’s...
...no meta programming or monkey patching involved, it’s short and sweet and best of all: it’s very intuitive...
Trample is a more flexible load simulator. Instead of a static list of urls, trample's configuration language is ruby. Using ruby's blocks (lambda functions), it's possible to...
The goal of modelling is to produce something substantially simpler than the world. This is achieved not through endlessly inventing new types and relationships -- in fact, it's just the...
...s by eliminating entities and restricting types that we get a model that's simpler than the world and thus useful...
When CoffeeScript was added to Rails 3.1 they forgot one very important part, the ability to use it when responding...
When you install Type 1 fonts (like makandra's corporate typeface), they won't show up in OpenOffice. OpenOffice requires some additional files to process them. Stefan Gründel found out...
There is a tool that can produce the missing files: sudo apt-get install t1lib-bin Now you can create .afm files: cd ~/.fonts type1afm *.pfb
...merge in the file named with %A by overwriting it, and exit with zero status if it managed to merge them cleanly, or non-zero if there were conflicts...
...at least four times2, including a recent rewrite for the upcoming Rails 3. The syntax is now more concise. But never mind making it shorter! It’s time for a...
...when there’s a gem update I know that it has actually been tested somewhat and it’s not just whatever random point HEAD happens to be at, at that...
decided to go fixtureless with Shoulda + Factory Girl. All good, except one problem. Slow as fuck tests. So here’s fast_context as a solution for it. fast_context compiles...
...all the ‘should’s within a context into a single test...
...the ‘border’ of any block level element gets factored into it’s final box size for layout. That means that if you add a border on a hover to an...
...element that didn’t already have a border of that exact size, you will cause a layout shift...
...a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built...
...time programming languages understood what the kids are typing these days. So let's start with a baby step in that direction: Like, Python...
...Apple does not want is for some other company to establish a de facto standard software platform on top of Cocoa Touch. Not Adobe’s Flash. Not .NET (through MonoTouch...
Inspired by a snippet of code in Oliver Steele’s legendary Functional library, here’s a lightweight tool to help keep track of JavaScript invocations. It works in Chrome, Safari...
Lemonade’s goal as a sprite generator is to be incredible easy to use, so you’ll use ist for every project—just because there’s no overhead. It needs...
...no configuration, no Rake task, no Photoshop, just a little change in your Sass or SCSS files...
...remember that the pain is temporary. It’s a little like a vaccine—the shot hurts now, true, but it’s really not that bad in comparison to the disease...
The problem isn't that Git is to hard, it's that smart developers are impatient and have exactly zero tolerance for unexpected behavior in their tools. While Git is...
...now, perhaps some day you will come across a grizzled developer who is using SVN, and when you ask him why, his answer won't make sense, because it's...
...for example through an Ubuntu release upgrade) you might notice that Thunderbird will not show any of your old e-mails or settings. This results from a different directory being...
...used for storing profiles and configuration. You can replace the blank profile with your old one like this: cd ~ mv .thunderbird .thunderbird-invalid cp -R .mozilla-thunderbird .thunderbird
...convinced that an error must be very close to the network card, OS IP stack or compiler. In reality this is quite rare, so before continuing, triple-check that the...
...issue is not located between chair and keyboard... If you're still convinced that a in-depth analysis of network traffic might help you, go on: Find out the IP...
...I found the same problem, but only on my wife's account. I'd set her keyboard layout to UK through Gnome preferences and every time the US layout would...
...reappear and be selected frustratingly.\ It turned out that on the gdm login screen her choice of keyboard layout in the discreet option bar at the bottom of the screen...
Around the time in my life when I stopped ordering drinks made with more than one ingredient, I was woken up for the last time by a hypochondriac Nagios monitoring...
...If you are on-call long enough, you cultivate a violent reaction to the sound of your cell phone's text message alert. If your monitoring is overconfigured, that reaction...
rspec_spinner is a progress bar for RSpec which outputs failing examples as they happen (instead of all at the end). Installation gem install rspec_spinner Usage script/spec -r rspec...
...spinner -f RspecSpinner::Bar -c To make a shortcut in your .bashrc alias ss='script/spec -r rspec_spinner -f RspecSpinner::Bar -c' There's also an alternate runner RSpecSpinner::Spinner...
Ubuntu lets you mount an SSH shell into Nautilus from Places -> Connect to server (select "SSH" as server type). In order to copy a file over SSH from a shell...
...scp filename username@remotehost: The trailing ":" directs the file to username's home directory on the remote host. You can also copy a file from the remote host to your...