Skip to content

Instantly share code, notes, and snippets.

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

Oluwasetemi Ojo Oluwasetemi

🏠
Working from home
View GitHub Profile
@Oluwasetemi
Oluwasetemi / config.json
Created March 25, 2016 04:35 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
def score(bracket, results, filt,
teams_remaining, blacklist, round_num=0):
"""
Recursively calculates the score of a prediction
bracket against a results bracket.
- bracket
A bitstring representing a prediction bracket. For
a 64 game tournament this would be 63 bits.
@Oluwasetemi
Oluwasetemi / countries.json
Created May 19, 2016 04:17 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@Oluwasetemi
Oluwasetemi / .gitignore
Created October 16, 2016 23:21 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@Oluwasetemi
Oluwasetemi / recursion.js
Created November 14, 2016 03:00 — forked from bendc/recursion.js
Functional loop
const loop = (() => {
const recur = (callback, count, i=0) => {
if (i == count-1) return callback(i);
callback(i);
return recur(callback, count, i+1);
};
return (callback, count) => {
if (count > 0) return recur(callback, count);
};
})();
@Oluwasetemi
Oluwasetemi / bytesToSize.js
Created March 12, 2017 09:23 — forked from lanqy/bytesToSize.js
JavaScript To Convert Bytes To MB, KB, Etc
// from http://scratch99.com/web-development/javascript/convert-bytes-to-mb-kb/
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return 'n/a';
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
if (i == 0) return bytes + ' ' + sizes[i];
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
};
@Oluwasetemi
Oluwasetemi / compat-old.txt
Created February 3, 2018 14:28 — forked from Elchi3/compat-old.txt
English pages still using CompatibilityTable.ejs
Archive/<input>_archive
Web/API/AbstractWorker/onerror
Web/API/AmbientLightSensor/AmbientLightSensor
Web/API/AmbientLightSensor/reading
Web/API/AmbientLightSensorReading
Web/API/AmbientLightSensorReading/AmbientLightSensorReading
Web/API/AmbientLightSensorReading/illuminance
Web/API/Animation
Web/API/Animation/Animation
Web/API/Animation/cancel
@Oluwasetemi
Oluwasetemi / bling.js
Created April 28, 2018 07:20 — forked from paulirish/bling.js
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@Oluwasetemi
Oluwasetemi / vscode-italics.json
Created May 30, 2018 03:33 — forked from dev01d/vscode-italics.json
VSCode italics in (almost) any theme
// All you need to do is add a font that has pretty good itlaics support i.e Fira, Operator, etc. and then add these two params to your existing User settings.
// Tested in Monokai Sharp and Super One Dark
{
"editor.fontFamily": "'Operator Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"comment",