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

It sometimes happen that a database dump, that would want to insert into your development database, does not match the...

github.com

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

tl;dr: Upgrade the gem to at least 4.0.1 When you use rspec_rails in a version < 4 with Rails...

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:

github.com

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

stackoverflow.com

TL;DR You shouldn't call $scope.$apply() or $scope.$digest() inside a function that can be invoked by Angular...

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

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

This is how you regain disk space from OpenStack instances if you are using kvm and qcow. If your instance...

This will not work (it always passes): Then the "Title" field should contain "" The value is turned into a regular...

gist.github.com

Here is some JavaScript code that allows you to click the screen and get the clicked element's text contents...

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

apidock.com

This is somewhat similar to the touch command of Linux: FileUtils.touch 'example.txt', :mtime => Time.now - 2.hours If you omit the :mtime...

This is for those who already own an SSL certificate (e.g. using it in the Apache HTTP Server) and need...

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

makandra dev

There are ongoing arguments on how useful this still is, as modern browsers become more comfortable to load images in parallel. However, many major websites still use them, for...

} } // opens a confirmation dialog if unsaved changes are present function bindAlertMethod() { $(window).on('beforeunload', function() { if (isUnsavedChangePresent() && !unloadTriggeredBySubmit) { return warningMessage; } }); } function isUnsavedChangePresent() { var unsavedChanges = false; // objects providing an isDirty...

...Using a css class as marker may make developers awere of the // special form behavior when inspecting the form classes function skipFormsWithOverwrittenSubmit() { _.each($('form input[type=submit]'), function(submitInput) {

...take many times longer to render. So measure before blaming the database. FULLTEXT performs better when your text has low redundancy FULLTEXT performance differs by a factor of 78 between...

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

When your cucumber features grow massively over time, the test execution can take a lot of time.

tl;dr: Ruby's Bundler environment is passed on to system calls, which may not be what you may want...