Skip to content

Instantly share code, notes, and snippets.

Docker commands

# build docker image with tag
$ docker build -t USERNAME/REPO .

# docker run
$ docker run -it container_id || image_name

# list all container
// solution 1
function fibonacci(n){
if(n < 2){
return n;
}
// temporary variables
let prev = 0;
let curr = 1;
let arr = [0, 1];
@Holajuwon
Holajuwon / 01_shuffle.py
Last active May 16, 2021 21:20
A simple shuffling algorithm, shuffle from start to end and vice versa
def shuffle(student_list: list, order: int):
"""A function for shuffling an iterable using a specific order and size
Args:
student_list (iter): an iterable data type
order (int): the order and size for shuffling
Returns:
iter: shuffled obect according to order
"""
@Holajuwon
Holajuwon / WJTask3.js
Created July 29, 2020 02:02
A simple repl server that converts command to Upper and Lower case
const repl = require("repl");
const caseSwitcher = (str) => {
if (str === str.toLowerCase()) {
return str.toUpperCase();
} else {
return str.toLowerCase();
}
};
@Holajuwon
Holajuwon / WJTask1.js
Last active July 29, 2020 01:59
Vanilla nodejs POST and GET request
const http = require("http");
const { parse } = require("querystring");
const PORT = process.env.PORT || 5000;
const server = http.createServer((req, res) => {
try {
if (req.method === "POST") {
dataHandler(req, (data) => {
res.end(`Hello ${data.name}, Welcome to the WeJapa Internship"`);
});

SOLUTIONS

SOLUTION 1

const color = ["Blue", "Green", "Red", "Violet", "Indigo", "Yellow"];
const o = ["th", "st", "nd", "rd"];

color.map((item, index) => {
  if (index <= 2) {
@Holajuwon
Holajuwon / resume.md
Last active December 27, 2019 02:07
My Resume.

Olajuwon Owoseni


Olajuwon has an experience in the domain of Software/IT, particularly in React JS for web and React Native for mobile. and is currently working as Internship Trainee at LearnFactory since 0.6 Years.