...rc1) must be separated by a dash, like this: 1.0.0-rc1 2.3.0-alpha2 3.0.0-beta3 Publishing to a pre-release tag npm packages have multiple "current" releases, identified by "tags...
...that you can use to travel through time and trigger setTimeout and setInterval callbacks: beforeEach(function() { timerCallback = jasmine.createSpy("timerCallback"); jasmine.clock().install(); }); afterEach(function() { jasmine.clock().uninstall(); }); it("causes a timeout to...
User Stories should describe what a user wants the system to do. Purely technical tasks should usually be implemented as...
Sometimes you want to load code on demand. For instance, when a a large library is only used on a...
For some years Google Chrome has allowed you to add desktop icon for any web page by going to Tools...
Since May 2011 we are cutting new gems using Bundler, which is less painful than cutting gems using Jeweler. You...
...In Rails 3.1+ the asset pipeline will take care of this. Thus you're best off using an uncompressed version of your Javascript in development. Also load the non-minified...
Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead. This issue will be encountered when relying on attribute_was methods...
...model, for example. In my case a record with an assignable_values legacy value became invalid when it should not. The initializer in the attached file will fix this issue...
Normally you can list all gems of the current ruby version with gem list, which also includes the gems of...
ActiveRecord has a feature called counter caching where the containing record in a has_many relationship caches the...
...deployment output appear less noisy, it also hides information that could be helpful. I believe you should prefer knowing what is going on, even if causes a few extra lines...
To open a terminal quickly navigate to System → Preferences → Keyboard Shortcuts. There, click the "Run a terminal" row (It should...
Run bundle update cucumber capybara cucumber-rails to update to the newest versions. Backup your features/support/path.rb to be able to...
...methods") would not be unstubbed before the next example, causing it to fail. This behavior can come and go as you edit your specs, since this can change the order...
...evaluates your .rb files. I was not able to find a fix for this behavior. Calling #rspec_reset und #unstub!(:method) on the class after the example did not help...
Sometimes you want to preload images that you will be using later. E.g. if hovering over a an area changes...
Sometimes you want to test migrations with production or staging data. Dumping single tables makes sense if a complete dump...
Did you know you can do in-place batch processing with plain ruby? The following script will in-place replace...
...forward than I had expected. And, it turns out Internet Explorer’s RFC-incompliant behaviour makes it safer to host your websites with a www-prefix, so www.mxsasha.eu instead of...
...user@example.com'.split(/([@\.])/) => ["user", "@", "example", ".", "com"] Or, you can use a capture group with look-behind to keep them with the resulting substrings: >> 'user@example.com'.split(/(?<=[@\.])/) => ["user@", "example.", "com"] An example use...
Browsers usually cache website content in order to provide the user with faster responses. Examples are returning to a website...
...bug is fixed, you forget to take out that debug information. There is a better way. By copying one of the attached initializers into config/initializers, your forms will always render...
Rubygems supports a 2FA for your account. Once enabled you need to provide your personal OTP code for every release...
...them by spaces: /alertson KEYWORD1 KEYWORD2 Keywords are case-insensitive. To revert to standard behaviour, use simply /alertson List of Skype commands
I really love to use the shortcuts CTRL+Alt+ Arrow Left and CTRL+Alt+ Arrow Right to navigate through the...