Skip to content

Instantly share code, notes, and snippets.

View JacobWay's full-sized avatar

Jacob Way JacobWay

View GitHub Profile
@JacobWay
JacobWay / photoshop-design-basics.md
Last active March 28, 2017 13:00
photoshop design basics

Photoshop design basics

Create your first design

Get to know layers

Layers are the building blocks of any photoshop design.

Combine images using layer masks

Layer masks are the most flexible way to combine images.

@JacobWay
JacobWay / Deploy node.js app on Heroku.md
Created March 14, 2017 05:06
Deploy node.js application on Heroku

Instruction

Set up

Prepare the app

Deploy the app

Create a Heroku app with a name

  • heroku app your-app-name

Push your code to heroku repository

  • heroku push heroku master
@JacobWay
JacobWay / Express.js over HTTPS.md
Last active March 13, 2017 08:26
Express.js over HTTPS

Express.js over HTTPS

Express.js over HTTPS

Generate self signed certificate

  • openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365
  • openssl rsa -in key.pem -out newkey.pem && mv newkey.pem key.pem

Or using the commands below: from this link:

  • Create the private key: openssl genrsa -out key.pem 1024
  • Create the "Certificate Signing Request": openssl req -new -key key.pem -out csr.pem
@JacobWay
JacobWay / process manager pm2.md
Created March 13, 2017 05:02
process manager pm2

Process manager pm2

Basic use

  • pm2 start the_path_of_app.js
  • pm2 stop pm2_app_id
  • pm2 restart pm2_app_id
  • pm2 delete pm2_app_id
@JacobWay
JacobWay / Deploy node.js app.md
Last active March 13, 2017 04:58
deploy node.js application

Process manager

Programming language related process manager

  • pm2

os related process manager

  • linux systemd
@JacobWay
JacobWay / Strong Loop Process Manager.md
Created March 13, 2017 03:22
Strong Loop Process Manager

StrongLoop Process Manager

StrongLoop PM is a production process manager for Node.js application with built-in load balancing,
monitoring, multi-host deployment, and a graphical console

Commands

  • To confirm it is started: slc ctl status smileyouexpress
  • To view the last logs: slc ctl log-dump smileyouexpress
  • To see more options: slc ctl -h
  • To see metrics, the profilers and other diagnostic features run: slc arc
@JacobWay
JacobWay / Software programming glossary.md
Last active March 13, 2017 04:55
software programming glossary

Glossary

Signature

In computer science, a type signature or type annotation defines the inputs and outputs for a function, subroutine, or method.

Service

In window operating system, a window service is a computer program that operates in the background.
It is similar in concept to a Unix daemon.

Daemon

@JacobWay
JacobWay / hub.md
Created March 11, 2017 04:35
hub notes from github

hub is command line wrapper for git that makes you better at github.

create a github repo from command line

  • git create -d "This is your project discription"
  • git push origin master
@JacobWay
JacobWay / express.md
Last active March 12, 2017 08:33
node.js express.js notes

Guide

Routing

Routing resfers to the definition of application end points (URIs) and how they response to client requests.

Routing methods

  • express class -> routing methods -> http methods

Routing paths

  • route path based on strings
@JacobWay
JacobWay / Linux pratical knowledge base.md
Last active May 28, 2017 03:52
The notes about linux command

Linux commands

curl

Curl is a tool to transfer data from or to a server.
curl -X POST "name=you&code=0" http://localhost:9999

man

man section <name>
Sections are well defined:

  • 1 is for shell commands