w3c.github.io

Here is how to use Chromedriver without libraries like selenium-webdriver. This can be useful for debugging. The following example...

...rough setting (e.g. open Photos with Shotwell Viewer). If a certain file type (or better mime type) should be opened with a different application, this can be set via command...

For searching in large database tables we usually use PostgreSQL's fulltext search capabilities. While this works reasonably well for...

Newer versions of Bundler (at least since 2.3) have two different behaviors: If your Gemfile.lock reads PLATFORMS: ruby, it might either install a compatible platform-specific version...

...or similar), bundler will install exactly the versions indiciated in the Gemfile.lock. Fix For better consistency, I would advise to make sure you always have PLATFORMS x86_64-linux

We are using the BEM pattern ("Block, Element, Modifier") to structure our CSS in all new projects. We try to migrate legacy projects to BEM, block-by-block. Read

...it important modifiers start with -? More examples Look at some examples of a good BEM structure in the DOM tree of these websites: https://makandra.de/ https://railslts.com/ https://www.aitiraum.de/

...Just take a step back and evaluate its usefulness first. Also, consider if its benefits outweigh the cost of teaching and maintaining the new thing. Being a good open-source...

...until we know for sure which image version we will need and the solution becomes very simple. Here is a small helper function for your mailer views: def inline!(version...

...least modularity 3.1.0. Compare implementations Now compare your implementations. Which one do you like best? Does modularity offer features the other approaches don't...

Redis.current will be removed without replacement in redis-rb 5.0. Version 4.6.0 adds deprecation warnings for Redis.current and Redis.current=: `Redis.current...

tl;dr Individual transform properties are great because they allow you to write more readable and maintainable CSS, especially when...

makandra dev

...make block elements take up much more space than desired, even stretching their container beyond the screen edge on small screens. min-width is defined to win against competing width...

...Although this may be useful for debugging, when writing custom steps you may be better off using XPath...

JavaScript is a scripting language supported by all browsers. Browsers don't speak Ruby, so if we want to implement...

regular-expressions.info

Look-arounds provide a way to match context-dependant. You can look-behind, look-ahead and to both in a positive and negative way. The look-around will...

...Modifiers in Ruby Add modifiers after the final slash, e.g. /Regex/im, or at the beginning of the regex, e.g. /(?i)regex/. i: case insensitivity m: make the .-character also match...

...way to calculate the signature is to use an HMAC. Unfortunately, I don't believe you can calculate a proper HMAC in a regular Apache installation. Instead, we do something...

stackoverflow.com

Important You should only implement an implicit conversion method if your object already behaves like the target type. You never create a new object in an implicit conversion method...

...either return self or not be implemented at all. Obviously, this is the reason behind this recent card about Ruby implicitly converting a hash to keyword arguments. It's not...

makandra Curriculum

Watch Solving bizarre authorization requirements with Rails Read the Consul README Read the assignable_values README Understand how Consul...

makandra dev
api.rubyonrails.org

ActiveModel supplies an errors object that behaves similar to a Hash. It can be used to add errors to a record, as well as to query the record for registered...

PostgreSQL can cosplay as a full-text search engine. It doesn't have the features or fidelity of ElasticSearch or...

...already_read" : 0, "request_body_fully_read" : true, "request_body_type" : "NO_BODY", "response_begun" : false, "session" : { "gupid" : "18asd3ed-U4FSeggT0O", "pid" : 4273 }, "last_data_send_time" : null, tells me, that...

2013-02-20 (Tobias) ... with exactly the following rows 2012-06-20 (Henning) Better normalization (more consistent for expected/real input, gets rid of nbsps) 2012-06-01 (Tobias)

...wildcard support (partial matches) 2012-05-25 (Tobias) Better error output; "should not see" now fails if any of the rows is present; cells are now matched exactly, wildcard for...

...like using the /slackfont command. Fonts need to be installed on your machine. Webfonts beyond those provided by Slack won't magically work unless you install them locally.

Webpacker uses Babel and Webpack to transpile modern JavaScript down to EcmaScript 5. Depending on what browser a project needs...

Looking at the source code of the validates_numericality_of validator, it becomes clear that it converts the attribute in question to either an integer or float: if configuration[:only...

...ActiveRecord::Errors.default_error_messages[:not_a_number]) next end raw_value = raw_value.to_i else begin raw_value = Kernel.Float(raw_value.to_s) rescue ArgumentError, TypeError record.errors.add(attr_name, configuration[:message] || ActiveRecord::Errors.default...