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...
...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...
...them by spaces: /alertson KEYWORD1 KEYWORD2 Keywords are case-insensitive. To revert to standard behaviour, use simply /alertson List of Skype commands
ActiveRecord has a feature called counter caching where the containing record in a has_many relationship caches the...
The method cookies is defined in the ActionController and should never be overwritten. Bad example class StaticPagesController < ApplicationController
Sometimes you want to load code on demand. For instance, when a a large library is only used on a...
...cannot detect whether a browser will do something useful with a tel: link. Your best options seem to be: Don't have tel: links and rely on the mobile browsers...
Since May 2011 we are cutting new gems using Bundler, which is less painful than cutting gems using Jeweler. You...
If Sunspot does not work and fails with a backtrace similar to this: /project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:227:in `adapt_response' /project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:164...
Spreewald now comes with a step that tests if a form field is visible: Then the "Due date" field should...
XPath matchers can be combined with CSS-selector matchers. This is really useful if not, for example, the content of...
SitePrism gives you a simple, clean and semantic DSL for describing your site using the Page Object Model pattern, for...
...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...
If you need a gem for a certain purpose, be sure to check this site. The rankings are determined by...
Bourbon is a library of pure Sass mixins that are designed to be simple and easy to use. No configuration...
Modern cameras often produce JPEGs that have a "I should be rotated 90° to the left" flag. If you process...
...on a string that was previously marked as #html_safe will lead to unexpected behavior. E. g. backreferences to captured groups ($1, $2) will be nil even if the group...
...be safe after using gsub on them. You can, however, fix the $1 gsub behavior on html_safe strings...
...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...
The linked article states that CSS breakpoints should group "similar" screen sizes and thus be at: 600px "narrow"
...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...
x = "Universe" <<-'MESSAGE' Hello #{x} MESSAGE # => "Hello #{x}" That will make the string behave like a single-quoted string, so sequences like \n will be used as they are...
Rubygems supports a 2FA for your account. Once enabled you need to provide your personal OTP code for every release...