Skip to content

Instantly share code, notes, and snippets.

View lijiansong's full-sized avatar
🛠️
造轮子...

Json Lee lijiansong

🛠️
造轮子...
View GitHub Profile
package main
import (
"fmt"
"net/http"
"github.com/urfave/negroni"
)
func main() {
@lijiansong
lijiansong / main.go
Created January 14, 2018 02:09 — forked from chadlung/main.go
An example Go (golang) REST service that uses JWT (JSON Web Tokens) and Negroni http://www.giantflyingsaucer.com/blog/?p=5994
package main
// Generate RSA signing files via shell (adjust as needed):
//
// $ openssl genrsa -out app.rsa 1024
// $ openssl rsa -in app.rsa -pubout > app.rsa.pub
//
// Code borrowed and modified from the following sources:
// https://www.youtube.com/watch?v=dgJFeqeXVKw
// https://goo.gl/ofVjK4
@lijiansong
lijiansong / mgoExample.go
Created January 11, 2018 16:11 — forked from border/mgoExample.go
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
@lijiansong
lijiansong / install-nodejs-ubuntu.txt
Created January 7, 2018 07:29
Install node.js v6.10.2 and npm 3.10.10 for Ubuntu 14.04 for Try Typescript for Codingforenterpreuners
### nvm installation
$ curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
### run script
$ bash install_nvm.sh
$ source ~/.profile
$ nvm ls
$ nvm install 6.10.2
### set default node