Skip to content

Instantly share code, notes, and snippets.

View lucduong's full-sized avatar
🎯
Focusing

Luc lucduong

🎯
Focusing
View GitHub Profile

X-Code

xcode-select --install

iTerm2 + zsh

Download iTerm2

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Brew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

/*
* Copyright (C) 2016 DOU Networks Co., Ltd - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by luc <luc@ltv.vn>, September 17, 2016
*/
package vn.ltv.demo.poi;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.*;
@lucduong
lucduong / List_2010_2016.md
Last active October 19, 2016 04:14
Danh sách những người đóng tiền cho ngày 20/10/2016
  • Hoàng Phạm
  • Hậu Trần
  • Huy Mai
  • Phương Nguyễn
  • Mạnh Nguyễn
  • Hiếu Hoàng
  • Thành Nhâm
  • Hạnh Lê
  • Tiến Dương
  • Vinh Võ
@lucduong
lucduong / AmazonLinux.md
Created December 2, 2016 03:06
A guide for Amazon Linux

Connecting to Your Linux Instance Using SSH

NYKFuel Stagin

Instance ID

i-985b1aa0

Locate the private key

/Users/luc/.ssh/nykfuel-luc.pem

To install the AWS CLI using the bundled installer

FUEL STAGING

Instance ID: i-9ba4e4a3

Public DNS

ec2-54-222-135-157.cn-north-1.compute.amazonaws.com.cn

Public IP

54.222.135.157

ssh -i "~/.ssh/fuel-staging.pem" ec2-user@54.222.135.157

upstream unicorn_nykfuel-staging {
server unix:/tmp/unicorn.nykfuel-staging.sock
fail_timeout=0;
}
server {
listen 8081;
root /var/www/nykfuel-staging/current/public;
access_log /var/log/nginx/nykfuel-staging_access.log;
error_log /var/log/nginx/nykfuel-staging_error.log;

Create Instance

Create on Amazon EC2

Connect to AMI

ssh -i "nykfuel-luc.pem" ec2-user@ec2-54-222-135-36.cn-north-1.compute.amazonaws.com.cn

Install development tools

yum groupinstall "Development Tools"

yum install git pcre pcre-devel

@lucduong
lucduong / 01-nginx-macOS.md
Last active December 16, 2016 10:21 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@lucduong
lucduong / jwtRS256.sh
Created February 5, 2017 04:30 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@lucduong
lucduong / nodejs_dou.md
Created February 17, 2017 06:27
Chương trình học NodeJS

Section 1: Introducton and Setup

  • Web Mind Set
  • Introduction and the Goal of this Course
  • How to play together
  • npm, yarn, git & some Command Line References
  • Install NodeJS

Section 2: Playground

  • Introduce about javascript ES6
  • Anonymous function