Skip to content

Instantly share code, notes, and snippets.

@vulcangz
vulcangz / 0: Magento 1.12 Enterprise multi-store cluster configuration.md
Created September 19, 2020 01:24 — forked from parhamr/0: Magento 1.12 Enterprise multi-store cluster configuration.md
A highly available, fault tolerant, distributed, and load balanced LEMP cluster.
@vulcangz
vulcangz / mysql.service-systemd
Created September 18, 2020 13:44 — forked from kaka19ace/mysql.service-systemd
mysql service systemd script sample - For CentOS 7
#
# Simple MySQL systemd service file
#
# systemd supports lots of fancy features, look here (and linked docs) for a full list:
# http://www.freedesktop.org/software/systemd/man/systemd.exec.html
#
# Note: this file ( /usr/lib/systemd/system/mysql.service )
# will be overwritten on package upgrade, please copy the file to
#
# /etc/systemd/system/mysql.service
@vulcangz
vulcangz / node_nginx_ssl.md
Created September 5, 2020 09:48 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@vulcangz
vulcangz / index.html
Created June 15, 2020 04:21
The Last Experience
<canvas></canvas>
<!--
,--. ,--.
((O ))--((O ))
,'_`--'____`--'_`.
_: ____________ :_
| | ||::::::::::|| | |
| | ||::::::::::|| | |
| | ||::::::::::|| | |
|_| |/__________\| |_|
@vulcangz
vulcangz / index.html
Created March 14, 2020 15:09
MDN CSS reference list
<nav role='navigation' id="nav">
<ul>
</ul>
<div class="colors">
<!--<code class="value">&lt;value></code>
<code class="selector">:selector</code>
<code class="at">@at rule</code>-->
<input type="checkbox" id="hide" checked />
<label for="hide">hide description</label>
@vulcangz
vulcangz / .babelrc
Created October 10, 2019 04:02 — forked from c9s/.babelrc
webpack + babel + typescript + es6 - total solutions!
{
"presets": ["es2015"],
"plugins": ["transform-runtime"]
}
@vulcangz
vulcangz / Makefile
Created October 4, 2019 07:38 — forked from sighingnow/Makefile
Detect operating system in Makefile.
# Detect operating system in Makefile.
# Author: He Tao
# Date: 2015-05-30
OSFLAG :=
ifeq ($(OS),Windows_NT)
OSFLAG += -D WIN32
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
OSFLAG += -D AMD64
endif
@vulcangz
vulcangz / BMap.html
Created October 2, 2019 13:04 — forked from mcattx/BMap.html
百度地图 API 应用实例代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}
#mapBox {
width: 90%;
@vulcangz
vulcangz / main.go
Created July 15, 2019 09:47 — forked from alexedwards/main.go
RequireLogin middleware
var sessionManager = scs.NewCookieManager("...")
func RequireLogin(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
session := sessionManager.Load(r)
userID, err := session.GetInt("userID")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}