stop all containers:
docker kill $(docker ps -q)
remove all containers
docker rm $(docker ps -a -q)
def print_logo(thickness): | |
c = 'H' | |
# Triangulo principal | |
for i in range(thickness): | |
print((c * i).rjust(thickness - 1) + c + (c * i).ljust(thickness - 1)) | |
# Columnas superiores | |
for i in range (thickness + 1): | |
print((c * thickness).center(thickness * 2) + (" " * thickness * 2) + (c * thickness).center(thickness * 2)) |
... | |
gzip on; | |
gzip_static on; | |
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
gzip_proxied any; | |
gzip_vary on; | |
gzip_comp_level 6; | |
gzip_buffers 16 8k; | |
gzip_http_version 1.1; |
stop all containers:
docker kill $(docker ps -q)
remove all containers
docker rm $(docker ps -a -q)
CMDER_ROOT
to your root Cmder folder (in my case C:\Program Files (x86)\Cmder
). It seems to be important that this does not have quotes around it because they mess with concatenation in the init script."cmd" /k ""%CMDER_ROOT%\vendor\init.bat""
as the Shell path. The double-double-quotes are intentional, as they counteract the missing double quotes in the environment variable.Drop: | |
docker-compose exec db psql -U postgres -c "DROP DATABASE your-database" | |
Backup: | |
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H%M%S`.sql | |
Restore: | |
cat your_dump.sql | docker exec -i your-db-container psql -U postgres |
function number_format(amount, decimals) { | |
amount += ''; // por si pasan un numero en vez de un string | |
amount = parseFloat(amount.replace(/[^0-9\.]/g, '')); // elimino cualquier cosa que no sea numero o punto | |
decimals = decimals || 0; // por si la variable no fue fue pasada | |
// si no es un numero o es igual a cero retorno el mismo cero | |
if (isNaN(amount) || amount === 0) | |
return parseFloat(0).toFixed(decimals); |
# Parar todos los contenedores | |
docker stop $(docker ps -a -q) | |
# Eliminar todos los contenedores | |
docker rm $(docker ps -a -q) | |
# Eliminar todas las imágenes | |
docker rmi $(docker images -q) |
Put into keymap.cson:
'.editor:not(.mini)':
'alt-ctrl-i': 'editor:auto-indent'
And restart your Atom.
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit" |
To use the most modern version of Postgres software we need to add postgresql repository. Edit /etc/apt/sources.list
or create /etc/apt/sources.list.d/pgdg.list
and add there a line: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
Then import the repository signing key, and update the package lists:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
Install a new version of PostgreSQL server.
Once the Debian upgrade finished, I used dpkg-query -l postgresql*
to check which versions of postgres I have installed.