...of the following file formats: Rasterized formats: webp, png, jpg, gif Vector format: svg Read why we want to use WebP instead of PNGs and JPGs in the future
...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...
...your developer tools' console. Use JavaScript to locate all card elements. Use Javascript to read the text content of the second card. Use JavaScript to remove the first card.
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...
What does "ownership" mean for files? Each file has 9 flags, 3 read, 3 write, and 3 executable flags. What do they mean? Write a simple bash script...
...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...
...files as an ActiveRecord attribute type, like :string or :integer Research Look at the README for the carrierwave gem Read about Common mistakes when storing file uploads with Rails
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...
...Version 4.6 introduces deprecation warning for Redis.current, which will be removed altogether in 5.0. Read this card for ways to deal with this. Now we can determine the correct REDIS...
...true } to activate this behavior. Note that since this executes a function on every read, this is slower than a dumb property. Full example Full example from the docs:
# config/deploy/production.rb (analog to config/deploy/staging.rb) ... server ' ', user: ' ', roles: %w(... webpack) Make sure to read as well: Webpack(er): Serving identical assets from all servers. Capistrano: Speeding up asset compile...