#Authorize.net test credentials
API Login ID: 2VcPa843DT6
Transaction Key: 9g5a2x66nL9RmUzv
Transaction mode: Developer test account transactions
Default credit card transaction type: Authorization only
using GeometryBasics | |
x(a::AbstractVector) = first(a) | |
y(a::AbstractVector) = last(a) | |
x(a::AbstractMatrix) = a[ :, 1 ] | |
y(a::AbstractMatrix) = a[ :, 2 ] | |
function orientation(p::AbstractVector, q::AbstractVector, r::AbstractVector)::Int | |
val = ( y(q) - y(p) ) * ( x(r) - x(q) ) - ( x(q) - x(p) ) * ( y(r) - y(q) ) | |
return (val ≈ 0) ? 0 : ( (val > 0) ? 1 : 2 ) |
# Balancing over 4 nodes by hashing URI (consistently with md5) | |
# onto 16 shards. | |
upstream x0 { server 192.168.0.2; server 192.168.0.3 backup; } | |
upstream x1 { server 192.168.0.2; server 192.168.0.4 backup; } | |
upstream x2 { server 192.168.0.2; server 192.168.0.5 backup; } | |
upstream x3 { server 192.168.0.2; server 192.168.0.3 backup; } | |
upstream x4 { server 192.168.0.3; server 192.168.0.4 backup; } |
server { | |
listen 80; # IPv4 | |
listen [::]:80 ipv6only=on; # IPv6 | |
server_name ~^(?<thishost>[^.]+\.)?subdomain\.example\.com$; | |
access_log off; | |
location / { | |
## Resolve the upstream address using this DNS server or any other. | |
## Choose the one that suits you. |
#!/usr/bin/env ruby | |
# Usage: gitio URL [CODE] | |
# | |
# Turns a github.com URL | |
# into a git.io URL | |
# | |
# Copies the git.io URL to your clipboard. | |
url = ARGV[0] | |
code = ARGV[1] |
#Authorize.net test credentials
API Login ID: 2VcPa843DT6
Transaction Key: 9g5a2x66nL9RmUzv
Transaction mode: Developer test account transactions
Default credit card transaction type: Authorization only
server { | |
listen 80; | |
root /root/to/your/docroot; | |
proxy_redirect off; | |
proxy_intercept_errors on; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; |
local ffi = require("ffi") | |
ffi.cdef[[ | |
typedef long time_t; | |
typedef int clockid_t; | |
typedef struct timespec { | |
time_t tv_sec; /* seconds */ | |
long tv_nsec; /* nanoseconds */ | |
} nanotime; |
local ffi = require("ffi") | |
ffi.cdef[[ | |
typedef long time_t; | |
typedef struct timeval { | |
time_t tv_sec; | |
time_t tv_usec; | |
} timeval; | |
int gettimeofday(struct timeval* t, void* tzp); |
Vector = {} | |
Vector.__index = Vector | |
function Vector.__add(a, b) | |
if type(a) == "number" then | |
return Vector.new(b.x + a, b.y + a) | |
elseif type(b) == "number" then | |
return Vector.new(a.x + b, a.y + b) | |
else | |
return Vector.new(a.x + b.x, a.y + b.y) |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>index</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Aaron Gibralter"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
</head> |