Skip to content

Instantly share code, notes, and snippets.

View Oliver-ke's full-sized avatar
💭
-code -eat -sleep -repeat

Azorji Kelechi Oliver Oliver-ke

💭
-code -eat -sleep -repeat
View GitHub Profile
@Oliver-ke
Oliver-ke / node_nginx_ssl.md
Created September 23, 2019 16:14 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to Digital Ocean 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

version: "3"
services:
app:
restart: always
build: .
container_name: wolfsbane-backend
links:
- postgres
environment:
DEV_DATABASE_URL: postgres://devuser:1234@postgres:5432/dev_db
@Oliver-ke
Oliver-ke / EditorSettings.json
Created August 18, 2019 01:36
Vscode editor settings
{
"window.zoomLevel": 1,
"liveServer.settings.donotShowInfoMsg": true,
"workbench.iconTheme": "material-icon-theme",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": true,
"editor.wordWrap": "bounded",
"editor.trimAutoWhitespace": true,
"editor.fontFamily": "Fira Code",
@Oliver-ke
Oliver-ke / collaboration.md
Last active July 14, 2022 19:31
This gist containes common conventions such as PR naming, Commit messages, PR description that should be followed for a teams project

Branch Naming

Branches being created should have the following format:

<story type>/<story id>/<3-4 word story description>

#Example

chore/111504508/save-the-world

const { assert } = require('chai');
const computeResult = require('../challange/computeResult');
describe('return sum', () => {
it('Must be a function', () => {
assert.isFunction(computeResult, 'must be a function');
});
it('Return the result', () => {
const answers = [ 'a', 'b', 'a', 'c' ];
const studentAns = [ 'a', 'c', 'd', 'c' ];
module.exports = (answers, studentAns) => {
if (answers.length !== studentAns.length) {
return 'Arrays must be of the same length';
}
let sum = 0;
for (let i = 0; i < answers.length; i++) {
if (answers[i] === studentAns[i]) {
sum += 4;
} else if (studentAns[i] !== ' ') {
sum -= 1;
@Oliver-ke
Oliver-ke / README-Template.md
Created May 27, 2019 08:03 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
@Oliver-ke
Oliver-ke / webdev_online_resources.md
Created February 12, 2019 14:11 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)