Skip to content

Instantly share code, notes, and snippets.

@davemerwin
Last active June 5, 2020 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davemerwin/d4ce34050f0ad49ae67255c2e9cd6d9d to your computer and use it in GitHub Desktop.
Save davemerwin/d4ce34050f0ad49ae67255c2e9cd6d9d to your computer and use it in GitHub Desktop.
This is a collection of things to know that I always forget
Digialocean
Postgres
To dump: pg_dump -h localhost -U USERNAME DATABASENMAE > /home/NAME/DATABASENAME.sql
To import: psql -h localhost -U username databasename < databasename.sql
Python
python3 -m venv /path/to/new/virtual/environment
find . -name '*.pyc' -delete - gets rid of old .pyc files
CSS
To make sure that spans have even padding for background text
/* Needs prefixing */
box-decoration-break: clone;
-webkit-box-decoration-break: clone;
To hide a scroll bar:
.hide-native-scrollbar {
scrollbar-width: none; /* Firefox 64 */
-ms-overflow-style: none; /* IE 11 */
&::-webkit-scrollbar { /** Webkit */
display: none;
}
}
Integrating Bulma with Vue: https://alligator.io/vuejs/css-frameworks-vuejs/
SERVER STUFF
Reboot: sudo shutdown -r now
Change Host Name: sudo nano /etc/hosts | sudo nano /etc/hostsname
Check on Gunicorn: sudo systemctl status gunicorn
python manage.py check --deploy - run through all the settings and make sure all is well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment