Skip to content

Instantly share code, notes, and snippets.

Removing Nodejs Ubuntu
https://stackoverflow.com/questions/32426601/completly-uninstall-nodejs-npm-and-node-in-ubuntu-14-04?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
@pathtolearn
pathtolearn / commands
Created April 12, 2018 17:53
Digital Ocean Files Permission Commands
https://www.digitalocean.com/community/questions/why-doesn-t-chown-r-root-www-data-work-on-my-wordpress-installation
@pathtolearn
pathtolearn / Css3 Cheatsheet
Created April 11, 2018 06:09
CSS3 Mega Cheat Sheet
https://makeawebsitehub.com/css3-mega-cheat-sheet/
@pathtolearn
pathtolearn / Docker SSL
Created March 30, 2018 09:22
Docker Add SSL Certificate to Container
docker run -v /host/path/to/certs:/container/path/to/certs -d IMAGE_ID "update-ca-certificates"
@pathtolearn
pathtolearn / Node
Created March 26, 2018 12:11
Deploying Nodejs
Refere to this link: https://eladnava.com/deploying-resilient-node-js-apps-with-forever-and-nginx/
@pathtolearn
pathtolearn / Forever Node JS
Created March 26, 2018 12:11
Forever Node JS Commands
For Logging to Files and Error Logs : forever start -o out.log -e err.log my-script.js
@pathtolearn
pathtolearn / Read Large Files
Created March 26, 2018 08:46
Read Large Files in Nodejs Line By Line
var fs = require('fs')
, es = require('event-stream');
var lineNr = 0;
var s = fs.createReadStream('very-large-file.csv')
.pipe(es.split())
.pipe(es.mapSync(function(line){
// pause the readstream
@pathtolearn
pathtolearn / Shell Script
Created March 26, 2018 03:56
Run Shell Script as a Service
Refer to the below link:
https://unix.stackexchange.com/questions/236084/how-do-i-create-a-service-for-a-shell-script-so-i-can-start-and-stop-it-like-a-d
@pathtolearn
pathtolearn / Run Nodejs Server
Created March 24, 2018 15:08
Running Nodejs Server Forever
Refer to this link : https://www.youtube.com/watch?v=P4mT5Tbx_KE
@pathtolearn
pathtolearn / Menu
Created March 24, 2018 10:08
Cascading Dropdown Menu in Bootstrap 4
<html-start>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo01">
<a class="navbar-brand" href="#">Hidden brand</a>
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active">