Skip to content

Instantly share code, notes, and snippets.

View forinda's full-sized avatar
👨‍💻
Working from home

Felix Orinda forinda

👨‍💻
Working from home
View GitHub Profile
@forinda
forinda / node_nginx_ssl.md
Created May 3, 2023 11:13 — 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

@forinda
forinda / deploy_node_do.md
Created April 17, 2023 16:14 — forked from carlssonk/deploy_node_do.md
Deploy node.js app to DigitalOcean

Deploy Node.js Application to DigitalOcean

This step by step tutorial will show you how to set up a Node.js server with MongoDB to DigitalOcean using PM2, NGINX as reverse proxy and a SSL from LetsEncrypt. We will also add a custom domain name.

Prerequisites

Create Droplet & Generate SSH Key

@forinda
forinda / Linux proxy setup.md
Created November 2, 2022 09:41
A gist describing how to setup proxy on Ubuntu,Kali,Zorin and any other debian distribution. Both system ased and user level proxy including session based

Ubuntu/Kali/Zorin setup with proxy environment

Once you've installed your os of debian distribution you need to take not of the following.

If you are operating in a proxy environment, there are two layers of proxy, i.e root, session and user level proxy For user level we can add proxy in the /etc/environment file where it can be read by some applications or use the network GUI

Ubuntu: Settings > Network > Network Proxy > Manual path

This applies for kde plasma and gnome desktop environment

@forinda
forinda / sources.list
Created June 20, 2022 14:58 — forked from ishad0w/sources.list
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@forinda
forinda / Data-structure-and-algorithm.js
Created March 12, 2022 07:37 — forked from lornawanjiru/Data-structure-and-algorithm.js
Data structure and algorithm notes. I have tackled a number of questions and realized i would forget some algorithms since I don't repeat the questions as much. I made this gist to help me go through the question intensively.
##Longest Substring with At Most K Distinct Characters
var lengthOfLongestSubstringKDistinct = function(s, k) {
//incase the length of the string is the same or less than the distict number then return the length of the string.
if(k >= s.length ){
return s.length;
}
//define an empty hash map variable.
let hmap = {}
let max = 0;
//iterating through the string.
@forinda
forinda / Data-structure-and-algorithm.js
Created March 12, 2022 07:37 — forked from lornawanjiru/Data-structure-and-algorithm.js
Data structure and algorithm notes. I have tackled a number of questions and realized i would forget some algorithms since I don't repeat the questions as much. I made this gist to help me go through the question intensively.
##Longest Substring with At Most K Distinct Characters
var lengthOfLongestSubstringKDistinct = function(s, k) {
//incase the length of the string is the same or less than the distict number then return the length of the string.
if(k >= s.length ){
return s.length;
}
//define an empty hash map variable.
let hmap = {}
let max = 0;
//iterating through the string.