Skip to content

Instantly share code, notes, and snippets.

package main
import (
"bytes"
"fmt"
"net"
"net/http"
"os"
"sort"
"strconv"
@zennro
zennro / .gitignore
Last active August 29, 2015 14:07 — forked from brianm/.gitignore
local_client
server
client
ext
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Modify by linuz.ly
package main
import (
"bytes"
"fmt"
"code.google.com/p/go.crypto/ssh"
package main
import (
"log"
"net/http"
)
func redirect(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "http://www.google.com", 301)
@zennro
zennro / http_get.go
Last active August 29, 2015 14:07 — forked from ijt/http_get.go
package main
import (
"fmt"
"http"
"io/ioutil"
"os"
)
func main() {
package main
import (
"fmt"
"runtime"
"time"
)
func waitAround(die chan bool) {
<- die
package main
import (
"log"
"net/http"
"net/http/httputil"
"net/url"
)
func main() {
@zennro
zennro / proxy.go
Last active August 29, 2015 14:07 — forked from vmihailenco/proxy.go
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"
@zennro
zennro / chat.go
Last active August 29, 2015 14:07
package main
import (
"bufio"
"net"
)
type Client struct {
incoming chan string
outgoing chan string