The goal is to get Jasmine specs running in a Rails project using Webpacker, with the browser based test runner...

tl;dr In Chrome DevTools in the Sources tab you can activate Event Listener Breakpoints for debugging events. Example

Yesterday, Rails fixed a security issue (CVE-2014-3514) in Rails 4+. It was possible to use .where...

drafts.csswg.org

...invalid calc value is ignored, so you might end up with missing or "random" behavior, depending on where you do this. The above example is valid once you use zero...

...new RegExp('^(\\d+) users') # => /^(\d+) users/ Our expression above now works only at the beginning of the matched string, looks for a number (\d+ [1]) and also captures that. Sweet...

Around will not happen until after a feature's Background has been processed. Use Before and After to avoid that...

...might have a negative impact on your application's performance. We did not yet benchmark it, but using it for elements that are rendered very often is probably a bad...

In order to request a SSL certificate from any dealer, you usually need a CSR certificate. As both the CSR...

github.com

The ancestry gem allows you to easily use tree structures in your Rails application. There is one somewhat unobvious pitfall...

...nested, :inverse_of => :parent accepts_nested_attributes_for :nested end class Nested < ActiveRecord::Base belongs_to :parent validates_presence_of :parent_id # <- end With the parent already persisted creating nesteds...

...soften the validation to only validate on the associated object: class Nested < ActiveRecord::Base belongs_to :parent validates_presence_of :parent # <- without `_id` end Drawback With this softened validation now...

angular-tips.com

Angular comes with different types of services. Each one with its own use cases. All of these services are singletons...

...be quite useful to quickly find the JavaScript that is responsible for some (unexpected) behavior. You can use DOM Breakpoints for debugging subtree modifications, attribute modifications or node removal.

...origin (e.g. git fetch and git status). You should be 0 commits ahead or behind. Add and commit a file touch .please-update git add .please-update

...is no way to make GitHub do this nicely. :( If you know of a better approach, please let me know...

This can happen with a very simple model: class Note has_many :attachments end Everything looks normal: Note.all.to_a.size # => 8 Note.all.ids.size...

We use CarrierWave in many of our projects to store and serve files of various formats - mostly images. A common...

When you use the :as option to map a power to a controller method you can now override the generated...

makandra dev
stackoverflow.com

Using git rebase can be painful but luckily you can resort to cheating with git reset and committing anew.

Sometimes you need complex expectations on method arguments like this SomeApi.should_receive(:find).with(:query => '*foo*', :sort => 'timestamp ASC', :limit...

We recently had a problem on a Memcache cluster, where one of the servers showed a significantly worse cache hit...

Sometimes, through some firewall or proxy misconfiguration, you might have to deploy to a server that cannot access the git...

Note: We are talking about Machinist 1 here, Machinist 2 may have solved this or might require a different approach...

stefanjudis.com

Suppose you want to implement a publish/subscribe pattern in your Frontend application to react to data changes and events. First...

There was an issue with makandra_sidekiq < 0.2 concerning the stopping of Sidekiq. Sidekiq < 6 has two finishing timeouts: one...

Using this step definition you can check if any form field (text field, checkbox, etc) or button is disabled: