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 / 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 / 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 / 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 / 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 / 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;