Skip to content

Instantly share code, notes, and snippets.

View maddygoround's full-sized avatar
🏠
Working from home

maddygoround maddygoround

🏠
Working from home
View GitHub Profile
@maddygoround
maddygoround / pratical.md
Last active August 24, 2020 11:09
NodeJS Pratical

NodejS Practical!

Goal

Create a Reverse proxy server in NodeJS which should serve static site

Objective

Attendee should be able to implement reverse proxy in Nodejs. Reverse proxy shold able to serve static site. Proxy should handle the HTML Push state too.

@maddygoround
maddygoround / mysqlerror.go
Created October 18, 2015 03:44
Mysql error codes listed by "github.com/jianfengye/web-golang/example/src/mymysql/mysql"
package main
const (
ER_HASHCHK = 1000
ER_NISAMCHK = 1001
ER_NO = 1002
ER_YES = 1003
ER_CANT_CREATE_FILE = 1004
ER_CANT_CREATE_TABLE = 1005
ER_CANT_CREATE_DB = 1006
@maddygoround
maddygoround / regex.go
Last active October 17, 2015 12:42
Find Error code from the given error in golang
package main
import ("regexp"
"errors"
"fmt"
)
var errExtract = regexp.MustCompile(`Err (\d+)`)
func main(){
customErr := errors.New("Err 1024 ; sql must use 3 rows but define 4 in scan")
match := errExtract.FindStringSubmatch(customErr.Error())