Skip to content

Instantly share code, notes, and snippets.

View akinyeleolat's full-sized avatar

Akinyele Oluwatosin Akintayo akinyeleolat

View GitHub Profile
@akinyeleolat
akinyeleolat / node_redis_cache.js
Created December 20, 2020 20:21 — forked from bradtraversy/node_redis_cache.js
Node.js & Redis Caching
const express = require('express');
const fetch = require('node-fetch');
const redis = require('redis');
const PORT = process.env.PORT || 5000;
const REDIS_PORT = process.env.PORT || 6379;
const client = redis.createClient(REDIS_PORT);
const app = express();
@akinyeleolat
akinyeleolat / mongodb_cheat_sheet.md
Last active December 16, 2020 11:33 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@akinyeleolat
akinyeleolat / index.js
Last active September 3, 2019 16:10
Minimum swap
let array = [3,1,2]
let newArr = []
const minimumSwaps = (array) => {
let count=0;
const expectedArr = array.slice().sort((a,b)=>{
return a-b
})
console.log(expectedArr)
let loc;
@akinyeleolat
akinyeleolat / index.html
Created June 20, 2019 19:07
Workout Timer
<div id="showcase">
<div class="container">
<h1>Workout Timer</h1>
<div id="hours">00</div>
<small>hrs</small>
<div class="colon">:</div>
<div id="minutes">00</div>
<small>min</small>
<div class="colon">:</div>
@akinyeleolat
akinyeleolat / index.html
Created June 20, 2019 19:05
Non Repeat First Character
<div class="header">
<div class="container">
<div id="branding"><img src="https://media.glassdoor.com/sqll/882830/andela-squarelogo-1466611084554.png" width="50px" height="50px" align="left"><h1><span class="highlight"></span></h1></div>
</div>
</div>
<section id="showcase">
<div class="container">
<div class="welcometext">
<h1>Welcome</h1>
@akinyeleolat
akinyeleolat / index.html
Last active June 20, 2019 19:05
password validator
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1><span>Password</span> Strength</h1>
<div class="container">
<form id="myform" action="#">
@akinyeleolat
akinyeleolat / index.html
Created May 31, 2018 17:45
shopping expenses
<html ng-app="root">
<form id="shopping">
<div class="container" ng-controller="index">
<div class="box margin-right" id="shopping-list">
<h1>My Shopping List</h1>
<div id="errorMessage"><i class="icon-cross"></i>Please enter all inputs!</div>
<div id="successMessage"><i class="icon-checkmark"></i>Item added to shopping list!</div>
@akinyeleolat
akinyeleolat / index.html
Created May 30, 2018 01:14
Shopping List
<html ng-app="root">
<div class="container" ng-controller="index">
<div class="box margin-right" id="shopping-list">
<h1>My Shopping List</h1>
<div id="errorMessage"><i class="icon-cross"></i>Please enter all inputs!</div>
<div id="successMessage"><i class="icon-checkmark"></i>Item added to shopping list!</div>