A collection of code snippets which return a boolean value for a regex comparison. regexp.match?(string) # Recommended for Ruby >= 2.4...
There seems to be a nasty bug in Chrome 56 when testing with Selenium and Capybara: Slashes are not written...
To create a 10 GB file: fallocate -l 10G huge_file.dat
Adding a gem means you take over the liability towards the external code. Checklist Based on "To gem, or not...
We have projects that have been developed using many different versions of Ruby. Since we do not want to...
If you have a replication error with MySQL and you know the "error" is okay (e.g. you've executed the...
On application servers, gems are usually bundled into the project directory, at a location shared across deployments. This is usually...
There are some inconvenient Gem dependencies. Resolve them by adding/modifying these lines in your Gemfile: gem 'guard-livereload', '>= 2.5.2', require...
Reminder of what you can do with Geordi. Note: If you alias Geordi to something short like g, running commands...
TLDR: When you put CSS rules into a partial and import that partial multiple times, the CSS rules will be...
First find the reference for the entry you want through looking at the stash: $ git stash list stash@{0}: WIP...
Collection of useful tools in the Chrome JavaScript console. Make the whole page editable This is not special to Chrome...
Sometimes huge refactorings or refactoring of core concepts of your application are necessary for being able to meet new requirements...
TLDR: A function is hard to use when it sometimes returns a promise and sometimes throws an exception. When writing...
A comprehensive introduction to sending HTML emails. Intro: HTML email: Two words that, when combined, brings tears to a developer...
Ruby's regular expressions can be represented differently. When serializing them, you probably want to use inspect instead of to...
In general, you should not put a block element inside an inline element. So don't do this: text
If you get an error like this for a puppet mount: $ > puppet agent --test Info: Retrieving pluginfacts Info: Retrieving plugin...
If your Carrierwave uploader dynamically generates the filename (e.g. by incorporating a user's name), you must call model.save! after...
TL;DR: Update the 'net-ssh' gem by adding to your Gemfile: gem 'net-ssh', '=2.9.1' Now run bundle update...
Put the following into config.ru in your Rails root folder: # Require your environment file to bootstrap Rails require ::File.dirname(__FILE...
So you're getting this failure when running bundle install on an older project: Your Gemfile.lock is corrupt. The following...
Like you know from "How to tell ActiveRecord how to preload associations (either JOINs or separate queries)", you can tell...
This card tries to summarize by example the different uses of heredoc. In Ruby << vs. <<- vs. <<~ In Rails strip_heredoc...