Skip to content

Instantly share code, notes, and snippets.

View josephakayesi's full-sized avatar
🎯
Focusing!

Joseph Akayesi josephakayesi

🎯
Focusing!
View GitHub Profile
Prefix Description Notes
ac_ Platform Client ID Identifier for an auth code/client id.
acct_ Account ID Identifier for an Account object.
aliacc_ Alipay Account ID Identifier for an Alipay account.
ba_ Bank Account ID Identifier for a Bank Account object.
btok_ Bank Token ID Identifier for a Bank Token object.
card_ Card ID Identifier for a Card object.
cbtxn_ Customer Balance Transaction ID Identifier for a Customer Balance Transaction object.
ch_ Charge ID Identifier for a Charge object.
cn_ Credit Note ID Identifier for a Credit Note object.
class Solution:
def mostOccurring(self, s: str) -> str:
if len(s) == 0:
return ''
character_map = {}
for character in s:
character_map[character] = character_map.get(character, 0) + 1
#!/bin/bash
# Specify the desired volume size in GiB as a command line argument. If not specified, default to 20 GiB.
SIZE=20
# Get the ID of the environment host Amazon EC2 instance.
INSTANCEID=$(curl http://169.254.169.254/latest/meta-data/instance-id)
REGION=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/\(.*\)[a-z]/\1/')
# Get the ID of the Amazon EBS volume associated with the instance.
@josephakayesi
josephakayesi / keybase.md
Created October 4, 2021 18:52
keybase ownership gists

Keybase proof

I hereby claim:

  • I am josephakayesi on github.
  • I am josephakayesi (https://keybase.io/josephakayesi) on keybase.
  • I have a public key ASDI_BNVRqA6V9t3hzLqXlrCfRrC2KNbv1JIBhd7Rw00eAo

To claim this, I am signing this object:

@josephakayesi
josephakayesi / node_nginx_ssl.md
Created May 31, 2021 11: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 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

@josephakayesi
josephakayesi / docker-help.md
Created May 28, 2021 13:29 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
@josephakayesi
josephakayesi / server.js
Last active May 26, 2019 17:30
Redis implementation
const app = require('express')()
const axios = require('axios')
const redis = require('redis')
// Create and connect redis client to local instance.
const client = redis.createClient(6379)
// Log redis when connected
client.on('ready', () => {
console.log('Redis cache connected on port 6379')
@josephakayesi
josephakayesi / server.js
Created May 26, 2019 16:57
Index route to test our API layer
const app = require('express')()
const port = 5000
// Index route
app.get('/', (req, res) => {
res.send({msg: 'Index page reached'})
})
// Start express server on port 5000
app.listen(port, () => {