Skip to content

Instantly share code, notes, and snippets.

Working from home

Jorge Gustavo Rocha jgrocha

Working from home
  • Geomaster, Lda
  • Braga, Portugal
View GitHub Profile
jgrocha / column.html
Created Apr 24, 2014
ExtJS Three column layout inside tabpanel
View column.html
<title>Column Layout</title>
<!-- GC -->
<style type="text/css">
html, body {
font: normal 12px verdana;
margin: 0;
jgrocha / printWMTS.json
Last active Aug 29, 2015
MapFish print request using WMTS layer
View printWMTS.json
"attributes": {
"map": {
"center": [-26000, 100500],
"dpi": 72,
"layers": [{
"type": "WMTS",
"baseURL": "{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.png",
"opacity": 1,
"layer": "osm",
jgrocha /
Created Jun 8, 2015
Moon phases based on pyephem
#-*- coding: utf-8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import urlparse
import ephem, datetime
import json
# Phases of the Moon, using the at UTC
# Phases of the Moon, using the datetime.datetime(int(year), int(month), int(day))) at UTC
jgrocha /
Created Jan 19, 2016
Startup script for OpenTripPlanner (/etc/init.d/opentripplanner)
case $1 in
echo "Starting $NAME ..."
if [ ! -f $PIDFILE ]; then
cd $BASE
jgrocha / gfi.js
Last active Feb 7, 2016
parse and transform a GetFeatureInfo request using ExtJS 6
View gfi.js
Ext.define('FeatureProperty', {
extend: '',
fields: [{
name: 'prop',
type: 'string'
}, {
name: 'value',
type: 'string'
jgrocha /
Last active Mar 16, 2017 — forked from Prototype-X/
Upgrading PostgreSQL from 9.5 to 9.6 on Ubuntu 16.04


Install Postgres 9.6, and then:

sudo pg_dropcluster 9.6 main --stop
sudo service postgresql stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
jgrocha / add postgis table dialog.png
Last active Dec 3, 2017
Feedback about missing spatial indexes on Postgis
jgrocha / qgis screenshot.png
Last active Feb 24, 2018
multiplolygon sample
View qgis screenshot.png
[ PostGIS Multipolygon when converted to shapefile doesn't match the source geometry]
View description
Can not attched a volume
Standalone python script for QGIS3 on OSX.
import os
import sys
# Define plugin locations from QGIS3
# Define Qt5 plugin path since Qt5 can't find it