Skip to content

Instantly share code, notes, and snippets.

View Sulaiman-Mozes's full-sized avatar
💻
working remotely

Kayizzi Sulaiman Sulaiman-Mozes

💻
working remotely
View GitHub Profile
"""
Django ORM Optimization Tips
Caveats:
* Only use optimizations that obfuscate the code if you need to.
* Not all of these tips are hard and fast rules.
* Use your judgement to determine what improvements are appropriate for your code.
"""
# ---------------------------------------------------------------------------
@Sulaiman-Mozes
Sulaiman-Mozes / how-to-copy-aws-rds-to-local.md
Created June 5, 2020 21:36 — forked from syafiqfaiz/how-to-copy-aws-rds-to-local.md
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored
// Library Code
function createStore (reducer) {
// The store should have four parts
// 1. The state
// 2. Get the state.
// 3. Listen to changes on the state.
// 4. Update the state
let state
let listeners = []

Keybase proof

I hereby claim:

  • I am sulaiman-mozes on github.
  • I am ksulaiman (https://keybase.io/ksulaiman) on keybase.
  • I have a public key ASC8PW8OTRbUjrIDO4mZC6c3XzXVYyIkaejfDl1bkG602Qo

To claim this, I am signing this object: