Skip to content

Instantly share code, notes, and snippets.

View gist:9c4afcd91fe24316cbf0
func openbrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()
@hyg
hyg / gist:6838182
Created Oct 5, 2013
抓绒衣关键词
View gist:6838182
polartec thermal pro
primaloft
View caseinfo
func CaseInfo(w http.ResponseWriter, r *http.Request) {
if r.Method == "GET" {
if len(r.Form["rid"]) > 0 {
var c CaseDetailData
if len(r.Form["readonly"]) > 0 {
c.ReadOnly = "disabled=\"disabled\""
} else {
c.ReadOnly = ""
}
@hyg
hyg / sidebar.css
Last active Aug 29, 2015
a simple sidebar template
View sidebar.css
.nav .home {
padding: 12px;
color: #737373;
display: inline-block;
font-size: 14px;
margin-bottom: 2px;
margin-right: 4px;
max-width: 162px;
overflow: hidden;
text-overflow: ellipsis;
You can’t perform that action at this time.