Skip to content

Instantly share code, notes, and snippets.

View mamged's full-sized avatar
🎯
Focusing

mamged mamged

🎯
Focusing
View GitHub Profile
@mamged
mamged / psql-with-gzip-cheatsheet.sh
Created December 5, 2021 19:48 — 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
#Osx
config dir: /usr/local/etc/redis.conf
db dif: /usr/local/var/db/
STOP REDIS : brew services stop redis
START REDIS: brew services start redis
#Ubuntu
config dir: /etc/redis/redis.conf
db dif: /var/lib/redis
STOP REDIS : sudo systemctl stop redis
START REDIS: sudo systemctl start redis
@mamged
mamged / mac-setup-redis.md
Created April 12, 2020 07:39 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis