This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useSyncExternalStore } from 'react'; | |
| const subscribe = (cb: () => void) => { | |
| window.addEventListener('hashchange', cb); | |
| return () => { | |
| window.removeEventListener('hashchange', cb); | |
| }; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Get the current directory | |
| projects=$(pwd) | |
| # Loop through each project folder in the current directory | |
| for project in "$projects"/*; do | |
| if [ -d "$project" ]; then | |
| project=$(basename "$project") | |
| echo "******************************************************************************" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ** dump to file ** | |
| pg_dump -h localhost -U postgres -F p acl > ./acl.sql | |
| ** or dump to .tar archieve ** | |
| pg_dump -h localhost -U db_user -W -F t db_name > /path/to/acl.tar | |
| ** restore dump ** | |
| pg_restore -h localhost -U postgres -c -d "acl" ./path/to/acl.tar | |