Skip to content

Instantly share code, notes, and snippets.

View talhameer's full-sized avatar
🎯
Focusing

Talha Meer talhameer

🎯
Focusing
View GitHub Profile
@talhameer
talhameer / ssh.md
Created August 28, 2021 19:23 — 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

@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active July 22, 2024 05:09
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

@andreasonny83
andreasonny83 / README.md
Created July 20, 2019 13:07
Run node app in background

Run node app in background

Running a script in the background in linux can be done using nohup, using nohup we can run node application in the background

$ nohup node server.js > /dev/null 2>&1 &
  • nohup means: Do not terminate this process even when the stty is cut off
  • > /dev/null means: stdout goes to /dev/null (which is a dummy device that does not record any output)
@bradtraversy
bradtraversy / ssh.md
Last active July 22, 2024 10:56
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

@gus3inov
gus3inov / node-sample.js
Created November 24, 2017 18:07 — forked from andrIvash/node-sample.js
get battery info with node.js
const http = require('http');
const PORT = Number(process.argv[2]) || 8080;
const child_process = require('child_process');
const Routes = {
BATTERY: /\/battery\/?/
};
const Status = {
NOT_FOUND: 404,