Skip to content

Instantly share code, notes, and snippets.

package main
import (
"github.com/elazarl/goproxy"
"log"
"net/http"
)
func main() {
proxy := goproxy.NewProxyHttpServer()
/*
A Goroutine safe pattern using channels that abstracts away the channels
This is a concept of creating a goroutine safe object that uses channels under the covers to communicate
with the internal map[string]string structure. I know that typically this kind of solution may done
with mutexes but the excercise was in using channels on purpose although they are heavier.
Note a couple of points:
- When using channels, you can still build a public-facing api that nicely abstracts them away, therefore
package main
import (
"fmt"
//"runtime"
"time"
)
func main() {
//runtime.GOMAXPROCS(4)
@axgle
axgle / pkg-gonfig.go
Created May 14, 2012 02:13 — forked from mattn/pkg-gonfig.go
go implementation of pkg-config
package main
import (
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
)
http://blog.csdn.net/javali1984/archive/2008/07/21/2683622.aspx
再介绍一种中英互换的好方法,复制一个netbeans的快捷方式,右键属性里目标栏里加一句变成"C:\Program Files\NetBeans 6.1\bin\netbeans.exe" --locale en_US 。留两个快捷方式,
http://www.javaeye.com/topic/565606
http://chinaonrails.com/topic/view/1095.html
http://chinaonrails.com/topic/view/3727.html
http://chinaonrails.com/topic/view/2400.html
http://chinaonrails.com/topic/view/1435.html