When you need to find out in which kind of spec you are during run-time, it's definitely possible...
Sometimes you need a piece of code to do something different for specs than for features. If you don't...
Sometimes you want git to ignore certain files that appear on your machine. You can do this in 3 ways...
When your site is on HTTPS and you are linking or redirecting to a HTTP site, the browser will not...
git shortlog -s -n [commit-range] -n, --numbered Sort output according to the number of commits per author
Option 1: Creating a self-signed certificate with the openssl binary As igalic commented on this gist. openssl req -new...
Getting a regular expression from a string in JavaScript is quite simple: new RegExp('Hello Universe'); # => /Hello Universe/
When HTTP clients make an request they can define which response formats they can process. They do it by adding...
Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once...
We have often felt the pain where our models need to serve too many masters. E.g. we are adding a...
When you want to do a git diff but do not care about the full diff and just want to...
You can detect city and country from an IP address by using the GeoLite database. This is a flat file...
We ran into trouble when adding additional compute units to our railscomplete Hosting environment lately. VM-instances on the new...
Awesome battle report from Pinterest trying to scale their setup using different approaches. When you push something to the limit...
tl;dr: Ruby's Bundler environment is passed on to system calls, which may not be what you may want...
Rails gives you migrations to change your database schema with simple commands like add_column or update. Unfortunately these commands...
In specs, the session never persists but is always a new object for each request. Data put into the session...
All Rubyists should be familiar with the common definitions for include and extend. You include a module to add instance...
Non-SSL contents on SSL pages are blocked by default Bug 834836 – Turn on pref to block mixed active content...
All columns of a model's database table are automagically available through accessors on the Active Record object.
What you copy may not be what you see in the browser. Here is an online tool to determine the...
Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...
Say you want to allow users to emphasize some string, but the whole markdown thing would be far too much...
Usually, the logrotate service takes care of renaming log files each night or so to avoid logs becoming huge. That...