Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View iolufemi's full-sized avatar

Olanipekun Femi iolufemi

View GitHub Profile
@iolufemi
iolufemi / promise.spread.js
Last active May 11, 2023 12:22 — forked from jblashill/promise.spread.js
An extension to the Promise prototype to "spread" resolved data from Promise.all() to multiple function parameters
Promise.prototype.spread = function(fn) {
return this.then(function() {
if (!arguments || arguments.length === 0) {
return Promise.resolve(fn.apply());
}
if(typeof arguments[0] === 'object' && arguments[0].length > 0){
return Promise.all(arguments[0]);
}else{
return Promise.resolve(arguments[0]);
}
@iolufemi
iolufemi / Dockerfile
Created November 5, 2021 22:23
Add Pentaho to Apache Fineract in a Docker Environment
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@iolufemi
iolufemi / remove.sh
Created October 20, 2021 12:12 — forked from sxiii/remove.sh
Docker Swarm - Remove all Down nodes automatically
#!/bin/bash
# Requirements: linux, docker, grep, awk
# This script removes all "Down" (off) nodes from Docker Swarm
# Useful to clean stuff from time to time, if you have auto-joining nodes for example
sudo docker node rm $(sudo docker node ls | grep Down | awk -F" " '{ print $1 }')
@iolufemi
iolufemi / countries+states
Created August 24, 2020 09:32 — forked from olanipekunife/countries+states
list of countries with states
[
{
"code2": "AF",
"code3": "AFG",
"name": "Afghanistan",
"capital": "Kabul",
"region": "Asia",
"subregion": "Southern Asia",
"states": [
{
@iolufemi
iolufemi / AWSRegionsAndAZs.md
Created July 18, 2019 17:53
List of AWS availability zones for each AWS region
AWS region code AWS region name Number of AZs AZ names
us-east-1 Virginia 4 us-east-1a, us-east-1b, us-east-1c, us-east-1e
us-west-1 N. California 2 us-west-1a, us-west-1b
us-west-2 Oregon 3 us-west-2a, us-west-2b, us-west-2c
eu-west-1 Ireland 3 eu-west-1a, eu-west-1b, eu-west-1c
eu-central-1 Frankfurt 2 eu-central-1a, eu-central-1b
ap-southeast-1 Singapore 2 ap-southeast-1a, ap-southeast-1b
ap-southeast-2 Sydney 2 ap-southeast-2a, ap-southeast-2b, ap-southeast-2c
ap-northeast-1 Tokyo 2 ap-northeast-1a, ap-nort
@iolufemi
iolufemi / temporary-email-address-domains
Created January 23, 2019 09:43 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@iolufemi
iolufemi / disposable-email-provider-domains
Created January 23, 2019 09:43
List of disposable email provider domains
0815.ru
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
123-m.com
1fsdfdsfsdf.tk
1pad.de
20minutemail.com
21cn.com
@iolufemi
iolufemi / redis-clear
Created May 17, 2018 11:35 — forked from dimasch/redis-clear
Clear a redis cache in Docker
docker exec -it magento_fullpagecache_1 redis-cli FLUSHALL
@iolufemi
iolufemi / sketch-never-ending.md
Created October 1, 2017 18:41 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@iolufemi
iolufemi / ultimate-ut-cheat-sheet.md
Created August 19, 2017 22:35 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies