Skip to content

Instantly share code, notes, and snippets.

@hootan09
hootan09 / mern-server-setup.md
Created June 20, 2022 13:48 — forked from bradtraversy/mern-server-setup.md
Setup Ubuntu & Deploy MERN app

Linux Server Setup & MERN App Deployment

These are the steps to setup an Ubuntu server from scratch and deploy a MERN app with the PM2 process manager and Nginx. We are using Linode, but you could just as well use a different cloud provider or your own machine or VM.

Create an account at Linode

Click on Create Linode

Choose your server options (OS, region, etc)

SSH Keys

@hootan09
hootan09 / Python-sample.md
Last active May 2, 2024 18:51
Python Basic Command

Python Basic to Advanced Commands & Code

[Import other python files]

You want to import file A.py in file B.py, these two files are in the same folder, like this:

. 
├── A.py 
└── B.py

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@hootan09
hootan09 / vscode_shortcuts.md
Created September 25, 2019 06:40 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

  • For mac, replace "Ctrl" with "cmd" and "Alt" with "option"

Official List of all commands

@hootan09
hootan09 / docker-help.md
Created September 25, 2019 06:39 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@hootan09
hootan09 / mysql_cheat_sheet.md
Created September 25, 2019 06:39 — forked from bradtraversy/mysql_cheat_sheet.md
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@hootan09
hootan09 / mongodb_cheat_sheet.md
Created September 25, 2019 06:38 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@hootan09
hootan09 / node_nginx_ssl.md
Created September 25, 2019 06:30 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to Digital Ocean 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