This is a generic guidline that applies mostly to Ruby on Rails and Postgres, but can be usefull for running any database migrations in CI.
require 'marcel' | |
require 'memory_profiler' | |
require 'benchmark/ips' | |
puts "Memory stats for requiring mini_mime" | |
result = MemoryProfiler.report do | |
require 'mini_mime' | |
end | |
puts "Total allocated: #{result.total_allocated_memsize} bytes (#{result.total_allocated} objects)" |
This Gist demonstrates enabling Brotli in Nginx in App Engine Flex using a custom container.
Use of basic Nginx image adapting the example nginx.conf adapted from Full Example Configuration
docker run --rm -itd --name test-nginx \
-v $(pwd):/usr/share/nginx/html:ro \
The 4 C's of good technical communication:
Concision not only saves the audience time, it cuts out distracting verbiage and helps avoid burying key information in a sea of boiler plate.
Audiences very often revisit sources, and concision makes it easier to relocate particular bits of information.
Smaller pieces are easier to rearrange, and so in practice, the more concise, the more authors are likely to work out an ideal structure.
In your command-line run the following commands:
brew doctor
brew update
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.
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" |
require 'sidekiq/api' | |
# 1. Clear retry set | |
Sidekiq::RetrySet.new.clear | |
# 2. Clear scheduled jobs | |
Sidekiq::ScheduledSet.new.clear |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/