Skip to content

Instantly share code, notes, and snippets.

View tbanj's full-sized avatar
💥
Available for remote work or onsite

Alabi Temitope Wahab tbanj

💥
Available for remote work or onsite
View GitHub Profile
@tbanj
tbanj / gist:0d5f0bbb2de38daa99c5bee029e754b6
Created October 5, 2024 11:59
Hosting an express app on netlify with simple steps
i) when you want to 1st create the project by connecting to your github project
ii) create your project, push it to github.
iii) Goto your netlify dashboard, click on create new project by the
importing project. Select github branch which netlify should use to be pushing from.
iv) When you get to build files leave it as your default settings
v) in th build type for Functions directory: functions
vi) publish directory leave it empty.
vii) leave all other fields as default
vii) Sample project is located on your macos netlify-host-node-demo
Use the file format that way
@tbanj
tbanj / anaconda-heroku.txt
Created June 29, 2021 00:48
Guide to deploy a flask application built in Anaconda environment to Heroku
Step by step guide to deploy a flask application which was developed within anaconda virtual environment to Heroku server
At the root of your project
pip freeze > requirements.txt
# edited the content of the requirements.txt e.g
From
Jinja2 @ file:///tmp/build/80754af9/jinja2_1624781299557/work
To
Jinja2==3.0.1
@tbanj
tbanj / mongodb_cheat_sheet.md
Last active March 28, 2021 12:38
Cheat Sheet for Mongodb with essential commands

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

// SPDX-License-Identifier: GPL-3.0
pragma solidity >= 0.7.0;
// T1. mint enough BNB to your account for call contract creation and interaction
// T2. Deploy it to BSC testnet
// T3. Finish below coding tasks
contract Coin {
// The keyword "public" makes variables
// accessible from other contracts
address public minter;
@tbanj
tbanj / nigerian-states.json
Created March 18, 2020 11:41
This shows list of Nigeria states with local governments
[
{
"Abia": [
"Aba North",
"Aba South",
"Arochukwu",
"Bende",
"Ikwuano",
"Isiala-Ngwa North",
"Isiala-Ngwa South",
@tbanj
tbanj / nigerian-states.json
Created March 18, 2020 11:41
This shows list of Nigeria states with local governments
[
{
"Abia": [
"Aba North",
"Aba South",
"Arochukwu",
"Bende",
"Ikwuano",
"Isiala-Ngwa North",
"Isiala-Ngwa South",
@tbanj
tbanj / CouponShoppingCart.js
Created June 24, 2019 09:56
Role Functional Assessment K001
let shoppingingcart = require("./ShoppingCart.js");
let items = function(name, price) {
this.name = name;
this.price = price;
};
let Oranges = new items("oranges", 10);
let Bananas = new items("Bananas", 10);
let Rice = new items("Rice", 10);
@tbanj
tbanj / gist:2c4a0ecd81374aeaee168a3beddb09c6
Created May 11, 2019 10:06
Populating start date of leave on calender
import React from 'react';
import './dashboard.scss';
import axios from 'axios';
// import './css/jquery.datatables.css';
import env from '../../env';
import InfiniteCalendar from 'react-infinite-calendar';
import 'react-infinite-calendar/styles.css'; // only needs to be imported once
@tbanj
tbanj / arrayMultiplier.js
Created April 25, 2019 08:36
This gist entails using javascript to implement array multiplier, email generator from firstname & lastname which are the parameters which the input will make use of, calling cat api which return facts about api
// This gist entail using javascript to implement array multiplier
var arrayMulti = [5, 10, 7, 11];
const arrayMap = arrayMulti.map((element) => {return element * 2;});
console.log(arrayMap);
@tbanj
tbanj / test_location.js
Last active April 23, 2019 07:51
test for weather-cli application
const expect = require('chai').expect;
const getLocation = require('../utils/location');
describe('Test Location API', () => {
it('expect res type to equal object', () => {
return getLocation().then(res => {
expect(typeof res).to.equal('object');
})
});
it('expect county code to be NG', () => {
return getLocation().then(res => {