Skip to content

Instantly share code, notes, and snippets.

View Luvgreed's full-sized avatar

ジン Luvgreed

  • Hong Kong
View GitHub Profile
# Install Go on Ubuntu
VERSION="1.13.1"
OS="linux"
ARCH="amd64"
echo "downloading go ..."
curl -O https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz
echo "unzip go to /usr/local ..."
tar -C /usr/local -xvzf go$VERSION.$OS-$ARCH.tar.gz
echo "rm $go$VERSION.$OS-$ARCH.tar.gz ..."
rm -rf go$VERSION.$OS-$ARCH.tar.gz
@Luvgreed
Luvgreed / MySQL
Last active January 25, 2019 02:19
UPDATE `<DB>`.`<Table>` SET `<col>`='<value>' WHERE `<col>`='<value>';
Emoji
1) DB : SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;
2) Client : {charset : "utf8mb4"}
Pre-requisite :
1) install aws-s3 cli
2) create the project version folder in S3 Bucket (s3-versioncontrol):
AWS/S3/s3-versioncontrol/{projectID}/{version}
Step by step :
Step 1
From local to S3 version control bucket
aws s3 cp . s3://s3-versioncontrol/{projectID}/{version} --recursive
@Luvgreed
Luvgreed / Linux
Last active September 12, 2018 09:26
Lunix
# get PID
lsof -i :3000
# check status
ps ax | grep <PID>
# kill
kill -9 <PID>
@Luvgreed
Luvgreed / Since ES6
Last active September 4, 2018 20:20
Javascripts
// ES6 is a major update to JavaScript that includes dozens of new features. With a focus on simplicity and readability
https://es6.io/
http://es6-features.org/#Constants
@Luvgreed
Luvgreed / EC2-Port-80
Last active August 28, 2018 06:48
Nodesource
https://nodejs.org/en/
https://github.com/creationix/nvm
https://github.com/nodesource/distributions
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
@Luvgreed
Luvgreed / Progressive Web App.md
Last active April 24, 2018 09:18
add to home screen banner on Android

Web App Install Banners

enable "add to home screen prompt" with minimal code for Android Device

last update : April 2018

Remark

  • iOS currently dun support the A2HS and service worker, can provide tutorial animation using css
  • sw.js requires at least one fetch function
  • only support Chrome ver >= 39
@Luvgreed
Luvgreed / Certificate Manager
Last active October 24, 2018 10:55
AWS Services Note
# Support Email and DNS validation
# Custom SSL currently only provide regional support, includes :
- N. Virginia ( tested )
docker login registry.gitlab.com
docker run -p 80:3000 registry.gitlab.com/<path>/<image>:<tag>
e.g. registry.gitlab.com/liquidsky/hello-nodejs:v1.0