Here is some JavaScript code that allows you to click the screen and get the clicked element's text contents...
Use return to return from a method. return accepts a value that will be the return value of the...
I frequently find myself needing a combination of group_by, count and sort for quick statistics. Here's a method...
Sometimes modern Javascript projects get out of hand. A major culprit in this can be the messy handling of asynchronous...
before(:all) runs the block once before all of the examples. before(:each) runs the block once before each...
If you want to ssh into your vagrant box without switching into the project directory and typing vagrant ssh, you...
There are many approaches out there how you can import data from a legacy application to a new application. Here...
Scope is all about where something is visible. It’s all about what (variables, constants, methods) is available to you...
You should prefer native promises to jQuery's Deferreds. Native promises are much faster than their jQuery equivalent. Native promises...
Native promises have no methods to inspect their state. You can use the promiseState function below to check whether a...
You can use local copies of gems in your Gemfile like this: gem 'spreewald', path: '~/gems/spreewald' As soon as you...
rack-cargo gives your API a new /batch route that lets clients perform multiple API calls with a single request...
Use Traim to build a RESTful API for your ActiveRecord models with very little code. Traim assumes your API resources...
Sometimes you add Paperclip image styles, sometimes you remove some. In order to only keep the files you actually need...
In the ruby shell (IRB) and rails console the return value of the previous command is saved in _ (underscore). This...
I often see the use of || to set a default value for a variable that might be nil, null or...
You can not use the hash_including argument matcher with a nested hash: describe 'user' do let(:user) { {id: 1...
ActiveRecord::RecordNotFound errors provide quite meaningful error messages that can provide some insight on application details. Consider the following:
Rails 5 (don't know about the others) comes with an initializer wrap_parameters.rb. Here you can tell rails to wrap...
Put the line below in the respective env.rb file to make your action controllers raise an ActionController::UnpermittedParameters error when...
When using geordi for integration tests you might get the following error when trying to run geordi cucumber:
First, go to the webinterface of your phone. Choose Software Update in the navigation on the left. Next, you have...
If your Snom 300 always keeps the same volume for headset and ringtone (as soon as you change one you...
You can configure a Ubuntu system as a gateway in order to share it's internet connection (maybe via WLAN...