Skip to content

Instantly share code, notes, and snippets.

View JimzyLui's full-sized avatar

Jimzy JimzyLui

  • Ma'ili, Hawaii
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jimzylui on github.
  • I am jimzy (https://keybase.io/jimzy) on keybase.
  • I have a public key ASAgHUpuKWBRlA418dj8_TgjwqYTiZ2EbyOY8Au7nXZs_Ao

To claim this, I am signing this object:

@JimzyLui
JimzyLui / clean_code.md
Created August 7, 2019 07:08 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@JimzyLui
JimzyLui / ultimate-ut-cheat-sheet.md
Created February 16, 2019 01:42 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


### Include the module:
`const fs = require('fs');`
### Read File
`fs.readFile({fileName}, function(err, data){
}`
### Create File (will append to file if already exists, else create)
```fs.appendFile({newFileName}, <strSomeContent>, function(err){
@JimzyLui
JimzyLui / AWS EC2 Deployment.md
Last active February 15, 2019 05:49 — forked from lorecrafting/AWS Deployment.md
Nginx Certbot Reverse Proxy Docker-Compose deployment

Create an instance of an EC2 Server

  • Go the AWS, then Services, then EC2.
  • Click Launch Instance
  • Choose an Amazon Machine Image (AMI):
    • Select Ubuntu
  • Choose an Instance Type:
    • (Take the default General Purpose t2.micro that is free tier eligible)
    • Click Review and Launch

Connect to the new instance

@JimzyLui
JimzyLui / s3deploy.md
Last active February 7, 2019 03:52 — forked from lorecrafting/s3deploy.md
S3 Deploy Notes

Deploying to AWS S3

Prequisites: AWS Account

In AWS Console:

  1. Go to IAM Service and create new group, name it S3FullAccessGroup, attach the AmazonS3FullAccess policy to it.
  2. In IAM Service, add new user. Name it something like yourName_macbookpro_cli. Make sure only programmatic access is checked off. Add the user to the S3FullAccessGroup.
  3. When done with wizard, it will give you your secret access key only ONCE. Don't leave this page yet.

In Local Development Terminal:

  1. OSX: brew install awscli
    Linux: sudo apt update sudo apt install awscli