I hereby claim:
- I am benhagen on github.
- I am benhagen (https://keybase.io/benhagen) on keybase.
- I have a public key whose fingerprint is 235F D020 F869 F7F4 F808 76B2 509B 9465 7663 AF33
To claim this, I am signing this object:
#!/usr/bin/env python | |
from M2Crypto import SSL | |
versions = ["sslv2", "sslv23", "sslv3", "tlsv1"] | |
ciphers = [] | |
for version in versions: | |
ctx = SSL.Context(version, weak_crypto=True) | |
conn = SSL.Connection(ctx) |
require 'formula' | |
class LibdnetPython <Formula | |
depends_on 'libdnet' | |
url 'http://libdnet.googlecode.com/files/libdnet-1.12.tgz' | |
homepage 'http://code.google.com/p/libdnet/' | |
sha1 '71302be302e84fc19b559e811951b5d600d976f8' | |
def install | |
ENV["CFLAGS"] = "-O3 -w -pipe" |
def is_ipv4(ip): | |
match = re.match("^(\d{0,3})\.(\d{0,3})\.(\d{0,3})\.(\d{0,3})$", ip) | |
if not match: | |
return False | |
quad = [] | |
for number in match.groups(): | |
quad.append(int(number)) | |
if quad[0] < 1: | |
return False | |
for number in quad: |
#!/bin/bash | |
read -sp "Enter encryption password: " PASSWORD | |
echo "" | |
read -sp "Confirm encryption password: " PASSWORD_CONFIRM | |
echo "" | |
if [[ "$PASSWORD" != "$PASSWORD_CONFIRM" ]]; then | |
echo "ERROR: Passwords do not match!" | |
exit 1 |
#!/usr/bin/env python | |
import requests | |
url = "http://testurl/" | |
referer = "https://refererurl/" | |
print "URL: {}\nREFERER: {}\n".format(url, referer) | |
request = requests.get(url, headers={"Referer": referer}) |
{ | |
"Id": "Restrict access to S3 keys by HTTP referer header", | |
"Statement": [ | |
{ | |
"Sid": "S3 Referer Header Check", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "s3:GetObject", |
I hereby claim:
To claim this, I am signing this object:
Disclaimer: I am a total Redis newb. I'm sure this could be done better.
TL;DR The 4GB droplet is oddly almost 2x faster than smaller and bigger droplets (which are otherwise pretty consistent).
Some quick benchmarks for running Redis on DigitalOcean. All tests were run on the same "Ubuntu 14.04 x64" provisioned instance resized between the different droplet sizes. The benchmark was run twice (once in the afternoon PST, and once in the morning PST). Benchmark executed as:
> redis-benchmark -q -n 100000
#!/usr/bin/env python | |
"""template | |
Usage: | |
template.py list [--allregions|-r <region>...] [-v] | |
Options: | |
-h --help Show this screen | |
--version Show version |