If you are on a Linux shell and want to open a file with whatever default application is configured for...
Let's say you want to find the element with the text hello in the following DOM tree: hello
Imagine you have a list you want to render inline on large screens, but stacked on small screens. high
TL;DR There are three dimensions you can control when scoping routes: scope module: 'module', path: 'url_prefix', as: 'path...
The following sums up all connections (ESTABLISHED, TIME_WAIT, FIN_WAIT, etc.) and sorts it: netstat -n | awk ' $5 ~ /^[0...
When you're facing a somewhat complex Google Analytics setup and want to find out what's happening, you can...
Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has...
Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...
If you expect method calls in RSpec 3, be aware that the argument matchers use very liberal equality rules (more...
A HTTP 302 Found redirect to PATCH and DELETE requests will be followed with PATCH or DELETE. Redirect responses to...
First, decide if you want to pull with rebase. There are some implications of changing this, so think before you...
To install gems Bundler needs to be able to talk to https://api.rubygems.org. If you are behind a proxy you...
Don't use be_true to check if a value is true. It actually checks if it anything other than...
Geordi is now (partially) tested with Cucumber. Yay! geordi cucumber supports a new @solo tag. Scenarios tagged with @solo...
Using Scenic, you can bring the power of SQL views to your Rails application without having to switch your schema...
Note The maintenance mode is enabled on all application server as soon as the file /public/system/maintenance.html is present. Installation
Ever wondered how you can create a simple table output in bash? You can use the tool column for creating...
You login to a Linux server with a performance issue: what do you check in the first minute? uptime
Wondering which processes are placed in your swap you can use this bash oneliner: for file in /proc/*/status ; do...
Once Rails knows a given string is html_safe, it will never escape it. However, there may be times when...
You know that layouting HTML e-mails is terrible. For more fun, check Litmus' list of top 10 e-mail...
PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...
rack-mini-profiler is a powerful Swiss army knife for Rack app performance. Measure SQL queries, memory allocation and CPU...
To delete a certificate request run sudo puppet ca destroy $your.full.hostname on your puppetmaster.