Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jorge Gustavo Rocha jgrocha

🏠
Working from home
  • Geomaster, Lda
  • Braga, Portugal
View GitHub Profile
@jgrocha
jgrocha / column.html
Created Apr 24, 2014
ExtJS Three column layout inside tabpanel
View column.html
<html>
<head>
<title>Column Layout</title>
<!-- GC -->
<style type="text/css">
html, body {
font: normal 12px verdana;
margin: 0;
@jgrocha
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": "http://a.geomaster.pt/mapproxy/wmts/osm/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.png",
"opacity": 1,
"layer": "osm",
@jgrocha
jgrocha / opentripplanner.sh
Created Jan 19, 2016
Startup script for OpenTripPlanner (/etc/init.d/opentripplanner)
View opentripplanner.sh
#!/bin/sh
NAME=opentripplanner
JAR=/home/jgr/otp/otp-0.19.0-SNAPSHOT-shaded.jar
BASE=/home/jgr/otp
PIDFILE="/var/run/$NAME.pid"
case $1 in
start)
echo "Starting $NAME ..."
if [ ! -f $PIDFILE ]; then
cd $BASE
@jgrocha
jgrocha / gfi.js
Last active Feb 7, 2016
parse and transform a GetFeatureInfo request using ExtJS 6
View gfi.js
Ext.define('FeatureProperty', {
extend: 'Ext.data.Model',
fields: [{
name: 'prop',
type: 'string'
}, {
name: 'value',
type: 'string'
}]
});
@jgrocha
jgrocha / upgrade-postgres-9.5-to-9.6.md
Last active Mar 16, 2017 — forked from Prototype-X/upgrade-postgres-9.5-to-9.6.md
Upgrading PostgreSQL from 9.5 to 9.6 on Ubuntu 16.04
View upgrade-postgres-9.5-to-9.6.md

TL;DR

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
jgrocha / add postgis table dialog.png
Last active Dec 3, 2017
Feedback about missing spatial indexes on Postgis
@jgrocha
jgrocha / qgis screenshot.png
Last active Feb 24, 2018
multiplolygon sample
View qgis screenshot.png
[https://gis.stackexchange.com/questions/257974/postgis-multipolygon-when-converted-to-shapefile-doesnt-match-the-source-geomet PostGIS Multipolygon when converted to shapefile doesn't match the source geometry]
View description
Can not attched a volume
View qgis3_standalone_osx.py
"""
Standalone python script for QGIS3 on OSX.
"""
import os
import sys
# Define plugin locations from QGIS3
sys.path.append('/Applications/QGIS3.app/Contents/Resources/python/')
sys.path.append('/Applications/QGIS3.app/Contents/Resources/python/plugins')
# Define Qt5 plugin path since Qt5 can't find it