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 |
| // 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 |
| #!/usr/bin/env ruby | |
| # | |
| # SitePinger.rb | |
| # Pings a list of sites | |
| # | |
| # Created by Caius Durling <dev at caius dot name> on 2007-07-16. | |
| # Copyright 2007 Hentan Software. | |
| # Licenced under the Creative Commons Attribution-NonCommercial-ShareAlike 2.0 License. | |
| # |
| require "sqlite3" | |
| require "active_record" | |
| ActiveRecord::Base.establish_connection( | |
| adapter: "sqlite3", | |
| database: ":memory:", | |
| ) | |
| ActiveRecord::Schema.define do | |
| create_table "employees", force: :cascade do |t| |
| require "net/http" | |
| A_CHUNK_TOO_FAR = Class.new(StandardError) | |
| # @param url [URI] uri to fetch title of | |
| def url_title(url) | |
| title = nil | |
| Net::HTTP.start(url.host, url.port, use_ssl: (url.scheme == "https"), open_timeout: 5, read_timeout: 5) do |http| | |
| request = Net::HTTP::Get.new(url) |
brew install openjdk
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk(check `brew info openjdk` if that's still the correct command)
| require "net/http" | |
| require "json" | |
| require "rspec/autorun" | |
| module Thing | |
| def self.thing(response) | |
| case response | |
| when Net::HTTPSuccess | |
| :ok | |
| when Net::HTTPNotFound |
| // Callback hell approach | |
| function main() { | |
| console.log("hello from main") | |
| var name = "caius" | |
| sendHello(decorateName(name)) // <- smelly | |
| } | |
| function decorateName(name) { |