Skip to content

Instantly share code, notes, and snippets.

@andreav
andreav / .vimrc
Last active October 20, 2018 15:18
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
"
-------------------------------------------------------- deploy stack
$ HOSTNAME=$(hostname) docker stack deploy -c docker-stack.yml prom
-------------------------------------------------------- lista stacks
$ docker stack ls
NAME SERVICES ORCHESTRATOR
prom 5 Swarm
-------------------------------------------------------- rimuovi uno stack
$ docker stack rm prom
@andreav
andreav / aws-profile-chooser-bash-alias
Last active May 5, 2024 04:01
aws profile chooser and setter for bash. alias let me set AWS_PROFILE without launching another shell
alias aws-profile-chooser='x() { select prof in $( aws configure list-profiles ) ; do export AWS_PROFILE="$prof"; break; done }; x'