...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...
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...
...this card, we describe a wrapper for it that humanizes a given number of seconds in the "next best" unit, like seconds, minutes, etc. Example usage >> new Duration(42).humanized...
>> new Duration(123456).humanized() => '1 Tag' >> new Duration(123456).humanized('es') => '1 día' Code Here is the code as an ECMAScript module. Note that we default to German in...
...Repeat Yourself (or DRY). In Ruby on Rails we keep our code DRY by sharing behavior by using inheritance, modules, traits or partials. When you reuse behavior you want to...
...writing integration tests with Cucumber, where you need to express yourself with Gherkin and step definitions instead of Ruby classes and methods. But don't dispair! Below you will find...
In your ~/.gitconfig: [core] editor=nano
Icon fonts like Font Awesome are infinitely scalable, look great on high-DPI displays and will give your app a modern look. However, icon fonts can be very awkward to...
...use compared to raster icons. Elements are given icons by giving them a special class like icon-plus or icon-home: Create The icon font's stylesheet will then recognize...
...latest commits are not ready for production? Then use git merge master~n to skip the n-last commits. Tip A big advantage of merging vs. cherry-picking is that...
Settings -> Editor -> General -> Smart Keys -> Unindent -> To nearest indent position RubyMine 7.0: Settings -> Editor -> General -> Smart Keys -> Backspace smart indent -> uncheck
SVG is an acronym for "scalable vector graphics". SVGs should be used whenever an image can be described with vector instructions like "draw a line there" or "fill that space...
...they're not suited for photographs and the like). Benefits are the MUCH smaller file size and the crisp and sharp rendering at any scale. It's a simple, old...
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?
...least one external REST API, machine-to-machine communication via GraphQL is less commonly seen. In this card, I'd like to give a quick intro on how to query...
Interacting with GraphQL feels a bit like querying a local database. You are submitting queries to fetch data in a given structure (like SELECT in SQL) or mutations to...
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 provides you with the colors of the world's biggest brands, easily searchable...
How you can unknowingly screw your client's business when all you think about is closing the next user story...
Rails 4.0 introduced a helpful new method for ActiveRecord queries: where.not. It can make clunky queries easier to read.
About Chrome's network stack and optimizations to load web pages faster...
Makes a robust determination of a user's timezone through Javascript.
How to make class_attribute behave like class_inheritable_attribte which no longer exists in Rails.
Chrome now supports desktop notifications using WebKit's webkitNotifications API. This means you can create popup bubbles from Javascript...
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...
File upload solution that supports form roundtrips when a validation fails...
Slow test suites are a major pain point in projects, often due to RSpec and FactoryBot. Although minitest and fixtures are sometimes viewed as outdated, they can greatly improve test...
We adopted a project using minitest and fixtures, and while it required some initial refactoring and establishing good practices, the faster test suite was well worth it! Stick with...
...or position: fixed display: inline-block display: table-cell overflow: (not "visible") and more, see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context Example: A fluid main area with a right sidebar
...you don't want either column to clear content of the other. Float the sidebar to the right and you're set: its content now renders in the sidebar's...
...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...