Skip to content

Instantly share code, notes, and snippets.

@huyxdong
huyxdong / tmux-cheatsheet.markdown
Created December 21, 2021 02:01 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
Learn Docker and Kubenetes
1. Docker image: a template for creating an emvironment. An image contains: OS, software, App Code.
2. Docker container: is a running instance of an image
3. Docker hub is a registry : a place where we use to download images
Practicing with docker
PULL , RUN, SHOW
1. docker pull nginx Pull the latest tag of nginx image
2. docker run nginx:latest Run image nginx with latest tag to CONTAINER (terminal hanging)
@huyxdong
huyxdong / MongoDB-cheatsheet.md
Last active May 24, 2023 14:26
MongoDB cheat sheet

MongoDB Cheat Sheet

How to install mongodb shell

https://www.mongodb.com/docs/mongodb-shell/install/

Create a database and user for the database

mongosh  # go inside mongodb shell 
@huyxdong
huyxdong / Art of command line.md
Last active March 22, 2022 04:02
Bash Command Line

The Art of Command Line

Note: I'm planning to revise this and looking for a new co-author to help with expanding this into a more comprehensive guide. While it's very popular, it could be broader and a bit deeper. If you like to write and are close to being an expert on this material and willing to consider helping, please drop me a note at josh (0x40) holloway.com. –jlevy, Holloway. Thank you!

@huyxdong
huyxdong / mern-server-setup.md
Created June 21, 2022 02:19 — 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

@huyxdong
huyxdong / tailwind-webpack-setup.md
Created August 2, 2022 06:02 — forked from bradtraversy/tailwind-webpack-setup.md
Setup Webpack with Tailwind CSS

Webpack & Tailwind CSS Setup

Create your package.json

npm init -y

Create your src folder

Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.

@huyxdong
huyxdong / node_nginx_ssl.md
Created August 2, 2022 06:06 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

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

@huyxdong
huyxdong / webdev_online_resources.md
Created August 2, 2022 06:08 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@huyxdong
huyxdong / ssh.md
Created August 2, 2022 06:08 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

Firebase Setup For House Marketplace

  1. Create Firebase Project
  2. Create "web" app within firebase to get config values"
  3. Install firebase in your project "npm i firebase
  4. Create a config file in your project
  5. Add authentication for email/password and Google
  6. Create a user from Firebase
  7. Enable Firestore
  8. Add rules for firestore