Skip to content

Instantly share code, notes, and snippets.

@kylelemons
kylelemons / client.go
Created April 4, 2012 19:59
Server and client RPC benchmarks
package main
import (
"net/rpc"
"fmt"
"sync"
. "testing"
)
@hostmaster
hostmaster / nginx.conf
Created March 7, 2012 11:19
nginx post-action
location ^~ /attachments/download_zip/ {
proxy_pass http://mongrel;
proxy_redirect off;
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;
proxy_read_timeout 120;
proxy_connect_timeout 120;
post_action @notify_zip
@justincormack
justincormack / nginx.conf
Created April 29, 2011 14:57
Using Lua and Nginx to proxy Amazon web services example
# example location parts of nginx.conf
# add your own AWS keys, server lines etc, and set your aws domains, paths
http {
# you will need the luacrypto in the cpath, download from http://luacrypto.luaforge.net/
lua_package_cpath "/home/justin/lua/luacrypto-0.2.0/src/l?.so.0.2.0;;";
server {
listen 80;
@andrewschaaf
andrewschaaf / gist:871082
Created March 15, 2011 17:25
node sign/verify test
###
openssl genrsa 4096 > x.pem
openssl req -new -key x.pem -out x.csr
openssl x509 -req -days 365 -in x.csr -signkey x.pem -out x.crt
###
test = (private_key, cert) ->