...tier (in Bootstrap e.g. "xs" or "md") without duplicating breakpoints to JavaScript: you can read the current breakpoint tier(s) in JavaScript...
...as new technologies evolve. If you are new to this topic, I strongly recommend reading the MDN guide on audio and video formats. TL;DR: To ensure that the playback...
...FLAC, Opus, Vorbis WEBM CC BY 3.0 / BSD-like VP8, VP9 Opus, Vorbis Further reading: MDN: Media container formats (file types) Video Codec Format Matrix A broader comparison of many...
...counts top-level regexp groups, ignoring nested capture groups (I could not confirm that). Read more Upgrading to Cucumber 3.0.0 on cucumber.io
When handling nested hashes the RSpec output is often hard to read. Here the gem super_diff could help. Add super_diff to your project Add super_diff to your...
...was split in many. Fortunately, Git offers a special highlighting mode that directs the reader's attention to relevant code parts: git diff --color-moved=dimmed-zebra
...specs as you can isolate specific parts of the rendered view and then use readable and powerful matchers to assert what you except to see within that part.
This approach allows your view specs to be styled with enhanced readability by isolating the relevant part of the page within a subject block.
...inside the gem. ActiveScaffold provides a quick and powerful user interfaces for CRUD (create, read, update, delete) operations for Rails applications. It offers additonal features including searching, pagination & layout control...
...your setup, you might need to change that file's permissions so Apache can read it...
Info 'postcss-cssnext' has been deprecated in favor of 'postcss-preset-env'. Read more at https://moox.io/blog/deprecating-cssnext/ Read through the Webpack 4 migration guide If your project...
...table (like other_table.column), ActiveRecord will go with option 2 and build a joined table. Read below for more information about this issue. In Rails3+ you can also disable this annoyingly...
It's 2024 and we have tools like ffmpeg, imagemagick and GPT readily available. With them, it's easy to convert texts, images, audio and video clips into each other...
...binary string which we can use to create a file binary_string = binary_data_array.pack('C*') Read the docs for more information about packing data in ruby Caveats make sure you can...
config.file_fixture_path = "spec/custom_directory" end Alternatives: Rails.root.join('spec/fixtures/files/avatar.jpg').open('r') Rails.root.join('spec/fixtures/files/avatar.jpg').read File.open('spec/fixtures/files/avatar.jpg') (might only work if you run the command from the Rails root directory...
...possible products, categories and vendors and it is updated once a month. When you read this file with the Nokogiri default (DOM) parser, it creates a tree structure with all...
...easily navigate through it via css/xpath selectors. The only problem is that if you read the whole file into memory, it takes a significant amount of RAM. It is really...
Reading a URL via GET: curl http://example.com/ Defining any HTTP method (like POST or PUT): curl http://example.com/users/1 -XPUT Sending data with a request: curl http://example.com/users...
...password@example.com/users/1 -XPUT -d"screen_name=batman" Check the man page for more features. Read more You can also use Cookies with cURL. For easily making HTTP requests in an...
...run into the limits of our previous approaches (e.g. ChoiceTrait cannot be internationalized). Please read the assignable_values README to familiarize yourself with the new solution. Also see our instructions...
The NestedHash class allows you to read and write hashes of any depth. Examples: hash = {} NestedHash.write hash, 'a', 'b', 'c', 'value' # => { a: { b: { c: 'value' } } } NestedHash.read hash, 'a', 'b', 'c...
...b: { c: 'value' } } NestedHash.read hash, 'foo', 'bar' # => undefined Inspired by victusfate. Code class @NestedHash @read: (objekt, keys...) -> if objekt and keys.length @read objekt[keys[0]], keys[1...]... else objekt
...will match This test. possessive: specified by adding a plus sign to the qualifier. Reads like "greedy without backtracking" – *+ and ++ try to match everything but immediately return if it doesn...
I used two lab days to read the The framework field guide - Fundamentals, the first of a three part series to learn the basics of frontend technologies. I can highly...
config.secret_key_base = config.secrets.secret_key_base def secrets config.secrets end config_for reads from config/secrets.yml. It expects config to be nested by environment. def secrets defines that method...
If you ever need to restore exact records from one database to another, Marshal might come in handy. Marshal.dump is...
...s logger utility, it is often useful to sync them. So other process can read the output just in time. Example with enabled sync log_path = '/tmp/some_log.log' log_file = File.open...
...you usually use is probably a bit too small and makes code hard to read for users on smaller screens or low-bandwidth connections when the image quality is lower...
...OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 Re-read permissions When you're done making the above changes, we need to re-read mysql...