Wes Winham [email protected]
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
require 'chef/mixin/shell_out' | |
require 'chef/platform' | |
require 'chef' | |
include Chef::Mixin::ShellOut | |
class Chef | |
class Provider | |
class Package | |
class Pkgng < Chef::Provider::Package |
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works | |
package main | |
import ( | |
"fmt" | |
"golang.org/x/crypto/ssh" | |
) | |
const privateKey = `content of id_rsa` |
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
import sys | |
import StringIO | |
import requests | |
import PIL.Image | |
import tesserwrap |
// To make the benchmark results predictable, we replace Math.random | |
// with a 100% deterministic alternative. | |
Math.random = (function() { | |
var seed = 49734321; | |
return function() { | |
// Robert Jenkins' 32 bit integer hash function. | |
seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff; | |
seed = ((seed ^ 0xc761c23c) ^ (seed >>> 19)) & 0xffffffff; | |
seed = ((seed + 0x165667b1) + (seed << 5)) & 0xffffffff; | |
seed = ((seed + 0xd3a2646c) ^ (seed << 9)) & 0xffffffff; |
http { | |
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m; | |
proxy_temp_path /var/tmp; | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
gzip on; | |
gzip_comp_level 6; |
#!/bin/sh | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# | |
## A sample /etc/unicorn/my_app.conf | |
## |
#!/bin/bash | |
echo "Network speed testing..." | |
cachefly=$( wget -O /dev/null http://cachefly.cachefly.net/100mb.test 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from CacheFly: $cachefly " | |
linodeatl=$( wget -O /dev/null http://atlanta1.linode.com/100MB-atlanta.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Linode, Atlanta GA: $linodeatl " | |
linodedltx=$( wget -O /dev/null http://dallas1.linode.com/100MB-dallas.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Linode, Dallas, TX: $linodedltx " | |
linodejp=$( wget -O /dev/null http://tokyo1.linode.com/100MB-tokyo.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) |
Wes Winham [email protected]
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
require 'net/http' | |
require 'colorize' | |
# find all available three-letter .io domains | |
alph = ('a'..'z') | |
# generate all three-character strings | |
threes = alph.map { |a| alph.map { |b| alph.map { |c| "#{a}#{b}#{c}" } } }.flatten | |
def io_available?(tld) | |
url = URI.parse("http://www.nic.io/cgi-bin/whois?query=#{tld}.io") |
Original source: