Skip to content

Instantly share code, notes, and snippets.

@mrtrihuynh
mrtrihuynh / scrapy.md
Created July 27, 2021 02:44 — forked from bradtraversy/scrapy.md
Scrapy commands and code
@mrtrihuynh
mrtrihuynh / flutter_setup.md
Created July 27, 2021 02:45 — forked from bradtraversy/flutter_setup.md
Flutter dev setup & notes
@mrtrihuynh
mrtrihuynh / stack.js
Created July 27, 2021 02:46 — forked from bradtraversy/stack.js
Stack data structure
class Stack {
constructor() {
this.items = []
this.count = 0
}
// Add element to top of stack
push(element) {
this.items[this.count] = element
console.log(`${element} added to ${this.count}`)
@mrtrihuynh
mrtrihuynh / node_nginx_ssl.md
Created July 27, 2021 02:46 — 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

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@mrtrihuynh
mrtrihuynh / rethinkdb_cheat_sheet.MD
Created July 27, 2021 02:48 — forked from bradtraversy/rethinkdb_cheat_sheet.MD
RethinkDB Query Cheat Sheet

RethinkDB Cheat Sheet

Create database

r.dbCreate('mydb')

List databases

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

@mrtrihuynh
mrtrihuynh / vsc_js_snippets.json
Created July 27, 2021 02:49 — forked from bradtraversy/vsc_js_snippets.json
VSCode JavaScript Snippets
{
"Console Log": {
"prefix": "cl",
"body": "console.log($1);",
"description": "Console Log"
},
"Named Function": {
"prefix": "nfn",
"body": ["function ${1:functionName}($2) {", " $3", "}"],
"description": "Named Function"
@mrtrihuynh
mrtrihuynh / vscode_shortcuts.md
Created July 27, 2021 02:49 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@mrtrihuynh
mrtrihuynh / docker_wordpress.md
Created July 27, 2021 02:49 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes