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 / 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 / webpack.config.dev.js
Created September 25, 2018 03:14
Webpack configuration for development environment extracts from react-scripts
const autoprefixer = require("autoprefixer"),
path = require("path"),
webpack = require("webpack"),
HtmlWebpackPlugin = require("html-webpack-plugin"),
CaseSensitivePathsPlugin = require("case-sensitive-paths-webpack-plugin"),
InterpolateHtmlPlugin = require("react-dev-utils/InterpolateHtmlPlugin"),
WatchMissingNodeModulesPlugin = require("react-dev-utils/WatchMissingNodeModulesPlugin"),
ModuleScopePlugin = require("react-dev-utils/ModuleScopePlugin"),
getCSSModuleLocalIdent = require("react-dev-utils/getCSSModuleLocalIdent"),
getClientEnvironment = require("./env"),
@baorv
baorv / webpack.config.prod.js
Created September 25, 2018 03:21
Webpack configuration for production extracts from react-scripts
const autoprefixer = require("autoprefixer"),
path = require("path"),
webpack = require("webpack"),
HtmlWebpackPlugin = require("html-webpack-plugin"),
InlineChunkHtmlPlugin = require("react-dev-utils-for-webpack4/InlineChunkHtmlPlugin"),
TerserPlugin = require("terser-webpack-plugin"),
MiniCssExtractPlugin = require("mini-css-extract-plugin"),
OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"),
safePostCssParser = require("postcss-safe-parser"),
ManifestPlugin = require("webpack-manifest-plugin"),
@baorv
baorv / send_mailchimp.md
Last active October 8, 2018 10:24
[SPIN_TO_WIN] How to send a coupon code for a subscriber to Mailchimp

How to send a coupon code for a subscriber to Mailchimp

Before setup it, you should read this tutorial https://mailchimp.com/en/help/set-default-merge-values-for-a-list/

All that you need to do is creating 3 merged fields:

  • LNAME: Last name of your subscriber
  • FNAME: Their first name
  • COUPON: Coupon code that they got after playing.
@baorv
baorv / auto_coupon.md
Created October 8, 2018 10:33
[SPIN_TO_WIN] How to import automatically subscribers with coupon codes
@baorv
baorv / automate_mailchimp.md
Last active October 12, 2018 04:45
[SPIN_TO_WIN] Automate Mailchimp

How to automate emails from SPIN TO WIN subscribers with Mailchimp

Mailchimp setup

  • First of all, you need to create a new list from Mailchimp

step_1


step_1.1

@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 / 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 / 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 / golang_job_queue.md
Created December 27, 2018 06:36 — forked from harlow/golang_job_queue.md
Job queues in Golang