...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:
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...
TL;DR You shouldn't call $scope.$apply() or $scope.$digest() inside a function that can be invoked by Angular...
This is called "cherry-picking". git cherry-pick commit-sha1 Note that since branches are nothing but commit pointers, cherry...
This is how you regain disk space from OpenStack instances if you are using kvm and qcow. If your instance...
After a recent Ubuntu update I didn't see the main menu bar of the RubyMine IDE (File | Edit | View...
I experienced a lot of issues with google chrome that made it almost impossible to work with it. Here are...
This is somewhat similar to the touch command of Linux: FileUtils.touch 'example.txt', :mtime => Time.now - 2.hours If you omit the :mtime...
When testing with Cucumber / Caypbara, iframes are ignored, so you can't interact with them. To interact with your iframe...
This is for those who already own an SSL certificate (e.g. using it in the Apache HTTP Server) and need...
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...
If you're using the Capybara webdriver, steps sometimes fail because the browser hasn't finished loading the next page...
.desktop files define launchers for applications installed on your machine. They specify the command that will be executed when launched...
When your cucumber features grow massively over time, the test execution can take a lot of time.
...One might argue that could also omit position: relative on .section, and place the before/after helpers using left: 0 or right: 0. However, you'd then need to know the...
...disappear again when moving the mouse pointer to the left or right. Hovering the before/after elements actually means hovering the element itself...
Don't you just hate to write Cucumber path helpers to be able to say this?
json is part of the standard library of Ruby and deals with JSON, obviously. As you know, JSON is the...
The non-breaking space is prepended to the second element because that one becomes floating. Since that would discard any whitespace between the two elements, we are adding the...
In Ruby on Rails, all objects have a useful blank? method. It returns true for nil but also for empty...
Ctrl + R Search commands you entered previously. Press Ctrl + R again to search further back, Ctrl + Shift + R searches forward...
You can install rubygems 3.0.8 (released on February 18, 2020) to keep all the Gem::Specification#rubyforge_project deprecation warnings...