Skip to content

Instantly share code, notes, and snippets.

Vladimir Mihailenco vmihailenco

Block or report user

Report or block vmihailenco

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View haproxy.cfg
frontend fe_http
bind *:80
capture request header Connection len 32
capture response header Connection len 32
default_backend be_go
View server.go
package main
import (
"log"
"net/http"
)
func main() {
http.HandleFunc("/upload", func(w http.ResponseWriter, req *http.Request) {
})
View gist:065dd023bee888f9505edf0099691f00
package main
import (
"fmt"
// "log"
// "time"
"github.com/go-pg/pg"
"github.com/go-pg/pg/orm"
)
View gist:5f553d12173a5a9e64d8a3ba19c9b43d
package main
import (
"fmt"
"github.com/go-pg/pg"
"github.com/go-pg/pg/orm"
"github.com/go-pg/sharding"
)
View gist:1c790383011ebc388dc469a640a76514
package main
import (
"log"
"strconv"
"time"
redis "gopkg.in/redis.v4"
)
View gist:78768e6eaa93aabd5888
package main
import (
"log"
"math/rand"
"strings"
"gopkg.in/pg.v4"
)
View gist:2ab6aaa5b8143c4b1b67
package main
import (
"log"
"math/rand"
"gopkg.in/pg.v4"
)
func main() {
View gist:1fe2808e1a5b77180aaf
package main
import (
"fmt"
"net/http"
"reflect"
"runtime"
"github.com/codegangsta/negroni"
"gopkg.in/airbrake/gobrake.v2"
View gist:501f7b12e10980fd1e5d
package sharding
import (
"sync"
"github.com/golang/groupcache/consistenthash"
"gopkg.in/redis.v1"
)
const replicas = 100
View gist:4cd0c0429719b1ceeeb5
func copyHeader(dst, src http.Header) {
for k, vv := range src {
for _, v := range vv {
dst.Add(k, v)
}
}
}
func cloneReq(req *http.Request) *http.Request {
outreq := new(http.Request)
You can’t perform that action at this time.