Skip to content

Instantly share code, notes, and snippets.

View mrstif's full-sized avatar

André Andrade mrstif

  • Hole19
  • Lisbon, Portugal
View GitHub Profile
@mrstif
mrstif / postgis.md
Last active August 9, 2018 14:28
PostGis

https://postgis.net/docs/

SRIDs

3857 - Simple Spherical Mercator projection coordinate system
4326 - Geographic coordinate system

FUNCTIONS

  • ST_Transform: Return a new geometry with its coordinates transformed to a different spatial reference.
@mrstif
mrstif / createuser.sql
Last active February 6, 2018 10:21
Postgres
CREATE USER $USERNAME PASSWORD $PASSWORD;
GRANT USAGE ON SCHEMA $SCHEMA TO $USERNAME;
GRANT SELECT ON $TABLENAME TO $USERNAME;
@mrstif
mrstif / nginx.conf
Created March 1, 2016 15:21
Best nginx configuration for improved security (and performance).
http {
# nginx won't resolve URLs correctly so we have to provide google's public DNS
resolver 8.8.8.8;
#######################
### Server side SSL ###
#######################
# based on: https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
# Test using: https://www.ssllabs.com/ssltest/