Search_spinner Cross_grey Magnifier

Search syntax

  • Search for repeating cards with repeats:yes
  • Search for unfinished cards with unfinished:yes
  • Search for cards in a certain topic with topic:"name"
  • Search for phrases with "a phrase"
  • Exclude a word from search: -word
  • Exclude a phrase from search: -"a phrase"
  • Exclude a topic from search: -topic:"name"
External content

jQuery UI Bootstrap

Twitter's Bootstrap CSS blueprint as a jQuery UI theme. Even if you don't want to use Bootstrap as a CSS framework, this theme looks better than jQuery UI's default theme.

External content

A very brief primer to thinking in XPath

A short tutorial for XPath. It's the first XPath introduction that ever stuck with me.

How to print Github wiki pages

I have no idea how it's supposed to work (or why the don't have a print CSS), but this works for pages written with Markdown:

  1. "Edit" the wiki page
  2. Copy all text
  3. Run a Markdown interpreter and pipe its result, e.g.: kramdown > /tmp/github.html
  4. Paste your markdown
  5. Press Ctrl-D to finalize your input
  6. Open the generated HTML file and print it.


Get rid of dead keys under XFCE

Under XFCE keys like tilde are dead by default, which is impractical for programming and terminal work. To get rid of dead keys, open your Settings Manager and go to Keyboard. Under the Layout tab you can keyboard layouts like "German (eliminate dead keys)".

There is still a way to type accented characters.

Make Makandra Consul work with RSpec 2.x and Rails 3.x

To make the RSpec matcher of the authorization solution Consul work with Rspec 2.x read the following blog post.

CSS box-shadow not working in IE9 inside tables with collapsing borders

Though Internet Explorer 9 supports the box-shadow CSS property there is a nasty bug which sometimes prevents it from rendering the shadow properly.

Consider this HTML:
<table style="border-collapse: collapse">
<div style="box-shadow: 0 0 10px #f00">Hello universe</div>

While it works in other browsers, IE9 is not showing any shadow. For some reason, it requires border-collapse: separate for the table to be set:

<table style="border-collapse: separate" ce...

New geordi script: migrate-all

Use the command geordi migrate-all to migrate your databases and to prepare them before running tests. The abbrevation geordi m works as well.

  • It will run power-rake db:migrate if parallel_tests does not exist in your Gemfile
  • Otherwise it runs b rake db:migrate and then executes b rake parallel:prepare if parallel_tests was found in your Gemfile.

How to revert features for deployment, merge back, and how to stay sane

Removing features and merging those changes back can be painful. Here is how it worked for me.\ tl;dr: Before merging back: reinstate reverted features in a temporary branch, then merge that branch.


Consider your team has been working on several features in a branch, made many changes over time and thus several commits for each feature.\
Now your client wants you to deploy while there are still stories that were rejected previously and can't be deployed. …

Repeat an element on every printed page with CSS

Firefox, Opera and Internet Explorer will repeat elements with position: fixed on every printed page (see attached example).

The internet knows no way to do this in Webkit browsers (Chrome, Safari). These browsers will only render the element on the first printed page.

How to remove leading spaces from indented strings

The contents of this card are pretty old. Rails 3.0 introduces strip_heredoc which you want to use.

If you are on plain Ruby or Rails LTS 2.3, the methods below may be relevant for you.

Consider the following, when using heredoc for prettier code:

puts <<-MESSAGE
  Hello Universe!
  This is me.
External content

Firefox 3.6 Support To end On April 24, 2012

Firefox 3.6 users will receive update notifications in April offered through the browser’s internal updating service that will update the version to the latest stable build of the browser.

External content

Pull Quotes with HTML5 and CSS

A pull quote is a typographical technique in which an excerpt or quote from an article is duplicated within the article using a different formatting style so that it jumps out at the reader.

Blatantly copying the excerpt of the pull quote into it’s own element is not the way to go. A pull quote is a purely visual technique, and therefore should not change the structure of the body. Next to that, a structural representation of the excerpt would be seen twice by people using feed readers or services like Instapaper, as well as be re-read for …

Git: What to do when "git log" does not show commits that touch a file

Let's say you have commits that change a file (and looking at the commit details show you the changes, etc). Now, when you do a git log you see them, but when you say git log that.file these commits don't show up? This is for you.

The reason is that the file got deleted deleted/re-added/renamed (any or all of those).

Instead of …

git log master -- some.file

… you need to say:

git log --follow master -- some.file

Then your commits will show up.

Note that tig also understands --follow.

Kudos to Julien…

How to organize and execute cucumber features (e.g. in subdirectories)

In cucumber you are able to run features in whatever directory you like. This also includes executing features in subdirectories. There are only some things you have to take care of.

By default, cucumber loads all *.rb files it can find (recursively) within the directory you passed as argument to cucumber.

$ cucumber # defaults to directory "features"
$ cucumber features
$ cucumber my/custom/features/dir

So, if you would like to organize features in subdirectories, you won't have *any problems when running the whole test…

Improved gitpt now part of geordi

Our gitpt script to generate git commits from Pivotal Tracker stories has been tweaked and polished and is now part of the geordi gem.

Install the freshly released version 0.7 now:

sudo gem install geordi

This update will bring you gitpt with an initial "setup wizard" (that asks for your PT API key and initials) and prettier output: stories are colored by their state and …

Beware of curious behaviour of 'downcase' with umlauts

Using .downcase or .upcase on strings containing umlauts does not work as expected as it leaves the umlauts unchanged:

=> "Über"

=> "Ärger"

The very same applies for french accents (Thanks Guillaume!):

"Être ou ne pas être, telle est la question".downcase
=> "Être ou ne pas être, telle est la question"

Obviously, this leads to problems when comparing strings:
"Über".downcase == "über"
=> false

In Rails you can use ActiveSupports' [multibyte chars](http://apidock.c…

Fix: Cucumber won't start though cucumber.yml is correct

This is for you if you get this error:

cucumber.yml was found, but could not be parsed. Please refer to cucumber's documentation on correct profile usage.

Actually, it's likely that your cucumber.yml is just fine but not your rerun.txt.\
This sometimes happens when running multiple Cucumber workers with parallel_tests that write into rerun.txt simultaneously – ending up with a messy, invalid file.

Just remove it and you ar…

How to embed images in higher resolutions for printing

When you print out a HTML pages, all raster images (like PNGs) will appear aliased. This is because a printer's resolution is usually much higher than that of a computer screen.

If an image absolutely must look awesome when printed, a solution is to embed the image in much higher solution than needed (e.g. four times the horizontal resolution), then scale it down to the desired width using CSS.

Note that this will slightly alter the image's appearance on the screen because browsers will scale down the image [using an anti-aliasing method](…

2925 cards