I hereby claim:
- I am steventen on github.
- I am steventen (https://keybase.io/steventen) on keybase.
- I have a public key ASB0u_TtaHreT7kF64LKFIC9URCirBbcUQkv0rcVmcEtxQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
func GetCompany(db *sql.DB, key string) (Company, int) { | |
var company_id int | |
var api_key string | |
err := db.QueryRow("select id, api from companies where api = ? limit 1", key).Scan(&company_id, &api_key) | |
switch { | |
case err == sql.ErrNoRows: | |
return Company{}, 0 | |
case err != nil: | |
fmt.Println(err) | |
return Company{}, -1 |
proxy.OnRequest().DoFunc(func(req *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response) { | |
logger.Printf("Request: %s | IP: %s", req.URL, req.RemoteAddr) | |
return req, nil | |
}) |
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libyaml-dev libpcre3-dev | |
apt-get -y install curl git-core python-software-properties | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p362.tar.gz | |
tar -xvzf ruby-1.9.3-p362.tar.gz | |
cd ruby-1.9.3-p362/ | |
./configure --prefix=/usr/local | |
make |