This card is a general reminder to avoid the short version of a command option in shared code. It's much easier to understand a command and search for an...

...option when it's written out. You can still use the short version of the options in your own terminal or in code snippets that are more useful when they...

...some behavior you may eventually run into when upgrading your application. This aims to save you some time understanding what happens under the hood to possibly discover problems faster as...

...renamed to denylists. You will have to rename all occurrences in your code. Make sure that you have defined a trait for validating the extensions and content types in all...

makandra dev

...possible to only use -f pretty for the rerun. Drawbacks: MAJOR: With our current setup, when the main run fails without writing a tmp/failing_features.txt (e.g. due to a syntax error...

...the CI job will pass MINOR: With our current setup, we lose the test coverage of the main run A fix for the passing CI despite syntax error could look...

apidock.com

...are automagically available through accessors on the Active Record object. When you need to specialize this behavior, you may override the default accessors (using the same name as the attribute...

...and simply call the original implementation with a modified value. Example: class Poet < ApplicationRecord def name=(value) super(value.strip) end end Note that you can also avoid the original setter...

This is super stupid: In the Thunar file manager, select the file Go to File / Properties / Open With (WTF!) Select the preferred application from the list and hit "Set default...

...This setting will apply to all files with that extension...

In your ~/.gitconfig: [core] editor=nano

github.com

These warnings are printed when the etc Gem is installed, while etc is also included in Ruby. Fix with:

...the code below to check whether the browser can make connections to the current site: await isOnline() // resolves to true or false The code The isOnline() function below checks if...

...you can make real requests by re-fetching your site's favicon. If the favicon cannot be downloaded within 6 seconds, it considers your connection to be offline. async function...

Settings -> Editor -> General -> Smart Keys -> Unindent -> To nearest indent position RubyMine 7.0: Settings -> Editor -> General -> Smart Keys -> Backspace smart indent -> uncheck

...s calc(100 - l)); Here is what happens: from currentColor tells hsl() to start with the value of currentColor. calc(h + 180) rotates the color hue by 180 degrees, i.e...

...to the opposite of the color wheel. s keeps saturation unchanged. calc(100 - l) inverts lightness. For example, 0% becomes 100%, and 100% becomes 0%. Example usage .demo { --inverted-color...

With ActiveSupport you can say: class Robot def self.likes_humans? 'Nope.' end delegate :likes_humans?, to: :class end Robot.likes_humans? # => 'Nope.' Robot.new.likes_humans?

...implementation changes. The information below is validated for the current list of browsers we support. By default your html and body elements are only as high as the actual page...

...html and body elements will only be around 40 pixels high, regardless of the size of your browser window. You might be surprised by this, since setting a background on...

rubylearning.com

This article will show you how to use throw and catch. It's a nice tool to break out of multiple loops when a result is obtained.

...card Ruby: A small summary of what return, break and next means for blocks...

brandcolors.net

brandcolors.net provides you with the colors of the world's biggest brands, easily searchable...

doubleyourfreelancing.com

How you can unknowingly screw your client's business when all you think about is closing the next user story...

robots.thoughtbot.com

Rails 4.0 introduced a helpful new method for ActiveRecord queries: where.not. It can make clunky queries easier to read.

igvita.com

About Chrome's network stack and optimizations to load web pages faster...

makandra dev
bitbucket.org

Makes a robust determination of a user's timezone through Javascript.

martinciu.com

How to make class_attribute behave like class_inheritable_attribte which no longer exists in Rails.

0xfe.blogspot.com

Chrome now supports desktop notifications using WebKit's webkitNotifications API. This means you can create popup bubbles from Javascript...

superuser.com

Ubuntu natty introduced new "invisible" scrollbars for GTK programs such as gEdit or Nautilus. If you do not like them: sudo apt-get purge liboverlay-scrollbar-* In order to have...

github.com

File upload solution that supports form roundtrips when a validation fails...

...issues, depending on the exact version, and depending on your app. However, it is still possible to give some generic advice on how you want to tackle the update in...

...really confident about upgrading Rails, have a look at Rails LTS. How many update steps? Besides the Rails upgrade itself, you might also want to upgrade your other gems and...

highscalability.com

Awesome battle report from Pinterest trying to scale their setup using different approaches. When you push something to the limit all technologies fail in their own special way. This lead...

...evaluate tool choices with a preference for tools that are: mature; really good and simple; well known and liked; well supported; consistently good performers; failure free as possible; free. Using...