Skip to content

Instantly share code, notes, and snippets.

View DrGo's full-sized avatar
💭
Palm oil. know the facts!

DrGo

💭
Palm oil. know the facts!
View GitHub Profile
@DrGo
DrGo / main.go
Created November 22, 2015 21:50 — forked from nmerouze/main.go
Example for "Build Your Own Web Framework in Go" articles
package main
import (
"database/sql"
"encoding/json"
"errors"
"fmt"
"log"
"net/http"
"time"
@DrGo
DrGo / main.go
Created November 22, 2015 21:49 — forked from nmerouze/main.go
JSON-API with Go and MongoDB: Final Part
package main
import (
"encoding/json"
"log"
"net/http"
"reflect"
"time"
"github.com/gorilla/context"
@DrGo
DrGo / OpenWithSublimeTextAsAdmin.bat
Last active September 8, 2015 00:33 — forked from jcppkkk/OpenWithSublime.bat
Add context menu to allow user open file or folder with Sublime as User or Admin. Save the raw file OpenWithSublimeTextAsAdmin.bat into sublime folder and execute it.
@echo off
@rem \"%stPath%\" : Path to Sublime Text installation dir.
@rem %UserEntry%: Key name for the registry entry.
@rem %UserMenuText% : Context menu text. Set your preferred menu text (e.g.: translate to your language).
@rem %AdminEntry%: Key name for the registry entry.
@rem %AdminMenuText% : Context menu text. Set your preferred menu text for administrator privilege (e.g.: translate to your language).
SET stPath=%~dp0sublime_text.exe
SET UserEntry=Sublime Text
SET AdminEntry=Sublime Text As Admin
@DrGo
DrGo / bmark_test.go
Last active August 29, 2015 14:25 — forked from hutch/bmark_test.go
accompanies the blog post: Comparing JSON and XML as DataFormats… Again http://xampl.com/so/2012/06/22/1164/
package main
// run from the command line as:
// go test -bench=".*
import (
"testing"
)
func BenchmarkJSON(b *testing.B) {