Conventional wisdon in the ruby community is that webrick in unsuitable for production, partly because it's single threaded.
For example, the heroku docs say:
By default WEBrick is single threaded, single process
And this
#!/usr/bin/env ruby | |
require 'json' | |
require 'net/http' | |
query = <<-EOS | |
{ | |
organization(slug: "example-slug") { | |
members(first: 100, email: "james@example.com") { | |
edges { |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: build-robot | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: build-robot |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: build-robot | |
spec: | |
replicas: 3 | |
template: | |
metadata: | |
labels: | |
app: build-robot |
provider "aws" { | |
region = "us-east-1" | |
version = "~> 2.45" | |
} | |
data "aws_region" "primary" { | |
} | |
data "aws_availability_zones" "primary" { | |
} |
# list accounts I have access to in our org | |
aws organizations list-accounts | |
# list roles in our account | |
aws iam list-roles |
require 'pdf/reader' | |
require 'json' | |
require 'forwardable' | |
class JsonTextReceiver | |
extend Forwardable | |
SPACE = " " | |
attr_reader :state, :options, :characters |
#!/usr/bin/env ruby | |
# Small script that converts an IP address into its AS number. Also provides a | |
# helpful link to Geoff Huston's handy AS summary page | |
require 'ipaddr' | |
require 'resolv' | |
USAGE = "ip-to-as <ipv4/ipv6>" |
#!/bin/bash -e | |
################################################## | |
# git-fetch-pr | |
# | |
# A script to ease checking out github pull requests as a local branch, without | |
# the hassle of adding a new remote | |
################################################## | |
USAGE="USAGE: git-fetch-pr <pr-number> [remote]" |
# start a container with bash (or sh) | |
docker run -ti --entrypoint=bash image:tag | |
# list docker images on local machine | |
docker images | |
# view layers of an individual image | |
docker history image:tag [--no-trunc] |
Conventional wisdon in the ruby community is that webrick in unsuitable for production, partly because it's single threaded.
For example, the heroku docs say:
By default WEBrick is single threaded, single process
And this