Skip to content

Instantly share code, notes, and snippets.

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

Akinoso Toyosi Toyrone

🏠
Working from home
View GitHub Profile
@Toyrone
Toyrone / app.js
Created December 4, 2018 12:55 — forked from sogko/app.js
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@Toyrone
Toyrone / twitter_inbox_cleaner.js
Created January 3, 2019 09:40 — forked from levelsio/twitter_inbox_cleaner.js
Twitter Inbox Cleaner (by @levelsio)
//
// Twitter lets you close your inbox to people you don't follow. The problem
// is that still authorizes ANYONE who sent you a message EVER to continue
// messaging you, even if your privacy settings are changed.
//
// The only way (I think) to avoid that is to delete every message from a
// person so that Twitter's internal check "did you talk to this person
// before?" results in FALSE. That sucks because maybe you want more privacy
// than before. But it's do-able by deleteing all the message history of each
// conversation.
@Toyrone
Toyrone / waterfall.js
Created January 15, 2019 16:25 — forked from indatawetrust/waterfall.js
async await waterfall sample
const waterfall = async function (input, ...funcs) {
const list = []
for(let f of funcs)
if(!list.length)
list.push(await f(input))
else
list.push(await f(list.shift())
return list.pop()
@Toyrone
Toyrone / easeOverSin.pde
Created March 4, 2019 13:14 — forked from marcedwards/easeOverSin.pde
Some sine wave timing fun, using 2 or 3 sections with separate ease-in-out curves.
//
// Some sine wave timing fun, using 2 or 3 sections with separate ease-in-out curves.
// Created using Processing 3.5.3.
//
// Code by @marcedwards from @bjango.
//
void setup() {
size(400, 400, P2D);
frameRate(60);
@Toyrone
Toyrone / easeOverSin.pde
Created March 4, 2019 13:14 — forked from marcedwards/easeOverSin.pde
Some sine wave timing fun, using 2 or 3 sections with separate ease-in-out curves.
//
// Some sine wave timing fun, using 2 or 3 sections with separate ease-in-out curves.
// Created using Processing 3.5.3.
//
// Code by @marcedwards from @bjango.
//
void setup() {
size(400, 400, P2D);
frameRate(60);
@Toyrone
Toyrone / README.md
Created April 5, 2019 19:25 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@Toyrone
Toyrone / axios-response-interceptor.js
Created September 9, 2019 15:55 — forked from FilipBartos/axios-response-interceptor.js
Axios response interceptor for access token refresh supporting 1 to N async requests
let isAlreadyFetchingAccessToken = false
let subscribers = []
function onAccessTokenFetched(access_token) {
subscribers = subscribers.filter(callback => callback(access_token))
}
function addSubscriber(callback) {
subscribers.push(callback)
}
@Toyrone
Toyrone / codility_solutions.txt
Created May 15, 2020 07:15 — forked from lalkmim/codility_solutions.txt
Codility Solutions in JavaScript
Lesson 1 - Iterations
- BinaryGap - https://codility.com/demo/results/trainingU2FQPQ-7Y4/
Lesson 2 - Arrays
- OddOccurrencesInArray - https://codility.com/demo/results/trainingFN5RVT-XQ4/
- CyclicRotation - https://codility.com/demo/results/trainingSH2W5R-RP5/
Lesson 3 - Time Complexity
- FrogJmp - https://codility.com/demo/results/training6KKWUD-BXJ/
- PermMissingElem - https://codility.com/demo/results/training58W4YJ-VHA/
@Toyrone
Toyrone / README.md
Created February 23, 2022 15:55 — forked from stephenway/README.md
BEMIT Cheatsheet