Skip to content

Instantly share code, notes, and snippets.

View owans's full-sized avatar
🏠
Working from home

Owanate Amachree owans

🏠
Working from home
View GitHub Profile
@owans
owans / owansLogistics.md
Last active April 2, 2019 21:35
LevelUp Coding Challenge: Design a database for a Logistics Company

Identify Entities

a. Warehousing

b. Shipping

c. Inventory

d. Security

@owans
owans / HashTable.md
Last active April 8, 2019 18:53
Find duplicate nos in array using hash tables

//hash tables are used to iterate over an array using a key to compute the array index, instead of using the key as an array index

//for this function i is used as a key to loop through the array

const showDuplicateNo = (array) => { let hashTable = []; let duplicateNo = [];

for (let i = 0; i < array.length; i++) {

@owans
owans / tomorrow.js
Last active April 17, 2019 17:27
API for tomorrow's weather
const ora = require('ora');
const getWeather = require('../utils/weatherforecast');
const getLocation = require('../utils/location');
module.exports = async (args) => {
const spinner = ora().start();
try{
const location = args.location || args.l ||await getLocation();
@owans
owans / timeoff_db.md
Last active April 16, 2019 21:38
A workbench image of relationship description for the timeoff_app database

Entities:

Employee Organiation Manager Timeoff_type

Entities and data_types employee_table: id(INT), employee_id(VARCHAR), first_name(VARCHAR), last_name(VARCHAR), gender(VARCHAR), DOB(DATE), LGA(VARCHAR), state_of_origin(VARCHAR), phone_nos(VARCHAR).

@owans
owans / today.md
Last active April 22, 2019 18:34
Today's weather using TDD

var assert = require('assert'); var expect = require('chai').expect;

describe("Today", function(){ it("today's date", function(){ expect (new Date); });

@owans
owans / Apitest.js
Last active April 24, 2019 13:07
Write tests using Jest
const axios = require("axios")
const getCatFact = async (req, res) => {
try{
const url = "https://cat-fact.herokuapp.com/facts/random?animal"
const response = await axios.get(url)
const facts = response.data
console.log(facts)
res.json(
@owans
owans / helloWorld.sol
Last active November 24, 2019 16:03
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.11+commit.c082d0b4.js&optimize=false&gist=
pragma solidity ^0.5.11;
contract HelloWorld{
string public message;
function setMessage (string memory newMessage) public {
message = newMessage;
}
{"id": "4e3a6f0b63beed1e147f30d5c366dd54eac2e22438a4c4ec06e13953e41cdb875556670e2a0923ccc9c091b8688b13d683a52a021ba1dde4c795fdd210022ba0"}
@owans
owans / How To Install Pandoc and LaTex on Mac.md
Last active April 16, 2020 13:20
This is a tutorial on how to install Pandoc and LaTex on Mac Mojave, and solve some common installation errors

How To Install Pandoc and LaTex on MacOS Mojave

I recently had an opportunity to use the Pandoc Universal Document Converter in a project, I needed to run a PDF shell script to output the PDF version of a document, the codebase was already set up with Pandoc using LaTex to convert to a PDF file, this means I had to set up Pandoc and LaTex on my Mac, I faced some errors while trying to run the shell script, so after I solved this errors and outputted the PDF file, I thought to share my experience, and here we go;

System Requirements

  • MacOS Mojave version 10.14.5

Package Requirements

  • Homebrew
@owans
owans / Daily RSK Work Activity for May.md
Last active June 1, 2020 07:02
This is a private gist containing my month's daily activity in RSK