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 / countries.json
Created October 4, 2024 18:01
countries, states and currencies
[{"name":"Andorra","countryCode":"AD","countryCodeAlpha3":"AND","phone":"376","currency":"EUR","flag":"","symbol":"€","stateProvinces":[{"name":"Sant Julià de Loria"},{"name":"Ordino"},{"name":"La Massana"},{"name":"Encamp"},{"name":"Canillo"},{"name":"Andorra la Vella"},{"name":"Escaldes-Engordany"}]},{"name":"United Arab Emirates","countryCode":"AE","countryCodeAlpha3":"ARE","phone":"971","currency":"AED","flag":"","symbol":"DH","stateProvinces":[{"name":"Imārat Umm al Qaywayn"},{"name":"Raʼs al Khaymah"},{"name":"Dubai"},{"name":"Sharjah"},{"name":"Fujairah"},{"name":"Ajman"},{"name":"Abu Dhabi"}]},{"name":"Afghanistan","countryCode":"AF","countryCodeAlpha3":"AFG","phone":"93","currency":"AFN","flag":"","symbol":"؋","stateProvinces":[{"name":"Zabul"},{"name":"Maidan Wardak Province"},{"name":"Takhar"},{"name":"Sar-e Pol Province"},{"name":"Samangan"},{"name":"Parwan"},{"name":"Paktika"},{"name":"Paktia"},{"name":"Oruzgan"},{"name":"Nimroz"},{"name":"Nangarhar"},{"name":"Logar"},{"name":"Laghman"},{"name":"
@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 / 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

@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active November 17, 2024 17:23
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

@micah1701
micah1701 / dateFormat.js
Last active September 16, 2024 13:24
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
*
* format string "Y-m-d H:i:s" or similar PHP-style date format string
* date mixed Date Object, Datestring, or milliseconds
*
*/
function dateFormat(format,date){
if(!date || date === "")