Archive for October, 2009

Script identifying CSS shorthand possibilities

Wednesday, October 21st, 2009 by Jesper Rønn-Jensen

For my own convenience I created this script to identify css files where colors like #aaaaaa can be rewritten in the short form #aaa (saves bandwith, but can also make it easier to identify similar colors) grep -nE ‘#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3’ **/*.css output from a random project: css/actions.css:19: color: #000000; css/actions.css:38: color: #000000 !important; css/actions.css:53: color: #ffffff […]

Resolve Symlinks When Copying Files With Rsync

Thursday, October 15th, 2009 by Jesper Rønn-Jensen

In a project I’m working on there is a structure where images and css are common for some of the subprojects. One folder has static pages for testing HTML + CSS layout. This folder has some symlinks to the /css folder and /images folder. Now, on my Mac during normal development, this works perfectly. But […]

Extract HTML Structure From Page With Simple Script

Monday, October 5th, 2009 by Jesper Rønn-Jensen

I often want to extract parts of HTML page. Often I find myself parsing a doc with Nokogiri and extracting it with a CSS selector. It’s pretty straight-forward from scratch. To follow the Don’t Repeat Yourself principle, I created a script to make it a one-liner. Just run ruby parsepage.rb [url] [css_selector] Feel free to […]

Useful Usability Tips

Friday, October 2nd, 2009 by Jesper Rønn-Jensen

Smashing Magazine recently published “10 Useful Usability Findings and Guidelines“. Actually great work by Dmitry Fadeyev. I find the list well-written, well documented and the principles are easy to apply (or advocate in your team). The main points are: 1. Form Labels Work Best Above The Field 2. Users Focus On Faces 3. Quality Of […]

Motivation Video: Don't Give Up if They Let You Down

Thursday, October 1st, 2009 by Jesper Rønn-Jensen

Great motivational video. If you are turned down like the Beatles by the Decca record company, never give up! Video title: “If you’ve never failed, you’ve never lived” The Beatles story (from wikipedia): In 1962, British Decca executive Dick Rowe turned down a chance to record The Beatles in favour of local beat combo Brian […]