Skip to content

Instantly share code, notes, and snippets.

View marianozunino's full-sized avatar
:shipit:

Mariano Zunino marianozunino

:shipit:
View GitHub Profile
@marianozunino
marianozunino / psql-with-gzip-cheatsheet.sh
Created February 17, 2019 19:58 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# 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
@marianozunino
marianozunino / fish_alias.md
Created May 28, 2018 14:01 — forked from tikolakin/fish_alias.md
Create alias in Fish shell and save this as a permanent function

Directly from CLI

alias x='exit'
funcsave x

or create a file in

~/.config/fish/functions 

with name

@marianozunino
marianozunino / forEach async.js
Created December 30, 2017 22:23 — forked from anonymous/forEach async.js
async forEach
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');
}
@marianozunino
marianozunino / update-vscodeInsider.sh
Last active October 19, 2017 23:15 — forked from reecer/update-vscode.sh
Update vs-code via latest insider 64-bit tar.gz
#!/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