Skip to content

Instantly share code, notes, and snippets.

View sivasakthic's full-sized avatar
💭
I may be slow to respond.

Sivasakthi sivasakthic

💭
I may be slow to respond.
View GitHub Profile
@sivasakthic
sivasakthic / nginx.conf
Created August 10, 2017 14:13 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@sivasakthic
sivasakthic / psql-with-gzip-cheatsheet.sh
Created August 9, 2017 12:06 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database