Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"time"
)
func main() {
data := testMap2()
testMap(data)
@Barbery
Barbery / nginx.conf
Last active March 28, 2016 05:31
reverse proxy gist
server {
listen 80;
server_name gist.stutostu.com;
access_log off;
resolver 8.8.8.8;
location / {
proxy_pass https://gist.github.com$request_uri;
proxy_connect_timeout 6s;
proxy_set_header Accept-Encoding "";
package main
import (
"fmt"
"time"
)
//for this question: http://www.v2ex.com/t/139818#reply98
func main() {
var sum, i int64
package user
type User struct {
id int
name string
age int
}
func New() *User {
@Barbery
Barbery / main.go
Last active August 29, 2015 14:07
package main
import (
"fmt"
"runtime"
"sync"
"sync/atomic"
)
// var l = &sync.Mutex{}

关于引入组件

1. 把代码放到页面head里面,自动加载

<script type="text/javascript"> 
    window.onload = function() { 
        var js = document.createElement("script"); 
        js.type = "text/javascript"; 
        js.src = "http://stutostu.qiniudn.com/app.js"; 
 document.getElementsByTagName("body")[0].appendChild(js); 
#泰国之旅
##曼谷:
- 6号:
- 四面佛(白天)