On your local system that only hosts non-critical development data and only you have access to, you can store...
Inspired by recent "git shortcut" cards I figured it would be nice to have one of these for rebasing a...
Cookies without an expiration timestamp are called "session cookies". [1] They should only be kept until the end of the...
...new value (be aware that you should use a secure and salted hash) or better call the the_user_to_log_out.reset_remember_token! method that does the things for you.
Note that you should disable the Java plug-in in your browsers after installation. Ubuntu >= 12.04 Java 11
Due to the way we setup Jasmine tests in our projects, you may run into various errors when Jasmine boots...
Spreewald's patiently repeats the given block again and again until it either passes or times out.
tl;dr Since Rails 7+ you can use ComparisonValidator for validations like greater_than, less_than, etc. on dates, numerics...
Our CI setup frequently sees this error while running yarn install: yarn install v1.22.19 [1/4] Resolving packages... [2/4] Fetching packages...
Terminator has a cool feature that allows you to split your terminal into many panels and type in all of...
Git allows you to set push options when pushing a branch to the remote. You can use this to build...
Usually, Unpoly compiler destructors are returned from the compiler function. However, when using async compiler functions, you can not register...
If you need to run a program on a remote machine (e.g. to your office PC) with a graphical UI...
This is an awesome gadget in your toolbox, even if your test coverage is great. gem install ruby-debug (Ruby...
When flagging a spec that will be implemented later as pending, include a failing spec body or RSpec 3 will...
...what "memoize" in earlier rails versions did. There is a gem that reintroduces this behavior, but this is the essential implementation. Remember In the above example, some_expensive_calculation is...
...it will be fixed, I guess it will be for Rails 4 only. The best workaround right now is to lock your version of rack at version...
...remember to nilify it afterwards. Otherwise other examples will see your global changes. A better way is to use the .with_power method to change the current power for the...
ImageMagick can automatically crop surrounding transparent pixels from an image: convert input.png -trim +repage output.png
...hide gems from the backtrace. In such cases, log_subscriber.rb is the inner-most (i.e. "best") source in the backtrace. You probably have an initializer with this line: Rails.backtrace_cleaner.remove_silencers!
...On the database level, you will see these queries (simplified; the number at the beginning of each line is the connection ID): 1 Connect 1 BEGIN 1 INSERT INTO foos...
...you might be doing stuff afterwards that could require to abort the transaction). A better approach As a general rule, never use ActiveRecord::Base.establish_connection and also don't use...
You are getting when connecting via SSH or deploying with Capistrano (which uses SSH): Too many authentication failures for username...
In my opinion using this plus the icon font you get the best of all worlds, with low CPU usage, no JavaScript, and file-sizes in the one...
Instead of running all missing migrations on your test database with rake db:migrate RAILS_ENV=test you can also...