Skip to content

Instantly share code, notes, and snippets.

View andre-carvalho's full-sized avatar

André Fernando Araújo de Carvalho andre-carvalho

View GitHub Profile
@andre-carvalho
andre-carvalho / README-Template.md
Created November 23, 2017 20:44 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@andre-carvalho
andre-carvalho / zonal_stats.py
Created April 18, 2018 17:09 — forked from perrygeo/zonal_stats.py
Python implementation of zonal statistics function. Optimized for dense polygon layers, uses numpy, GDAL and OGR to rival the speed of starspan.
"""
Zonal Statistics
Vector-Raster Analysis
Copyright 2013 Matthew Perry
Usage:
zonal_stats.py VECTOR RASTER
zonal_stats.py -h | --help
zonal_stats.py --version
@andre-carvalho
andre-carvalho / nginx-tuning.md
Created September 20, 2019 19:11 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@andre-carvalho
andre-carvalho / Dockerfile.ta.monitor
Created October 14, 2020 13:35
Dockerfile to create an image for the TerraAmazon-Monitor application
FROM node:8.11.4
RUN npm install pm2 -g
WORKDIR /data
EXPOSE 36000-36010
VOLUME ["/data"]
@andre-carvalho
andre-carvalho / pg_change_db_owner.sh
Created May 11, 2021 19:12 — forked from jirutka/pg_change_db_owner.sh
Some convenient scripts to manage ownerships and privileges in PostgreSQL.
#!/bin/sh
#
# The MIT License
#
# Copyright 2014-2017 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@andre-carvalho
andre-carvalho / download-deter-data.py
Last active November 30, 2023 02:13
A simple example to download geography data of DETER Amazon project via WFS service using authentication.
"""
Download WFS
Download Shapefile DETER
Copyright 2020 TerraBrasilis
Usage:
download-deter-data.py
Options: