Skip to content

Instantly share code, notes, and snippets.

View ssanusi's full-sized avatar

Sulaiman Sanusi ssanusi

  • Andela
  • Lagos Nigeria
View GitHub Profile
@ssanusi
ssanusi / unformatted.js
Created September 12, 2017 02:24
unformatted created by ssanusi - https://repl.it/Kxk5/0
function unformatted() {
function innerFunction(count) {
while(count > 0) {
count--;
if(count===2) {
console.log("count is two!");
}
}
console.log("are we still in the inner func?");
# source: https://www.hackerrank.com/challenges/gridland-metro
# video: https://youtu.be/H1Qbd652Oig
def gridlandMetro(n, m, k, tracks): # ALTERED NAME TO PLURAL
# tracks = [
# [row, col_start, col_end],
# ...
# ]
# sort by col start
tracks.sort(key = lambda track: min(track[1], track[2])) # O(nlogn)
@ssanusi
ssanusi / install-docker.md
Created November 19, 2022 17:05 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start