Average of 10 pings from EC2 instance in the from
region to the EC2 endpoint in the to
region.
ping ec2.%s.amazonaws.com/
From | To | Avg (ms) |
---|---|---|
ca-central-1 |
us-east-1 |
14.4 |
ca-central-1 |
us-west-2 |
75.4 |
# .. snip .. | |
# Lifted from https://grafana.com/docs/grafana-cloud/quickstart/docker-compose-linux/#step-1-create-the-compose-file on 2022-10-07 | |
grafana-node-exporter = { | |
# https://github.com/prometheus/node_exporter/releases | |
image = "prom/node-exporter:v1.7.0"; | |
autoStart = true; | |
extraOptions = [ | |
"--cpus=1" | |
"--memory=512m" | |
]; |
ActiveJob::Base.queue_adapter = :delayed | |
$stdout.sync = true | |
$stdout.flush | |
class MyBaseJob < ActiveJob::Base | |
# Stop delayed retrying at all | |
def max_attempts | |
0 | |
end |
Error = Class.new(StandardError) | |
class Client | |
Error = Class.new(StandardError) | |
def call | |
raise "ZOMG" | |
rescue => e | |
raise Error.new("Uh oh #{e.inspect}") | |
end |
# frozen_string_literal: true | |
# Custom inflector for Zeitwerk | |
# | |
# The default inflector at ActiveSupport::Dependencies::ZeitwerkIntegration::Inflector only | |
# lets us override by `basename`, but we have both `Thing` and `THING` defined as constants | |
# in the app so that doesn't work for us. Rather than rename everything just now, work around it | |
# by letting us define overrides by _filepath_ (`abspath`) as well as `basename`. | |
# | |
# NB: Normally we'd subclass the default implementation, but it's a Module so can't do that. |
{ | |
"auto_update": true, | |
"base_keymap": "TextMate", | |
"default_dock_anchor": "bottom", | |
"projects_online_by_default": false, | |
"theme": "Ayu Light", | |
"buffer_font_family": "FiraCode Nerd Font Mono", | |
"buffer_font_size": 14, | |
"tab_size": 2, | |
"hard_tabs": false, |
require "benchmark/ips" | |
Benchmark.ips do |b| | |
b.report("Array.new block") do | |
Array.new(100) { 10 } | |
end | |
b.report("Array.new argument") do | |
Array.new(100, 10) | |
end |
{ | |
auto_https off | |
} | |
:8080 { | |
root * . | |
file_server | |
templates | |
} |
// something | |
{ | |
"one": true, | |
"bar": "Something", | |
} |
Average of 10 pings from EC2 instance in the from
region to the EC2 endpoint in the to
region.
ping ec2.%s.amazonaws.com/
From | To | Avg (ms) |
---|---|---|
ca-central-1 |
us-east-1 |
14.4 |
ca-central-1 |
us-west-2 |
75.4 |
require "factory_bot" | |
require "active_support/all" | |
module LocalFactory | |
class Factory | |
attr_reader :factories | |
def initialize | |
@factories = {} | |
end |