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 / task.yaml
Last active December 22, 2022 00:04
Task definition for ECS
{
"containerDefinitions": [
{
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/api",
"awslogs-create-group": "true",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "ecs"
@Oliver-ke
Oliver-ke / my_contracts.sol
Last active July 18, 2022 08:07
My solidity contracts snippets
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.5.1;
// enums
// contract Mycontract2 {
// // using enums in solidity
// enum State { Waiting, Activated, Pending }
// State public state;
@Oliver-ke
Oliver-ke / index.html
Created November 13, 2018 05:15
Pluralsight Login Clone
<div id="wrapper">
<div id="left">
<div id="signin">
<div class="logo">
<img src="https://image.ibb.co/hW1YHq/login-logo.png" alt="Sluralpright" />
</div>
<form>
<div>
<label>Email or username</label>
<input type="text" class="text-input" />
@Oliver-ke
Oliver-ke / docker-help.md
Last active July 14, 2022 19:32 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

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

@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

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 / 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

@Oliver-ke
Oliver-ke / sendmailGun.js
Created November 16, 2020 10:00
Util function to send mails from cloud function
const Mailgun = require('mailgun-js');
const DOMAIN = 'mail.myfortvest.com';
const API_KEY = process.env.MAIL_API_KEY || '';
const PUBLIC_KEY = process.env.MAIL_PUBLIC_KEY || '';
const mailgun = Mailgun({ apiKey: API_KEY, domain: DOMAIN, publicApiKey: PUBLIC_KEY });
const sendMail = async (payload) => {
const {variable, desc, ...rest} = payload;
const variableKey = Object.keys(payload.variable);