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 / bas_fcc.js
Created June 17, 2016 09:21
Basic Algorithm Scripting
function reverseString(str) {
var s = str.split("")
.reverse()
.join("");
return s;
}
reverseString("hello");
@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 / codeSetting.json
Last active August 26, 2017 14:33
My VS code setting in json file
"files.autoSave": "afterDelay",
"files.associations": {
"*.ejs": "html"
},
"editor.wordWrap": "on",
"workbench.colorTheme": "monokai-best",
"workbench.iconTheme": "vscode-icons",
"vsicons.dontShowNewVersionMessage": true,
"window.zoomLevel": 0,
"cSpell.userWords": [
@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