Skip to content

Instantly share code, notes, and snippets.

View Ebugo's full-sized avatar
👋
Hi there, I'm looking for work.

Gospel Chinyereugo (Codebug) Ebugo

👋
Hi there, I'm looking for work.
View GitHub Profile
@Ebugo
Ebugo / postgres-brew.md
Created November 5, 2022 08:11 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@Ebugo
Ebugo / RPS Project
Last active January 19, 2022 14:22 — forked from SinachPat/RPS Project
const choices = ["rock", "paper", "scissors"];
function computerPlay(choices) {
let option = choices[Math.floor(Math.random() * choices.length)];
return option;
}
const possibleResults = {
rock_rock: { action: "tie", message: "It's a tie! rock holds rock" },
rock_paper: { action: "lose", message: "You lose! paper covers rock" },
@Ebugo
Ebugo / date.js
Last active July 24, 2023 10:21 — forked from micah1701/dateFormat.js
Replicate PHP's native date() formatting in JavaScript for many common format types
/**
* Return a formated string from a date Object mimicking PHP's date() functionality
*
* @param {string} format "Y-m-d H:i:s" or similar PHP-style date format string
* @param {* | null} date Date Object, Datestring, or milliseconds
*
*/
function date(format, date) {
if (!date || date === "") {
date = new Date();
@Ebugo
Ebugo / README.md
Created October 14, 2021 15:48
MerryKurta App

MerryKurta

@Ebugo
Ebugo / node_nginx_ssl.md
Created May 5, 2021 07:11 — 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

@Ebugo
Ebugo / README.md
Created September 11, 2020 11:30 — forked from greyscaled/README.md
Sequelize + Express + Migrations + Seed Starter
@Ebugo
Ebugo / passpostJS-FacebookStrategy.js
Created February 20, 2020 12:52 — forked from emmaodia/passpostJS-FacebookStrategy.js
Gist for the article where we take a look at PassportJS and how easy it is to use the it's Facebook Strategy to authenticate Users for your app.
const passport = require('passport');
const Strategy = require('passport-facebook').Strategy;
require('dotenv').config();
// Configure Passport authenticated session persistence.
passport.serializeUser(function(user, cb) {
cb(null, user);
});
passport.deserializeUser(function(obj, cb) {
@Ebugo
Ebugo / mysql_cheat_sheet.md
Created November 30, 2019 20:24 — forked from bradtraversy/mysql_cheat_sheet.md
MySQL Cheat Sheet

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

@Ebugo
Ebugo / gist:6ae343ae8410ddc40bb71b2e7701e15e
Created November 14, 2019 15:38 — forked from segebee/gist:7dde9de8e70a207e6e19
Nigeria States and Local Government Areas JSON - codingsavvy.com
[{"state":{"name":"Abia State","id":1,"locals":[{"name":"Aba South","id":1},{"name":"Arochukwu","id":2},{"name":"Bende","id":3},{"name":"Ikwuano","id":4},{"name":"Isiala Ngwa North","id":5},{"name":"Isiala Ngwa South","id":6},{"name":"Isuikwuato","id":7},{"name":"Obi Ngwa","id":8},{"name":"Ohafia","id":9},{"name":"Osisioma","id":10},{"name":"Ugwunagbo","id":11},{"name":"Ukwa East","id":12},{"name":"Ukwa West","id":13},{"name":"Umuahia North","id":14},{"name":"Umuahia South","id":15},{"name":"Umu Nneochi","id":16}]}},{"state":{"name":"Adamawa State","id":2,"locals":[{"name":"Fufure","id":1},{"name":"Ganye","id":2},{"name":"Gayuk","id":3},{"name":"Gombi","id":4},{"name":"Grie","id":5},{"name":"Hong","id":6},{"name":"Jada","id":7},{"name":"Lamurde","id":8},{"name":"Madagali","id":9},{"name":"Maiha","id":10},{"name":"Mayo Belwa","id":11},{"name":"Michika","id":12},{"name":"Mubi North","id":13},{"name":"Mubi South","id":14},{"name":"Numan","id":15},{"name":"Shelleng","id":16},{"name":"Song","id":17},{"name":"Toung
@Ebugo
Ebugo / frontendDevlopmentBookmarks.md
Created November 12, 2019 04:51 — forked from olucheye/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.