As you most likely know validates_uniqness_of :foreign_id does not allow nil values by default.

Ruby comes with a class BigDecimal which you can use for arbitrary precision arithmetic. You should use BigDecimal instead of...

github.com

By default, Cucumber uses mocha. This note shows to use RSpec stubs and mocks instead. Rspec 1 / Rails 2

You can group contacts using a mailing list in Thunderbird for easier access and less trouble when trying to find...

web.archive.org

This step tests whether a given select option comes preselected in the HTML. There is another step to test that...

makandra dev

...filters to what is visible through an element. touch-action (IE11+): Limiting default touch behavior (like scrolling) background-blend-mode (Edge 79+): Mixing background color and image Scroll snapping (Edge...

...continue a scroll movement until it reaches the edge of a child element. overscroll-behavior (no Safari): Prevent scroll chaining

RSpec supports a one-liner syntax for setting an expectation on the subject: describe Array do describe "when first created...

makandra dev
github.com

When you need to use diff in either some Ruby code or your Rails app, use the differ gem.

Sometimes it might be helpful to have a version history for a gem, e.g. when you want to see if...

S3cmd is a free command line tool and client for uploading, retrieving and managing data in Amazon S3. S3cmd reads...

blog.plataformatec.com.br

A while ago we were working on an application that had an entire version specially created for mobiles, such as...

makandra dev

Ever wondered how you can create a simple table output in bash? You can use the tool column for creating...

postgresql.org

...them as arrays when you are working with arrays. E.g. bad: WHERE topics @> 'value', better: WHERE topics @> '{value}' Check the PostgreSQL documentation on Array Functions and Operators for more information...

makandra dev
developer.mozilla.org

Basic box shadow support is available in all browsers today, but you need to check to which extend they are...

makandra dev

When you do a script/dbconsole -p, your MySQL shell will already be using UTF-8. When you call it yourself...

Generate a password htpasswd -Bn firstname.lastname This will ask you for a password and use bcrypt (-B, more secure) and...

Given the problem you have a new column postion and that column should be updated for all existing rows with...

github.com

Ancestry is a gem/plugin that allows the records of a Ruby on Rails ActiveRecord model to be organised as a...

Rails supports alert and notice as default flash types. This allows you to use these keys as options in e.g...

docs.angularjs.org

In addition to the {{ myValue }} two-way binding syntax, since Angular 1.3 there's a one-time binding syntax, prefixing...

stackoverflow.blog

A rough guide how to implement a REST API. The discussion here includes some interesting points as well: Timestamps: ISO8601...

My front audio output would not work even though the front mic input did fine. The Pulse Audio mixer (= Ubuntu...

makandra dev

while true; do i8kfan - 2; sleep 0.2; done There should be a better solution and it will be posted as soon as it's found...

businesswire.com

...announcement makes clear that royalties will continue not to be charged for such video beyond that time. Products and services other than Internet Broadcast AVC Video continue to be royalty...

...bearing...