Skip to content

Instantly share code, notes, and snippets.

const doubler = (input) => {
return doubler.operationsByType[typeof input](input);
};
doubler.operationsByType = {
number: (input) => input + input,
string: (input) =>
input
.split('')
.map((letter) => letter + letter)
.join(''),
@alber70g
alber70g / README.md
Last active June 25, 2018 10:43
Reddit Quick Popularity Identification with Colors based on Vote Count

Reddit Quick Popularity Identification with Colors based on Vote Count

How to install

Reddit Votes Colors

@alber70g
alber70g / fuse.js
Last active March 26, 2018 10:28
Sample
const {
FuseBox,
JSONPlugin,
EnvPlugin,
QuantumPlugin,
} = require('fuse-box');
const { TypeHelper } = require('fuse-box-typechecker');
const typeHelper = TypeHelper({
tsConfig: './tsconfig.json',
@alber70g
alber70g / Tarmak1.md
Last active October 17, 2017 10:26
This is a collection of words and character combinations that are particulary hard to write when moving to Colemak using Tarmak (Transitional Colemak). It can be considered as a training list for each stage of Tarmak. To learn this and be fluent with it, try to write each word out 4 times and continue with the next word.

Words

hier 
onder 
noemen
genoemd
oefenen 
kijk

here
seta r_filmtweakdarktint "1.1 1.25 1.4"
seta r_filmtweaklighttint "1 1 1.2"
seta r_filmtweakdesaturation "0"
seta r_filmtweakcontrast "1.5"
seta r_filmtweakbrigthness "0.255"
@alber70g
alber70g / run-wct.js
Last active July 11, 2017 08:21
Run all suites separately.
/**
* npm install lodash yargs shell
*/
const shell = require('./shell');
const _ = require('lodash');
const argv = require('yargs')
.usage('Usage: node $0 [options]')
.option('all', {
alias: 'a',
@alber70g
alber70g / run-wct.js
Created June 1, 2017 14:51
Run all suites separately
const shell = require('./shell');
const _ = require('lodash');
const argv = require('yargs')
.usage('Usage: node $0 [options]')
.option('all', {
alias: 'a',
boolean: true,
describe: 'Run all test suites (ignores + and - prefixes)'
})
.option('wct', {
@alber70g
alber70g / README.md
Last active March 6, 2017 10:01
Visual Studio Code (VS Code) shell script for use with Git Bash

VS Code Shell Shortcut for Git Bash

Put this file code in C:\Users\<username>\AppData\Local\Code\bin aside code.cmd.

Assuming this path is already in your %PATH% you can now run the command to open a file

code file.txt
#!/bin/bash
# Borrowed from grunt-cli
# http://gruntjs.com/
#
# Copyright (c) 2012 Tyler Kellen, contributors
# Licensed under the MIT license.
# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
# Usage:
@alber70g
alber70g / .bashrc
Last active February 3, 2016 09:34
Pull all subdirectories
alias gitall="find . -type d -maxdepth 1 -exec sh -c '(echo -e \"\e[4m{} \e[0m:\" && cd {} && git pull)' ';'"