Instantly share code, notes, and snippets.

View debounce.js
* Debounces (postpones) executing `func` until _at least_ `msWait` seconds have elapsed
* since the last time the same function had again been requested to execute.
* Example:
* const repaintElem = setRandomBgColorToElem(elem);
* document.addEventListener('resize', debounce(repaintElem, 10, true));
* @param {function} func The function to be debounced
* @param {number} [msWait=50] The minimum amount of time in miliseconds to wait before executing `func`
View optimalWoodCut.js
// =====================
const a = 210; // length of a possible cut
const b = 156; // length of another possible cut
const c = 138; // length of another possible cut
const K = 590; // length of the wood plank to be cut in pieces of the above lengths
View heapSort-people-by-age.js
/* ------ Input Data ---------------------------*/
let people = [
"age": 34,
"name": "Malone Warren"
"age": 50,
View tslint.json
"rules": {
"no-any": true,
"no-duplicate-variable": true,
"class-name": true,
"max-classes-per-file": [true, 1],
"curly": true,
"only-arrow-functions": [true, "allow-declarations"],
"arrow-parens": true,
"adjacent-overload-signatures": true,
View cloudSettings
View (vscode.keyboard-shortcuts)
// Place your key bindings in this file to overwrite the defaults
{ "key": "ctrl+shift+alt+/", "command": "workbench.action.terminal.kill" },
{ "key": "ctrl+shift+.", "command": "workbench.action.terminal.focusNext" },
{ "key": "ctrl+shift+,", "command": "workbench.action.terminal.focusPrevious" },
{ "key": "ctrl+shift+/", "command": "workbench.action.toggleMaximizedPanel" },
{ "key": "ctrl+q", "command": "workbench.action.openView" }
View .gitconfig
email =
name = Dude Coder
# delete section if you don't use meld. Everyone's wierd in some way, I don't judge.
tool = meld
autosetuprebase = always

Git Commit Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to automatically generate the change log.

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject: