makandra dev
select2.org

Select2 comes with AJAX support built in, using jQuery's AJAX methods. ... For remote data sources only, Select2 does not...

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

We usually generate our commit messages from Pivotal Tracker IDs and titles, like [#15775609] Index view for conflicts

campaignmonitor.com

CSS support in major e-mail clients is horrible. This will give you an overview what you will not be...

lucaguidi.com

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

github.com

...where a Contact record may be associated with a Group record: class Contact < ApplicationRecord belongs_to :group validates_presence_of :name, :street, :city, :email end class Group < ApplicationRecord

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

gist.github.com

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

...clone or #dup and you modify the copy, you will run into the following behavior: original_hash = { foo: { bar: 'original value' } } copied_hash = original_hash.dup copied_hash[:foo][:bar] = 'changed value...

makandra dev
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:

makandra dev
medium.com

...this file as your project grows. The problem here is that this file potentially becomes very complicated to manage over the time. That’s why it’s important to find...

stackoverflow.com

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

makandra dev

When you have a hook in your Capistrano file that dumps your remote database, you might not want it to...

Simple: Tell the application controller how to handle exceptions, here a RecordNotFound error. Do this with the following line: # application_controller.rb...

When your Rails controller action responds with only a simple text, render text: 'Hello' may not be what you want...

TL;DR Debugging problems with javascript errors in cucumber tests is sometimes easier in the browser. Run the test, stop...

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

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 called "cherry-picking". git cherry-pick commit-sha1 Note that since branches are nothing but commit pointers, cherry...

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

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