If you need to log to a file you can use Ruby's Logger class: require 'logger'
This is useful to kill processes like ruby my-script.rb: pkill -f my-script.rb With great power comes great responsibility.
Please don't simply copy line number links from Github. The URL usually contains a branch name like master which...
If you're on Ruby 2.3+ there's a <<~ operator to automatically unindent HEREDOCs: str = <<~MESSAGE Hello Universe!
Write a // and indent every subsequent line by two spaces. This is great for documenting BEM blocks! // An action button...
To achieve this goal you have to setup the session store like the following example: MyApp::Application.config.session_store( :cookie_store...
jQuery doesn't store information about event listeners and data values with the element itself. This information is instead stored...
This guide shows how to create an AngularJS application that consumes more and more memory until, eventually, the browser process...
When uploading images, adding more than one process to a version can cause MiniMagick to run multiple commands. In order...
When running migrations with rake db:migrate, there's the STEP and VERSION parameters that you can pass to nearly...
It's like a GUI for the famous git add [-p]. Select files with the up/down-keys and hit
TL;DR Block formatting contexts establish an isolating container. float and clear only apply to elements within such a container...
If you want to load an SQL dump from an ActiveRecord migration, you might find this to be harder than...
If you get this error (probably because you want to load some modules): # modprobe xt_comment FATAL: Could not load...
I couldn't successfully execute a simple iptables command and got this error on an Ubuntu server: # /sbin/iptables -I INPUT...
Geordi 1.0 features a command line application geordi, that holds most of Geordi's previous commands. New features
Add gem 'database_cleaner' to your Gemfile. Then: Cucumber & Rails 3+ # features/support/database_cleaner.rb DatabaseCleaner.clean_with(:deletion) # clean once, now DatabaseCleaner.strategy = :transaction...
If you paste multiple lines of text into a cell, Calc's AutoCorrect will change the first character of the...
Jonas Nicklas, the author of Carrierwave and Capybara, has released Refile, a gem for handling file uploads in Rails. It...
ImageMagick takes a string with several options when cropping an image. See the command line options for how to provide...
Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current...
When running Selenium features with parallel_tests, some browser-server interaction might take longer than usual and the impatient Capybara...
Capybara-screenshot can automatically save screenshots and the HTML for failed Capybara tests in Cucumber, RSpec or Minitest. Requires Capybara...
A CLI for working with Postgres databases. Ships with auto-completion and syntax highlighting.