Skip to content

Instantly share code, notes, and snippets.

View marcellobenigno's full-sized avatar

Marcello Benigno marcellobenigno

  • João Pessoa / Paraíba / Brazil
View GitHub Profile
@marcellobenigno
marcellobenigno / iTerm2.md
Created September 2, 2020 19:09 — forked from soifou/iTerm2.md
iTerm2 Shortcuts

iTerm2 Shortcuts

Tab navigation

  • open new tab: Cmd + t
  • next tab: Cmd + Shift + ]
  • previous tab: Cmd + Shift + [

Pane navigation

@marcellobenigno
marcellobenigno / qgis_scripting_snippets.py
Last active June 8, 2022 10:41
QGIS Python Snippets
# Layer from Memory
layer = QgsVectorLayer('Point?crs=epsg:4326', 'MyPoint' ,'memory')
pr = layer.dataProvider()
pt = QgsFeature()
point1 = QgsPoint(-35.92,-7.24)
pt.setGeometry(QgsGeometry.fromPoint(point1))
pr.addFeatures([pt])
layer.updateExtents()
QgsMapLayerRegistry.instance().addMapLayers([layer])
@luzfcb
luzfcb / configurar_pyenv.md
Last active November 1, 2024 13:03
instalar pyenv no ubuntu
@marcellobenigno
marcellobenigno / boilerplate2.sh
Created March 17, 2016 13:44 — forked from rg3915/boilerplate2.sh
Shell script to create a complete Django project in Mac with Python 3.5 and Django 1.9.3
# Shell script to create a complete Django project.
# This script require Python 3.x and pyenv
# Settings.py is config to Django 1.9.3
# The project contains:
# Settings config
# Person model and form
# Person list and detail
# Person create, update and delete
# Admin config
@rg3915
rg3915 / boilerplate2.sh
Last active February 17, 2023 11:53
Boilerplate: Shell script to create a complete Django project in Mac with Python 3.7 and Django 2.2.12
# Shell script to create a complete Django project.
# This script require Python 3.x and pyenv
# Settings.py is config to Django 2.2.12
# The project contains:
# Settings config
# Person model and form
# Person list and detail
# Person create, update and delete
# Admin config
@soifou
soifou / iTerm2.md
Last active August 31, 2024 17:26
iTerm2 Shortcuts

iTerm2 Shortcuts

Tab navigation

  • open new tab: Cmd + t
  • next tab: Cmd + Shift + ]
  • previous tab: Cmd + Shift + [

Pane navigation

@clhenrick
clhenrick / README.md
Last active September 25, 2024 08:26
PostgreSQL & PostGIS cheatsheet (a work in progress)
@leocomelli
leocomelli / git.md
Last active November 17, 2024 13:52
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@marcellobenigno
marcellobenigno / testes_postgis_raster.sql
Last active December 26, 2015 02:59
Testes_PostGIS_Raster
-- Abordagem tradicional (vetor/vetor):
SELECT foo.value, ST_area(foo.geom::geography)/10000 AS area_ha
FROM ( SELECT c.value,
ST_Union(ST_Intersection(f.geom, c.geom)) as geom
FROM fazendas f, capacidade_vect c
WHERE ST_Intersects(f.geom, c.geom)
AND f.gid = 6
GROUP BY c.value
) as foo
ORDER BY foo.value;