Skip to content

Instantly share code, notes, and snippets.

View jgrocha's full-sized avatar
🏠
Working from home

Jorge Gustavo Rocha jgrocha

🏠
Working from home
  • Geomaster, Lda
  • Braga, Portugal
View GitHub Profile
@jgrocha
jgrocha / column.html
Created April 24, 2014 09:48
ExtJS Three column layout inside tabpanel
<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 August 29, 2015 14:16
MapFish print request using WMTS layer
{
"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 January 19, 2016 19:26
Startup script for OpenTripPlanner (/etc/init.d/opentripplanner)
#!/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 February 7, 2016 23:42
parse and transform a GetFeatureInfo request using ExtJS 6
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 March 16, 2017 10:53 — forked from Prototype-X/upgrade-postgres-9.5-to-9.6.md
Upgrading PostgreSQL from 9.5 to 9.6 on Ubuntu 16.04

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 December 3, 2017 11:33
Feedback about missing spatial indexes on Postgis
add postgis table dialog.png
@jgrocha
jgrocha / qgis screenshot.png
Last active February 24, 2018 12:14
multiplolygon sample
[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]
@jgrocha
jgrocha / description
Created June 30, 2018 09:17
Scaleway
Can not attched a volume
"""
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