Skip to content

Instantly share code, notes, and snippets.

Oleku Konko olekukonko

Block or report user

Report or block olekukonko

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 long_polling.go
package main
import (
"container/list"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
@olekukonko
olekukonko / haproxy
Created Aug 8, 2013
Different websocket connection HA Proxy vs Nginx
View haproxy
#### HA Proxy
// PROXY BASED ON SUB-DOMAIN
frontend public
bind *:80
acl is_websocket hdr_end(host) -i ws.example.com
use_backend ws if is_websocket
default_backend www
@olekukonko
olekukonko / uuid
Created Sep 2, 2013
Simple way to generate UUID in go
View uuid
package main
import (
"os"
"fmt"
"log"
)
var Random *os.File
View gist:6487342
package main
import (
"compress/gzip"
"io"
"net/http"
"strings"
)
type gzipResponseWriter struct {
View letitfail.go
package main
import (
"bufio"
"fmt"
"os"
"time"
)
const numWorkers = 3
View proxy.go
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"
View rgb.php
// Inverse imagecolorat
$rgb = 11840909 ;
$r = ($rgb >> 16) & 0xFF;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;
// Convert To R , G, B
var_dump($r ,$g , $b);
View 1_singlehost.go
package main
import (
"net/http"
)
type SingleHost struct {
handler http.Handler
allowedHost string
}
View hi_reddit.go
package main
import (
"fmt"
"reflect"
)
//function types
type mapf func(interface{}) interface{}
You can’t perform that action at this time.