Skip to content

Instantly share code, notes, and snippets.

Kostis Maninakis maninak

Block or report user

Report or block maninak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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`
maninak / optimalWoodCut.js
Last active Jul 22, 2017
Wanted to cut planks of wood. The size of the possible cuts was fixed. Wanted to utilize as much of the wooden planks as possible. Like a true engineer, I took this to the editor :P .
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
maninak / heapSort-people-by-age.js
Created Jul 7, 2017
A javascript implementation of Heap Sort algorithm that sorts an array of objects {age: number, string: name} in ascending order of age.
View heapSort-people-by-age.js
/* ------ Input Data ---------------------------*/
let people = [
"age": 34,
"name": "Malone Warren"
"age": 50,
maninak / tslint.json
Created Jun 4, 2017
An opinionated TSLint configuration to keep you and your team sane while working on Typescript projects.
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,
maninak / cloudSettings
Last active Jun 19, 2019
Visual Studio Code Sync Settings GIST
View cloudSettings
maninak / (vscode.keyboard-shortcuts)
Last active Dec 27, 2016
Nifty Visual Studio Code settings I use for my projects.You can use `vscode.workspace` to enforce best practices or `vscode.user` to get best practices + the misc vscode settings I personally use. You can install them by copy-pasting them under File -> Preferences.
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" }
maninak / .gitconfig
Last active May 22, 2019
(edit as needed and) Place this file in your home folder (e.g.: /home/maninak/.gitconfig). Learn more:
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
maninak /
Created Dec 11, 2016
A file with commit message guidelines following the Angular convention. Feel free to copy and paste in your project's root folder as is, or start with it as a template and modify it to your needs.

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:

You can’t perform that action at this time.