Skip to content

Instantly share code, notes, and snippets.

View inooid's full-sized avatar

Boyd Dames inooid

View GitHub Profile
@inooid
inooid / exercises.js
Created August 17, 2018 12:31
Programming Basics - Session 6 (Exercise answers)
// EXERCISE 3:
// ---------------------------------------------------------------------------------------------- /
// 3.1
// ---------------------------------------------------------------------------------------------- /
const alphabet = 'abcdefghijklmnopqrstuvwxyz';
const createProduct = (title, price) => {
return [title, price];
};
let productList = [];
@inooid
inooid / user_settings.json
Created September 27, 2017 10:52
VSCode User Settings
{
"workbench.colorTheme": "Material Theme",
"editor.tabSize": 2,
"editor.fontSize": 14,
"editor.fontFamily": "Fira Mono",
"editor.rulers": [80, 100, 120],
"files.exclude": {
"*.jpg": true,
"*.jpeg": true,
"*.png": true,
@inooid
inooid / bot.js
Created April 28, 2017 14:36
Twitch bot command cooldown concept
// Warning: Keep in mind that this example has a lot of boilerplate,
// because I want to make sure it's as easy to grasp as possible.
// In a real application you would probably want to wrap the cooldown
// check in a higher order function that easily creates a command and
// checks the cooldowns for you.
// The cooldown manager example
var CooldownManager = {
cooldownTime: 30000, // 30 seconds
store: {
### Keybase proof
I hereby claim:
* I am inooid on github.
* I am inooid (https://keybase.io/inooid) on keybase.
* I have a public key whose fingerprint is 4488 9104 18BF 4F7C FCC5 8C4F DF7C EB8E 7D98 0071
To claim this, I am signing this object:
@inooid
inooid / arrayGenerator.js
Created December 22, 2016 16:01
Pretty cool way to generate an array with a bunch of numbers as values.
function arrayGenerator(length) {
return Array.apply(null, { length: length }).map(Number.call, Number)
}
@inooid
inooid / style.css
Last active December 21, 2016 23:22
Helping out someone's css assignment for uni
#column1 .ruleitem:last-child {
margin-bottom: 0;
}
@inooid
inooid / style.css
Last active December 21, 2016 23:21
Helping out someone's css assignment for uni
#about ul {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
#about li{
max-width: 230px;
margin: 10px;
}
@inooid
inooid / redux.js
Created December 16, 2016 14:53
Simple Redux source code... kinda
function createStore(reducer, initialState) {
let currentState = initialState;
let listeners = [];
function getState() {
return currentState;
}
function dispatch(action) {
// Create the state from the reducer
@inooid
inooid / redux-explaination-on-stream.js
Created October 29, 2016 14:14
An attempt to teach people Redux on stream
const createStore = require('redux').createStore;
// constants
const CHANGE_NAME = 'CHANGE_NAME';
const CHANGE_AGE = 'CHANGE_AGE';
const CHANGE_NAME_AND_JOB = 'CHANGE_NAME_AND_JOB';
// actions
function changeName(name) {
return {
@inooid
inooid / Preferences.sublime-settings
Created January 24, 2016 16:33
My sublime text preferences
{
"always_show_minimap_viewport": true,
"atomic_save": false,
"auto_indent": true,
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",