Directly from CLI
alias x='exit'
funcsave x
or create a file in
~/.config/fish/functions
with name
| # This is just a cheat sheet: | |
| # On production | |
| sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
| # On local | |
| scp -C production:~/database.sql.gz | |
| dropdb database && createdb database | |
| gunzip < database.sql.gz | psql database |
Directly from CLI
alias x='exit'
funcsave x
or create a file in
~/.config/fish/functions
with name
| async function test(){ | |
| let arr = [1,2,3]; | |
| await* arr.map(async (num) => { | |
| let result = await getData(num); | |
| console.log(result); | |
| }); | |
| console.log('after foreach'); | |
| } |
| #!/usr/bin/env bash | |
| OUT_DIR=/opt/ | |
| URL='https://vscode-update.azurewebsites.net/latest/linux-x64/insider' | |
| DIR="$(dirname "$(readlink -f "$0")")" | |
| TAR_FILE=$DIR/latest.tar.gz | |
| curl -z $TAR_FILE -o $TAR_FILE -L $URL | |
| tar xzf $TAR_FILE -C $OUT_DIR |