Skip to content

Instantly share code, notes, and snippets.

View baorv's full-sized avatar
🎯
Focusing

Bob Roan baorv

🎯
Focusing
  • Mageplaza
  • Hanoi, Vietnam
View GitHub Profile
@baorv
baorv / ajaxhook.js
Created June 25, 2019 04:53 — forked from srideepprasad/ajaxhook.js
Ajax Hook.js - A simple Ajax Callback Interceptor
/*
AjaxHook.js - A simple utility library for intercepting Ajax calls.
This may be useful to inject simple interceptors to analyze pr capture Ajax traffic and may be even useful for automation tests to determine when an Ajax response returns.
To use :
1>Create a new AjaxHook object
var hook = new AjaxHook();

There are two types of markup in Liquid: Output and Tag.

  • Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
  • Tag markup (which cannot resolve to text) is surrounded by
@baorv
baorv / shopify-discount-from-cookie.js
Created May 2, 2019 10:08 — forked from bmodena/shopify-discount-from-cookie.js
Add discount code to checkout from URL
@baorv
baorv / golang_job_queue.md
Created December 27, 2018 06:36 — forked from harlow/golang_job_queue.md
Job queues in Golang
@baorv
baorv / example.go
Created December 25, 2018 06:36 — forked from jordanorelli/example.go
a regex router in go.
package main
import (
"fmt"
"io"
"log"
"routes"
"net/http"
)
@baorv
baorv / 01_basic.go
Created December 25, 2018 04:25 — forked from reagent/00_README.md
Custom HTTP Routing in Go
package main
import (
"io"
"log"
"net/http"
)
func main() {
@baorv
baorv / gitflow-breakdown.md
Created November 8, 2018 10:08 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@baorv
baorv / gist:dc338e0c61cea99cd1141f4dd847c243
Created August 31, 2018 10:51 — forked from aodin/gist:9493190
Parsing JSON in a request body with Go
package main
import (
"encoding/json"
"io/ioutil"
"log"
"net/http"
)
type Message struct {
@baorv
baorv / main.go
Created August 23, 2018 10:34 — forked from mschoebel/main.go
Snippet: login/logout (Golang)
package main
import (
"fmt"
"github.com/gorilla/mux"
"github.com/gorilla/securecookie"
"net/http"
)
// cookie handling
@baorv
baorv / main.go
Created August 11, 2018 12:31 — forked from sogko/main.go
[graphql-go] Mutation example with `graphql-go/handler`
package main
import (
"github.com/graphql-go/graphql"
"github.com/graphql-go/handler"
"net/http"
)
type Todo struct {
ID string `json:"id"`