sudo useradd -m peter
sudo passwd peter
groupadd myAppUsers
sudo usermod -a -G peter myAppUsers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias la="ls -a" | |
mkcd() { | |
mkdir $1 && cd $1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Returns a new array, with the element at pos replaced with replacement item or calling the replacement function on arr[pos] | |
function changeAtIndex(arr, pos, replacement) { | |
if (typeof replacement == "function") { | |
replacement = replacement(arr[pos]); | |
} | |
return [...arr.slice(0, pos), replacement, ...arr.slice(pos + 1)]; | |
} | |
// Returns a new array, with the first element matching the predicate function replaced with replacement item or calling the replacement function on arr[pos] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"console.log(\"***\", ...)": { | |
"prefix": "conso", | |
"scope": "javascript,typescript,typescriptreact", | |
"body": [ | |
"console.log(\"*** $1\", $0)", | |
"" | |
] | |
}, | |
"debug-map":{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { | |
chain, | |
filter, | |
count, | |
groupBy, | |
map | |
} = require("./chaining") | |
const transforms = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract record StronglyTypedId<TValue>(TValue Value) | |
where TValue : notnull | |
{ | |
public override sealed string ToString() => $"{Value}"; | |
} |
This post takes you through creating a partition, formatting it and finally mount it in the filesystem.
These procedures where tested on Linux Mint 19
$ sudo fdisk -l
The result will vary depending on the number of disk you have. On my computer I got these three entries:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
refresh = !git fetch --all --prune && git checkout master && git pull --rebase && git lastbranch | |
amend = commit --amend --no-edit | |
lastbranch = checkout @{-1} | |
ql = log -10 --oneline --decorate --graph | |
qb = "!qb(){ git refresh && git checkout -b aei/PPN-$@; }; qb" | |
qc = "!qc(){ git checkout aei/PPN-$@; }; qc" | |
qa = "!qa(){ git refresh && git branch --remote | grep $@ | sed 's/origin\\///' | xargs git checkout && git pull --rebase && git rebase master; }; qa" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function round(value, precision) { | |
return Number(Math.round(value + "e" + precision) + "e-" + precision) | |
} | |
function strictCompare(left, right) { | |
console.log(`strictCompare(${left}, ${right})`); | |
return left === right; | |
} |
NewerOlder