github.com

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

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

makandra dev
github.com

Sometimes you need to run background jobs that you can't make important guarantees about - they may run out of...

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

benmabey.com

...about the differences between imperative and declarative scenarios. In my opinion, both styles have benefits and should be used appropriately based on the situation. The majority of examples on rspec...

makandra dev

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

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

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

lucaguidi.com

...shared and writable by threads. If incorrectly coordinated, those threads can lead to unexpected behaviors...

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

stackoverflow.blog

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

cirw.in

If you ever wondered why a constant wasn't defined or wasn't available where you expected it to be...

Getting the whole bucket size aws s3 ls s3://$BUCKETNAME/ --recursive --human-readable --summarize | tail -n2 Tail is used because...

MySQL and MariaDB have an SQL mode setting which changes how MySQL behaves. The SQL mode value is comprised of multiple flags like "STRICT_TRANS_TABLES, NO_ZERO_IN_DATE...

...Each flag activates or disables a particular behavior. The default SQL mode varies widly between versions of MySQL and MariaDB. In general, more recent versions of MySQL and MariaDB have...

ImageMagick has a command line tool called identify which can read image metadata: >identify -verbose DSC00136.JPG Image: DSC00136.JPG Format: JPEG...

...You could also use social media buttons, but disable them by default. The rationale behind this is: Facebook, Google, Twitter, and similar will send information to their servers even when...

If a model inherits from others or uses many concerns / traits, it might be hard to see in the code...

There are several gems that make it easy to read and process xlsx files. Parsing the entire file at once...

Over the years we have tried several solution to have vector icons in our applications. There are many ways to...

semaphoreci.com

...run "cd #{current_path} && RAILS_ENV=#{rails_env} bundle exec rails runner 'ScriptRunner.go'" end becomes desc 'Run script' task :script do on primary :app do within current_path do

...user directly as an option to the server directive. Also, the roles syntax has become more ruby'esque, and the first server will by default be the primary one:

news.ycombinator.com

...and compare it to the decrypted hash to see if there is a match. Benefits of this are If an attacker steals your database, they can't decrypt any of...

...easier to see if you have anomalous calls to KMS. There is a huge benefit here in that it is impossible to do bulk decryption without a giant audit trail...

When you render a nested form for a Movie which has_many :actors, you want to render the right number...

wiki.github.com

The following example is from the Cucumber wiki: Given a blog post named "Random" with Markdown body """ Some Title, Eh...

I highly recommend that you make use of RubyMine's feature to pin tabs. When you pin all "important" files...