Skip to content

Instantly share code, notes, and snippets.

View anton-107's full-sized avatar
😀
lekker bezig

Anton Nekipelov anton-107

😀
lekker bezig
  • Amsterdam, Netherlands
View GitHub Profile
@anton-107
anton-107 / gbrand
Created April 19, 2017 08:15
small command tool to create a git branch with a random name
#!/bin/bash
randomword=`rl -c 1 /usr/share/dict/words`
branchname=anton_${randomword}
git checkout -b ${branchname}
@anton-107
anton-107 / git-init.sh
Created March 25, 2017 20:35
Always Start With An Empty Commit
# read: https://bit-booster.com/doing-git-wrong/2017/01/02/git-init-empty/
git init new-repo
cd new-repo
git commit -m 'initial empty commit' --allow-empty
git tag init
class FiniteCardinality {
constructor (initialValue=0) {
this.value = 0;
}
increaseBy(val) {
this.value += Number(val);
}
}
class InfiniteCardinality {