makandra dev

This is an awesome gadget in your toolbox, even if your test coverage is great. gem install ruby-debug (Ruby...

If you migrate a Rails application from Sprockets to Webpack(er), you can either transpile your CoffeeScript files to JavaScript...

web.archive.org

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...

makandra dev

...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...

After updating Rubygems you see a wall of deprecation warnings like this: NOTE: Gem::SourceIndex#add_spec is deprecated, use...

ImageMagick can automatically crop surrounding transparent pixels from an image: convert input.png -trim +repage output.png

blog.cloudflare.com

Two weeks ago, Cloudflare was struck by a global outage that lasted ~30 minutes. The incident was rooted on a...

...skipping asset compilation when assets have not changed? Turns out there is an even better way to speed up Capistrano deployments with asset compilation – and it's even simpler.

...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...

...when you run a Selenium test with Capybara. This will help you understand "impossible" behavior of your tests. When you run a Rack::Test (non-Javascript) test with Capybara, there...

...you. But sometimes the complexity will bleed through, causing your tests to show "impossible" behavior. Here is some unexpected behavior caused by the interaction of threads and processes:

Instead of running all missing migrations on your test database with rake db:migrate RAILS_ENV=test you can also...

We had a strange behaviour on one of our mariadb-servers: Everyday at around midnight we saw that the root-account on one of our servers is trying to access...

...Safari, ...) or Firefox, this is only the initial size -- users can resize textareas to become bigger. This is helpful to the user, but may be breaking your application layout in...

This note describes a Cucumber step definition that lets you say: Then "Mow lawn" should be an option for "Activity...

When your JavaScript bundle is so massive that you cannot load it all up front, I would recommend to load...

makandra dev
poinz.herokuapp.com

If you are using scrum in a project you might be familiar with planning poker, a playful way to agree...

Unpoly's [up-observe], [up-autosubmit] and [up-validate] as well as their programmatic variants up.observe() and up.autosubmit...

As attachments to this card you will find a Cucumber feature and supplementing step definition that you can use to...

I had a huge MySQL dump that took forever (as in: days) to import, while I actually just wanted to...

We recently decided to put static content for HouseTrip.com to Amazon Cloudfront for a faster user experience. This happens fully...

When storing files for lots of records in the server's file system, Carrierwave's default store_dir approach may...