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 |
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 | |
# This script currently only works if you have your derived data in the default location. | |
# Get the workspace name to search for, or exit with code 1 if no value in envariable | |
xcodeWorkspacePath = ENV["XcodeWorkspacePath"] || exit(1) | |
projectName = xcodeWorkspacePath[%r{/(\w+)\.xcodeproj}, 1] | |
#Get the folders in derived data that could match the workspace | |
derived_data = File.expand_path("~/Library/Developer/Xcode/DerivedData") | |
# Glob out the files matching our project |
#!/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) |
module GivenWhenThen | |
module ClassMethods | |
def def_Given(name, *args, &block) | |
_gwt_define(:Given, name, *args, &block) | |
end | |
def def_When(name, *args, &block) | |
_gwt_define(:When, name, *args, &block) | |
end |
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 |