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:
I hereby claim:
To claim this, I am signing this object:
| #!/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 |
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:
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.
| function cleanStack(stack) { | |
| const parts = path.resolve('./').split('/'); | |
| let str = stack.toString(); | |
| for (const part of parts) { | |
| const r = new RegExp(`/${part}/`, `gim`); | |
| str = str.replace(r, '/'); | |
| } | |
| return str; | |
| } |
Brought to you by Headjack
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.
Let's start with some basics:
ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file| WITH | |
| rls_enabled_tables AS ( | |
| SELECT nspname AS schema_name, relname AS table_name | |
| FROM pg_class c | |
| JOIN pg_namespace n ON n.oid = c.relnamespace | |
| WHERE c.relkind = 'r' AND c.relrowsecurity = 't' | |
| ), | |
| rls_policies AS ( | |
| SELECT p.polrelid, p.polname, p.polcmd, p.polroles | |
| FROM pg_policy p |