Mode | Command | Description |
---|---|---|
NORMAL |
* |
Select all occurrences of word under cursor. Put the cursor to the desired word and pres * to search for the next occurrences of the word. Press n to go to the next occurrence |
NORMAL |
n |
Go to the next occurrence of the searched term |
NORMAL |
N |
Go to the previous occurrence of the searched term |
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
#!/usr/bin/env bash | |
# change into the script's directory | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
pushd $DIR > /dev/null | |
# configuration | |
OUT=out | |
TMP=tmp |
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
// to propagate async callback | |
// usefull when using async.waterfall | |
// with mongoose | |
async.waterfall([ | |
task1(), | |
task2(), | |
task3() | |
], callFinalCallback()); | |
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
// Partial application | |
const sum = (a, b, c) => a + b + c; | |
const papply = (fn, ...rest) => (...last) => fn.apply(null, [...rest, ...last]); | |
const a = papply(sum, 5); | |
console.log(a(2, 3)); | |
// currying | |
const curry = (fn, ...rest) => { |
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 upgradable package | |
sudo apt list --upgradable | |
# Upgrade a package | |
sudo apt install --only-upgrade <package-name> | |
# Autoremove unused packages | |
sudo apt autoremove |
Roughly, category theory is a general mathematical theory of structures and of systems of structures [[1]]. Generally, is best represented with Objects and Arrows that go between them.
A -> B -> C
A -> C
If there is an arrow from object A
to object B
, and another arrow from B
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
blremotesorted = "!for branch in `git branch -r | grep -v HEAD`;do echo `git show --format=\"%ci %cr %an\" $branch | head -n 1` \t$branch; done | sort -r" | |
blremotesortedcsv = "!for branch in `git branch -r | grep -v HEAD`;do echo `git show --format=\"%ci,%cr,%an\" $branch | head -n 1`,$branch; done | sort -r" |
OlderNewer