Perl-inspired notation to quote strings: by using % (percent character) and specifying a delimiting character.
Any single non-alpha-numeric character can be used as the delimiter, %[including these], %?or these?, %~or even these things~.
| (function() { | |
| 'use strict'; | |
| if (window.FormData) { | |
| FormData.prototype.appendObject = function (obj, namespace) { | |
| // EXAMPLE: | |
| // var person = { name: 'some name', age: 87 }; | |
| // var fd = new FormData(); | |
| // fd.appenObject(obj, 'person'); |
| .host:/vmshared /mnt/vmshared fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_unmount,defaults 0 0 |
| require 'active_record/log_subscriber' | |
| class SlowQueryLog < ActiveSupport::LogSubscriber | |
| if Rails.configuration.respond_to?(:slow_query_log_threshold_in_ms) | |
| if @@threshold = Rails.configuration.slow_query_log_threshold_in_ms | |
| @@threshold = @@threshold.to_i == 0 ? nil : @@threshold.to_i | |
| end | |
| else | |
| @@threshold = nil |
Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.
You can get all of this information on the command line.
rails generate with no generator name will output a list of all available generators and some information about global options.
rails generate GENERATOR --help will list the options that can be passed to the specified generator.
For years, people have been using jemalloc with ruby. There were various benchmarks and discussions. Legend had it that Jemalloc 5 didn't work as well as Jemalloc 3.
Then, one day, hope appeared on the horizon. @wjordan offered a config for Jemalloc 5.
FROM ruby:3.1.2-bullseye
RUN apt-get update ; \