I wanted to add a menu item in Finder’s context menu that would open the selected folder in Textmate. A google search suggested the method described by K. Adam Christensen on his blog: “Opening a directory in TextMate from Finder“. However, from the documentation, I learned that that method is now outdated. Snow Leopard users […]
Continue reading »How To add “Open folder in Textmate” to ...«
For a project I’m working on, I had to change some files with personal settings, and the files kept showing up with a git status. Adding files to .gitignore that are already tracked does not work. (and it’s actually pretty well documented in the documentation). In stead, it’s possible to use this command: git update-index […]
Continue reading »How to make Git ignore files that already exist in y...«
There are alternatives to Resolve Symlinks When Copying Files With Rsync . How about firing up a (tiny) webserver that starts up quickly. Yehuda Katz suggested this some years ago: Just drop this file in any directory, run the script, and it serves the files. I use this frequently for instance when I need to […]
Continue reading »Run Tiny Webserver From Any Directory«
When it comes to source code, i am a perfectionist. I cant stand to see trailing whitespace, interchanged tabs/spaces, etc. This Stackoverflow user asked How To Remove Trailing Whitespace Of All Files Recursively. This reply helped me to work around the fact that \s and \t are not supported in the mac version of sed: […]
Continue reading »How to Remove Trailing Space from source files«
I have recently discovered an alcoholic in my family. And in order to deal with that, a friend pointed me to Al-Anon which has material and publications to help relatives. The angle for this blog, however, is that i wrote this small script to remove scrollbars and remove menu when printing page. The script works […]
Continue reading »Greasemonkey Script For Removing Scrollbars on Al-An...«
The company I work for has negotiated a new phone deal with another tele provider, which meant everybody had to change phones and numbers. I have been using Zyb.com for syncing phones and it has helped me out great every time the old Nokia 6500 has been handed in for repair. The new Nokia E52 […]
Continue reading »Zyb.com sync with new Nokia E52 phone«
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 […]
Continue reading »Script identifying CSS shorthand possibilities«
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 […]
Continue reading »Resolve Symlinks When Copying Files With Rsync«
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 […]
Continue reading »Extract HTML Structure From Page With Simple Script«
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 […]
Continue reading »Useful Usability Tips«
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 […]
Continue reading »Motivation Video: Don't Give Up if They Let You...«
Here is a short one-liner that really annoyed my colleagues today. I set my mac to read aloud all changes in the repository since yesterday: git log –pretty=format:”%an commit %s, %ad.” –date=relative –since=yesterday |say if you remove the “say” command in the end it’s actually pretty readable: pagerbak commit VA17, 34 minutes ago. pagerbak commit […]
Continue reading »Spoken Git Commit Log — Another Annoyance at the O...«
I learned this nice little hack to bypass the standard browser setting that normally prevents background images from being printed. The hack makes use of converting the background-image to a list item with an image. /* Hack, to trick the browser to print another logo Unfortunetaly, Firefox on Windows doesn’t show logo on print — […]
Continue reading »Print CSS Background Logo Hack«
I had to clean up a public Trac ticket db where anonymous tickets are allowed. I had to issue commands like this: trac-admin . ticket remove 58 I keep forgetting the shell syntax for doing a loop over numbers. But actually a ruby script was just right for the task: ruby -e “(49..75).each{|i| %x(sudo -u […]
Continue reading »Bash or Ruby for removing multiple Trac Spam Tickets«
This post is probably highly irrelevant unless you work at Capgemini and want to use the internal nordic applications in Firefox. Read on if you want to access systems like CTR (time reporting), Event calendar, Skills database, PDR, Project forms or similar applications in Firefox. Problem is that the systems are not accessible at all […]
Continue reading »Internal Apps In Firefox«
Sometimes, when doing web development, we forget that not everybody are as familiar with the web jargon as ourselves. This example from Pixum (internet photo developer) shows a good detail: The status message from Pixum gives immediate feedback that makes it easy to go to next step Note that the status message contains a link […]
Continue reading »Sell More: Add Next Steps To Your Status Messages«
After running into some trouble with getting a Greasemonkey to work, I just wanted to share this list with you of things to look out for when your Greasemonkey script does not seem to run. What are the common pitfalls you see around. I’ll gladly add them here. I am trying to get a Greasemonkey […]
Continue reading »Greasemonkey Debugging Tips: How to Determine Why yo...«
I ran into the challenge the other day to style a<button> element to make it look like a link (with underline and everything). Unfortunately, the <button> element does not react to text-decoration: underline; But according to a discussion at the CSS Creator forum, there is a way out: I was just messing around with it […]
Continue reading »CSS Styling Buttons Problem with Underlined Text«
I was reading up on the good old HTML specification and discovered a feature I had always wanted — and it’s already there:
Creating widths of columns that will work like percentages, but will also pay attention to any small, fixed-width columns.
Take a look at HTML’s proportional widths and amount alignment features.
Continue reading »2 Must-Know HTML Table Colum Features Any Webdevelop...«
I made this addition today after (once again) struggling with option groups for a nested Rails model. My solution: create a new tag for FormOptionsHelper: grouped_select http://gist.github.com/179075
Continue reading »Selection Groups in Rails made less cumbersome«
For an internal demo, I had to make my own disabled and :hover states of some buttons. In Photoshop (Elements) it was dead easy by adjusting the color in each layer. I found that the following settings worked very well: In Photoshop, create a new layer for each button state. Select the layer and choose […]
Continue reading »The Quick Way to Creating Disabled State Icon With P...«
UPDATE 9 hours later: Changed to “remote = origin” to the specific branch “remote = dean” which works! Short explanation on how to pull changes from different Git repositories into your local Git repository. Last week I worked with three different Github forks of a project. Now for standard, when you clone a Github repository, […]
Continue reading »How to add Git Pull Shortcut to Different Github Bra...«
For a presentation tomorrow, my colleague Mads decided to include this illustration that compares the number of “rules” in some of the most used software development philosophies.I think the visualization has it all: RUP is pretty prescriptive – it has over 30 roles, over 20 activities, and over 70 artifacts. You aren’t supposed to use […]
Continue reading »Rup vs Scrum vs Kanban«
It has long annoyed me that there is no intuitive, straightforward way to disable smileys in chat programs. Today I found that these two commands can do it for iChat for mac: $ cd /Applications/iChat.app/Contents/Resources/English.lproj/ $ mv SmileyTable.plist SmileyTable.plist.bak Restart iChat. (tip from MacOSXhints.com: Disable graphical smileys in iChat 3.0 but it works for me […]
Continue reading »Remove smileys in messenger program (iChat for mac)«
Many of my colleagues know svn but are in general not (yet) ready jump over to using Git for bigger projects. Today I had to import my existing Git repository into SVN. I had been working locally with a Git repos and wanted to keep my history before giving access to my colleagues. The guide […]
Continue reading »Importing Existing Git repository into SVN«
Thanks to one of our dear readers we just discovered a bug in our commenting system that basically meant that you could not leave a comment on any of our posts. This has now been fixed and you can now again tell us your thoughts. Of cause we should have noticed, since the amount of […]
Continue reading »Comments working again«
I trimmed my installed Rubygems on my local development machine. The command “sudo gem cleanup” is just for that. Only problem: What about my older Rails apps that require a specific version of Rails, ActiveRecord, etc.? My solution: gem list –no-versions | grep -v “^active” | grep -v “^action” | grep -v “^rails$” | xargs […]
Continue reading »Shorthand to clean up installed Rubygems (but don...«
This is one of the most dissatisfying customer experiences I’ve had in a long, long time. I’m managing a website for a customer and they want to have the AdSense program running on their site. Piece of cake I thought… First off I created a new AdSense account for the domain with my customers contact […]
Continue reading »I can’t get an AdSense account«
Frustrated by internal systems! I just finished writing a page for our intranet. But now I ended up frustrated with no article published: First attempt: After spending 10 minutes writing I pressed “save and exit”. but the article never changed. Second attempt: Spent another 10 minutes writing. In the review I pressed Command+backspace to delete […]
Continue reading »IT frustration and counter-productive applications«
It all ends with the fatal Iteration#6 — at least according to this video a colleague pointed me to. Video clip is taken from “The Downfall” and texted as if we were attending a daily scrum meeting during world war II.
Continue reading »Hitler’s Final Agile Planning Meeting«
In variation of Isaac Asimov’s first law of robotics, Jef Raskin writes the first law of interface design: “Any system shall not harm your content or, through inaction, allow your content to come to harm.” In other words: Let’s say you enter this in an email field: jesperrr#gmail.com and you get this error message: “not […]
Continue reading »Jef Raskin’s First Law of Interface Design Exp...«
In our company’s basement a small server room where we put a few sandbox machines we use for quickly starting up projects, simple project and version control management. Over the time, quite a few of our clients have benefited from this setup as it can create instant project infrastructure. But what is the cost of […]
Continue reading »Web Server Power Calculation«
I had some issues with Ruby on my macbook after upgrading Ruby from 1.8.6 to 1.8.7. This was a problem in Textmate as it still picked up the old version and ignored $PATH i set in my .profile. Thanks to fast and excellent help from Allan Odgaard and others in the ##Textmate IRC channel. The […]
Continue reading »Textmate Path Modification — Ruby Version Issu...«
For the last months I have been using Git to work with my Subversion repositories. Besides from reducing disk usage, Git also makes my work slightly faster and independent of network access — I can make commits to repository which is sync’ed later when I get online. One challenge though: Using branches I ran into […]
Continue reading »Using Git for SVN Repositories Workflow«
One year ago I published “Design Guide or HTML Markup Guide” with link to the HTML guide we did for the biggest Danish business internet portal. The HTML guide is a really useful tool for every public authority that must deliver applications for the portal. As a help for my own work back then, I […]
Continue reading »HTML Guide Textmate Snippets Open Sourced«
My problem this week: I wanted to share some work with a colleague. Unfortunately we have not yet setup our caplab environment with git server. Nor did i want to push this particular project to GitHub or Unfuddle. My alternative was a file-based setup: Each developer’s machine has it’s own Git repository. On my machine […]
Continue reading »Using Local File-based Git — Server Laziness«
It took me a little while to use the new file deletion principle from Google Groups administrator. You see the list of files, then click delete on the row you want to delete.The row then appears “selected” (the darker colored rows at the bottom). What confused me was that it still says “delete” followed by […]
Continue reading »Interaction Design Experiment: Delete Row«
In general it’s good to use the human time formats (1 hour ago, 2 months ago, etc.) that you see in many of the new web applications. In general, the detail level is up the shorter the time span.
Continue reading »Human Time Format Gone Wrong«
A side benefit of switching from Subversion to Git for source control is that Git does not use shadow files and directories to find out what has changed. I created two checkouts of a svn project — one using traditional svn and one using git (which can actually clone a svn repos — see explanation […]
Continue reading »Git Side Benefit: Reducing Disk Usage«
My Norwegian friend Eidar from NetLife Research pointed out that the 2009 version of the bad usability calendar is now online. Learning by bad examples is often a good way in discussing usability with people that are not hardcore usability people. I’m currently wrapping a couple of A3 calendars in plastic to use as posters […]
Continue reading »Bad Usability Calendar 2009 Is Out«
Just purchased Jakob Nielsen’s new screenshot-packed “10 Best Intranets of 2009” report, which I plan to use as inspiration in my company. It might be of value to other Capgemini employees so I purchased the “site license to make copies within your organization and place on your own intranet”. Capgemini colleagues are free to contact […]
Continue reading »Intranet Inspiration«
Our experiment Spam Filter Free Day had one year anniversary yesterday. We won’t repeat the experiment as it gave us a tremendous amount of comments to administer. Since then we decided to remove the “nofollow” constraint on all comment links. At that time we wanted to give credit to our friends and other people that […]
Continue reading »Time To Revise Our Comment Policy«
Justaddwater.dk has suffered very infrequent updates for a long period of time. Actually a lot is going on both for Thomas and me — but our activities seldom make it to this blog. Here is an update of what has been keeping us busy. Thomas and his new company Since Thomas Watson quit Capgemini nearly […]
Continue reading »Busy Not Updating Blog«
If you’re using Resource Controller for Ruby on Rails, you may want to look atthe plugin I just created. From the readme file: ResouceControllerRespondTo ========================== Extends ResourceController plugin for Rails to make it respond_to .xml and .json formats Based on code by Florent Piteau and Joe Fiorini… Jesper merely provided the glue and packed as […]
Continue reading »Plugin for Rails’s Resource Controller«
Workaround needed for this annoying bug: Background-image is 1px away from border on buttons. I have buttons that are styled with border and background-image. Must work in IE7. But there is a small 1px gap between border and the background-image. Look at this screenshot from IE7: ie7css-flaw-background-image-on-buttons Problem is that I have no idea if […]
Continue reading »IE CSS bug: Background-image Gap To Border«
At a recent project I had to work in a full-blown .NET environment. Here are some of the tips I collected from my colleagues. Visual Studio I added the methods below in the Macro editor (Tools > Macros > Macros IDE) Stop the build on error. When an error occurs I am notified instantly and […]
Continue reading ».NET tips for my development environment«
Here are two different download paradigms presented by Firefox download page and Microsoft Internet Explorer 8 download page (full size) (full size) It is interesting to see the difference in prioritation of the actions. Microsoft makes all download actions equally important. Which results in 20 download icons that all fight to drag attention. Firefox, on […]
Continue reading »Download Pages — IE vs. Firefox«
For a current project, I created a tiny number formatter that inserts thousand delimiters in a string: 10000 to 10,000 etc. Just add css class=”numberformat currency” to a text field, and it will be formatted automatically. It is based on the Prototype JavaScript library. You can get it from it’s GitHub repository page. Feel free […]
Continue reading »Introducing Tiny JavaScript Number Formatter«
“Send ‘Internet’ to Recycle bin?” That was the question Windows asked me the other day when I was about to delete a shortcut from my desktop :)
Continue reading »Could You Fit The Internet In Windows Recycle Bin?«