Skip to content

Instantly share code, notes, and snippets.

View bismarkstoney's full-sized avatar

Bismark Obeng bismarkstoney

  • China
View GitHub Profile
const moment = require('moment');
function getTimeStops(start, end, interval) {
var startTime = moment(start, 'HH:mm');
var endTime = moment(end, 'HH:mm');
if (endTime.isBefore(startTime)) {
endTime.add(1, 'day');
}
var timeStops = [];
@bismarkstoney
bismarkstoney / node_nginx_ssl.md
Created September 10, 2021 00:43 — 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

@bismarkstoney
bismarkstoney / django_deploy.md
Created March 21, 2020 15:53 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@bismarkstoney
bismarkstoney / webdev_online_resources.md
Created July 19, 2018 04:31 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)