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
| The syntax of sed command replacement is: | |
| $ sed 's/find/replace/' file | |
| This sed command finds the pattern and replaces with another pattern. When the replace is left empty, the pattern/element found gets deleted. | |
| Let us consider a sample file as below: | |
| $ cat file | |
| Linux |
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
| To dump a postgres DB use: | |
| pg_dump 'postgres://postgres.mirtteddfgyhujqugnln:<password>@aws-0-eu-central-1.pooler.supabase.com:5432/postgres' -f backup.dump | |
| To restore the postgres DB to the existing DB or a totally new one use: | |
| psql 'postgresql://postgres:<password>@db.yhrnbiuownbomnocw.supabase.co:5432/postgres' < backup.dump | |
| if the dump was made with a custom flag then use: | |
| pg_restore 'postgresql://postgres:<password>@db.yhrnbiuownbomnocw.supabase.co:5432/postgres' -F custom backup.dump |
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
| #nginx config file for Nextjs App | |
| #place in /etc/nginx/sites-available/name_of_config_file | |
| server { | |
| listen 80; | |
| server_name domainname.com; | |
| gzip on; | |
| gzip_proxied any; | |
| gzip_types application/javascript application/x-javascript text/css text/javascript; | |
| gzip_comp_level 5; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.