This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object main extends App { | |
println("hello world") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func randomString(size int) string { | |
alpha = `abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789` //better to define a const | |
buf := make([]byte, size) | |
for i := 0; i < size; i++ { | |
buf[i] = alpha[rand.Intn(len(alpha))] | |
} | |
return string(buf) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type panique interface{} | |
type catch struct { | |
cause panique | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"io" | |
"log" | |
"mime/multipart" | |
"net/http" | |
"os" | |
"path/filepath" | |
"runtime" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<script class="jquery library" src="/js/sandbox/jquery/jquery-1.8.2.min.js" type="text/javascript"></script> | |
<title>RunJS 演示代码</title> | |
</head> | |
<body> | |
<div id="con"> | |
abcdefghijklmn | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "net" | |
import "fmt" | |
func main() { | |
fmt.Println(IsPrivateIP("111.11.191.17")) | |
fmt.Println(IsPrivateIP("192.168.0.100")) | |
fmt.Println(IsPrivateIP("10.0.8.100")) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url(http://fonts.googleapis.com/css?family=Raleway:700,800); | |
html, body { margin: 0; } | |
:focus { outline: none; } | |
::-webkit-input-placeholder { color: #DEDFDF; } | |
::-moz-placeholder { color: #DEDFDF; } | |
:-moz-placeholder { color: #DEDFDF; } | |
::-ms-input-placeholder { color: #DEDFDF; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My name is {{.Name}} and I'm {{.Age}} years old!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"myapp/webserver/app/common" | |
"github.com/golang/glog" | |
"github.com/gorilla/mux" | |
"encoding/json" | |
"strconv" | |
"flag" | |
"fmt" |
OlderNewer