Skip to content

Instantly share code, notes, and snippets.

View juanluisrp's full-sized avatar

Juan Luis Rodríguez Ponce juanluisrp

View GitHub Profile
@juanluisrp
juanluisrp / AnchorSwitcher.js
Created July 8, 2019 14:54
Geonetwork Anchor Switcher
/*
* Copyright (C) 2001-2016 Food and Agriculture Organization of the
* United Nations (FAO-UN), United Nations World Food Programme (WFP)
* and United Nations Environment Programme (UNEP)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
@juanluisrp
juanluisrp / config-view-service-override.xml
Created December 28, 2018 09:36
Overrides xml.metadata.get service to return geonet:info elements
<overrides xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="config-overrides.xsd">
<file name=".*/WEB-INF/config/config-service-xml-api.xml">
<replaceAtt xpath="services/service[@name='xml.metadata.get']/class/param[@name='skipInfo']" attName="value" value="n"/>
</file>
</overrides>
@juanluisrp
juanluisrp / deployGeonetwork.sh
Created December 4, 2015 22:39
Update, compile and deploy GeoNetwork into Tomcat
#!/bin/bash
GN_SOURCES=geonetwork
GN_PROFILES=env-prod
DEPLOY_NAME=geonetwork-ngr3
GN_DATA_DIR=/var/local/geonetwork/${DEPLOY_NAME}
RED='\e[31m'
EC='\e[0m'
@juanluisrp
juanluisrp / centos-openstack-post-install-script
Created January 9, 2015 15:01
Openstack post installation script to set a password for root and cloud-user on CentOS
#cloud-config
chpasswd:
list: |
root:stackops
cloud-user:stackops
expire: False
ssh_pwauth: True
# tomcat recipe comes from https://github.com/opscode-cookbooks/tomcat
include_recipe "tomcat::default"
template "/tmp/template1" do
source "default.erb"
owner "root"
group "root"
mode "0644"
notifies :restart, "service[tomcat]", :delayed
end
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@juanluisrp
juanluisrp / map.geojson
Created August 12, 2013 20:07
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import org.apache.commons.io.FileUtils;
import java.io.File;
public class DeleteDirectory {
@juanluisrp
juanluisrp / create_template_postgis.sh
Last active December 11, 2015 21:49 — forked from rolo/gist:1481128
Install Postgres and create template_postgis
#!/bin/bash
#
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box
# http://wildfish.com
# add the ubuntu gis ppa
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
@juanluisrp
juanluisrp / gist:4384845
Created December 27, 2012 02:06
Properly setting of externalGraphic size in OpenLayers.
var myStyles = new OpenLayers.StyleMap(
new OpenLayers.Style(
{
externalGraphic: baseUrl +'/img/marker-blue.png',
fill: false,
stroke: false,
pointRadius: 0,
graphicWidth: 18 ,
graphicHeight: 30,
fillOpacity: 1,