A running example of the code from:
- http://marcio.io/2015/07/handling-1-million-requests-per-minute-with-golang
- http://nesv.github.io/golang/2014/02/25/worker-queues-in-go.html
Small refactorings made to original code:
#!/usr/bin/env python | |
import urllib | |
import httplib2 | |
cert_file = 'my.pem' | |
http = httplib2.Http(disable_ssl_certificate_validation=True) | |
http.add_certificate('', cert_file, domain='') |
#!/bin/bash | |
# Script to permanently remove files/folders from your git history. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
set -o errexit | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 file1 file2" | |
echo " or: $0 path1 path2" |
#!/bin/sh | |
# RWW.IO Web app deployer. Simply run `sh deploy.sh` inside your Web app dir and follow the steps. | |
CERTCMD="" | |
# get target URI | |
read -p "Please provide the URI of the target dir (ex: http://example.org/apps/myapp/): " HOST | |
if [ "$HOST" = "" ] | |
then |
// parse a Link header | |
// | |
// Link:<https://example.org/.meta>; rel=meta | |
// | |
// var r = parseLinkHeader(xhr.getResponseHeader('Link'); | |
// r['meta'] outputs https://example.org/.meta | |
// | |
function parseLinkHeader(header) { | |
var linkexp = /<[^>]*>\s*(\s*;\s*[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g; | |
var paramexp = /[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g; |
<!-- MIT License --> | |
<html> | |
<head> | |
<script> | |
function generateKey(alg, scope) { | |
return new Promise(function(resolve) { | |
var genkey = crypto.subtle.generateKey(alg, true, scope) | |
genkey.then(function (pair) { | |
resolve(pair) | |
}) |
Verifying that +deiu is my openname (Bitcoin username). https://onename.com/deiu |
// Map URL query items to their values | |
// e.g. ?referrer=https... -> queryVals[referrer] returns 'https...' | |
var queryVals = (function (a) { | |
if (a === '') return {} | |
var b = {} | |
for (var i = 0; i < a.length; ++i) { | |
var p = a[i].split('=', 2) | |
if (p.length === 1) { | |
b[p[0]] = '' | |
} else { |
A running example of the code from:
Small refactorings made to original code:
I hereby claim:
To claim this, I am signing this object:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8uEYNRF4530cKXkwkXl/AJv0XL+ydqmk0fvrs+5oAZNTSByvotjsYga9fj38Fc+nuKxTaUMnUzxZ5qUQxWJGB0cQ86/PoKU7jpuOf1w8NnZJE6CjdAthcZXnexLneGvbobUuFa7tOjQ+EtC6WpmeintPK7q+CuazUrAKfLHUjDVC5xDlZMfieXfpgFDW5GNOmkIhk6TBLrjqBnCPYXiaXLS+5Nf1Gba16noinNpGnL0++zmrBPUQ9E1WlYpkkbywoyOEERCvRjYaeUrrmswAJABAsaK1UB1Vf0p/EbkDpMGB8SNKyKxFgi23aYFndWH8unMAAndqwsqO+hM692slv deiu@nayu |