Skip to content

Instantly share code, notes, and snippets.

View hillal20's full-sized avatar

Hilal Aissani hillal20

View GitHub Profile
@hillal20
hillal20 / node_nginx_ssl.md
Created August 4, 2020 03:22 — 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

@hillal20
hillal20 / node_nginx_ssl.md
Created August 4, 2020 03:22 — 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

@hillal20
hillal20 / LongestSubstringWithNoRepeatedCharacters.js
Last active July 28, 2020 03:48
LongestSubstringWithNoRepeatedCharacters
let string = "abcfggedkhlysd";
let splited = string.split('');
let str2 = "";
let str1 = "" ;
let str3 = "";
const obj = {};
class Node {
constructor(x,next){
this.value = x;
this.next = next;
}
}
class LinkedList {
et string = "abcfed";
let splited = string.split('');
let str2 = "";
let str1 = "" ;
let str3 = "";
const obj = {};
for(let i = 0; i < splited.length ; i++){
const arr = ["art","tra","filo","olif",'bilal', "labil", "hi", "ho"];
let el = [];
const newArr = [];
const obj ={}
let te
let result = [];
const fn = (arr)=>{
@hillal20
hillal20 / smuABSdiffINarray.js
Last active January 13, 2019 23:56
GleefulWorseArgument created by hillal20 - https://repl.it/@hillal20/GleefulWorseArgument
const arr = [6,2,4,10]
@hillal20
hillal20 / allAlgorithm2.js
Last active October 23, 2018 23:44
PeriodicLazyCoordinates created by hillal20 - https://repl.it/@hillal20/PeriodicLazyCoordinates
const mergeSort = (arr) =>{
if(arr.length < 2 ) {
return arr
}
const middle = Math.floor(arr.length/2);
const right = arr.slice(0, middle);
const left = arr.slice(middle, arr.length)
return merge(mergeSort(left),mergeSort(right))
@hillal20
hillal20 / allAlgorithms.js
Last active October 22, 2018 22:28
PeriodicLazyCoordinates created by hillal20 - https://repl.it/@hillal20/PeriodicLazyCoordinates
const mergeSort = (arr) =>{
if(arr.length < 2 ) {
return arr
}
const middle = Math.floor(arr.length/2);
const right = arr.slice(0, middle);
const left = arr.slice(middle, arr.length)
return merge(mergeSort(left),mergeSort(right))
@hillal20
hillal20 / quickSort.js
Created October 3, 2018 18:40
PeriodicLazyCoordinates created by hillal20 - https://repl.it/@hillal20/PeriodicLazyCoordinates
let arr = [100,1,50,2,3,4,7,2,10,5,2,1,20,13]
function quickSort(arr){
if(arr.length <= 1 ){
return arr
}
let pivote = arr[arr.length - 1];
let right = [];