Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick Reese nickreese

View GitHub Profile
@nickreese
nickreese / gist:200b950b1e7c106910ecc62511d2b0f0
Last active Nov 3, 2020
Svelte Partial Hydration Wishlist
View gist:200b950b1e7c106910ecc62511d2b0f0

My Context on Partial Hydration

When you first start trying to figure out SSR with the goal of partial hydration like I did, you find it is complex for two reasons:

  1. You figure out which components you need to mount.
  2. You need to mount them with the right props.

At first this seems relatively simple, but there are some non-obvious pitfalls.

Here are my thoughts from building Elder.js and solving these problems.

@nickreese
nickreese / sync_db.sh
Last active Mar 26, 2020
Sync Postgres Production with Local Database
View sync_db.sh
#!/bin/bash
if [ -f .env ]
then
export $(cat .env | sed 's/#.*//g' | xargs)
fi
echo 'Dropping the local db';
PGPASSWORD=$LOCAL_POSTGRES_PASSWORD psql -h $LOCAL_POSTGRES_HOST -p $LOCAL_POSTGRES_PORT -U $LOCAL_POSTGRES_USER $LOCAL_POSTGRES_DB -c "DROP DATABASE $LOCAL_POSTGRES_DB;"
wait
View keybase.md

Keybase proof

I hereby claim:

  • I am nickreese on github.
  • I am nickreese (https://keybase.io/nickreese) on keybase.
  • I have a public key ASBikqdyYV2Uw-LX-Mm8nU3yDXSn8WMqi9H8s6tzK2YfeQo

To claim this, I am signing this object: