We forked trusty memoizer to make two changes: Memoized methods now preserve their arity. Previously all memoized methods had an...

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

To delete a specific redis-DB you need to use the FLUSHDB-command in combination with the SELECT-command. For...

...iterated until the final design is ready – shiny, accepted and ready for implementation. I believe this works well when you get to work with the final decider in person.

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

By default, Devise redirects to a sign-in form when accessing a route that requires authentication. If for some reason...

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

...switches to the clicked link. In a Jasmine spec I wanted to test this behaviour. Unpoly's up.hello emits an up:fragment:inserted event, in whose callback function I can...

collectd5 in version 5.9.0 is broken and you upgraded it everywhere. But because it's FreeBSD it does not...

...export_path = Dir.mktmpdir('exports') # ... ensure FileUtils.remove_entry(export_path) end Option 3: Using a before/after block before { @export_path = Dir.mktmpdir('exports') } after do if @export_path.present? FileUtils.remove_entry(@export_path)

angular-tips.com

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

When using the asset pipeline your assets (images, javascripts, stylesheets, fonts) live in folders inside app: app/assets/fonts app/assets/images...

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

makandra dev

Inspired by recent "git shortcut" cards I figured it would be nice to have one of these for rebasing a...

makandra dev
stackoverflow.com

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

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

ActiveRecord provides the ids method to pluck ids from a scope, but what if you need to pluck Global IDs...

When logging in Rails, you can use the log_tags configuration option to add extra information to each line, like...

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

Our CI setup frequently sees this error while running yarn install: yarn install v1.22.19 [1/4] Resolving packages... [2/4] Fetching packages...