Skip to content

Instantly share code, notes, and snippets.

@dotbanana
dotbanana / db_backup_commands.md
Created December 28, 2024 02:23 — forked from AtulKsol/db_backup_commands.md
Commands to backup & restore database
  1. pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
    Backup: pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sql

    Restore: psql -h localhost -p 5432 -U postgres -d mydb < backup.sql

    -h is for host.
    -p is for port.
    -U is for username.
    -d is for database.

@dotbanana
dotbanana / add-location-to-gnome-weather.sh
Last active March 30, 2025 20:04
Add location to gnome weather
#!/bin/bash
# Add location to gnome weather manually
if [[ ! -z "$(which gnome-weather)" ]]; then
system=1
fi
if [[ ! -z "$(flatpak list | grep org.gnome.Weather)" ]]; then
flatpak=1
fi