This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install Postgres 9.1 and PostGIS | |
sudo apt-get install postgresql-9.1 postgresql-9.1-postgis | |
# create template_postgis | |
sudo su postgres -c'createdb -E UTF8 -U postgres template_postgis' | |
sudo su postgres -c'createlang -d template_postgis plpgsql;' | |
sudo su postgres -c'psql -U postgres -d template_postgis -c"CREATE EXTENSION hstore;"' | |
sudo su postgres -c'psql -U postgres -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################################### | |
# Script per automatitzar la revisió de traduccions d'OSGeo-Live | |
########################################################################### | |
# | |
# Converteix a UTF8, treu el BOM, converteix CRLF a UNIX, copia els nous | |
# continguts al checkout local del repo, compila els html i els obre en FF. | |
# | |
# Llavors cal: revisar l'aspecte visual de cada document, corregir-lo si | |
# convé, i fer 'svn commit'. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Startup script for Jakarta Tomcat | |
# Script should work on Centos, Redhat and Fedora Linux. It depends on the file tomcatRunner. | |
# WARNING: The script does not allow to run Tomcat on privileged ports as non root user. | |
# For this use case try : http://tomcat.apache.org/tomcat-6.0-doc/setup.html and http://commons.apache.org/daemon/jsvc.html | |
# | |
# Should start normally after the databases and before http server | |
# chkconfig: 345 80 10 | |
# description: Jakarta Tomcat Java Servlet/JSP Container | |
# processname: geowebcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jarray import array | |
from geoserver.wps import process | |
from java.lang import String | |
from org.geotools.coverage.grid import GridCoverage2D | |
from java.awt.image import RenderedImage | |
from javax.media.jai import JAI | |
from javax.media.jai import ParameterBlockJAI | |
from javax.media.jai import RenderedOp | |
from org.jaitools.media.jai.classifiedstats import ClassifiedStats | |
from org.jaitools.media.jai.classifiedstats import ClassifiedStatsRIF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
host="https://www.transifex.com" | |
project_slug="geoserver_test" | |
propfile_orig="GeoServerApplication.properties" | |
propfile_trans="GeoServerApplication_<lang>.properties" | |
tx init --host $host | |
echo "type = PROPERTIES" >> .tx/config | |
find . -name $propfile_orig | while read -r source_file; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.text.SimpleTemplateEngine | |
import java.util.Map | |
import org.apache.log4j.Logger | |
import org.apache.commons.io.IOUtils | |
import it.geosolutions.unredd.geostore.model.UNREDDStatsData | |
import it.geosolutions.unredd.geostore.model.UNREDDChartData | |
import it.geosolutions.unredd.geostore.UNREDDGeostoreManager | |
import it.geosolutions.geostore.services.rest.model.RESTResource | |
import it.geosolutions.geostore.services.rest.GeoStoreClient | |
import it.geosolutions.geostore.services.rest.model.RESTStoredData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Run-level Startup script for the Oracle Instance and Listener | |
# | |
### BEGIN INIT INFO | |
# Provides: Oracle | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ParlerModelSerializer(serializers.ModelSerializer): | |
"""https://gist.github.com/yellowcap/81c6d5f3ea1426689c80""" | |
def __init__(self, *args, **kwargs): | |
# Get list of translated fields | |
fields = self.Meta.model._parler_meta._fields_to_model | |
# Separate parler fields and scilent fields | |
parler_fieds = [x for x in self.Meta.fields if x in fields] | |
pas_parler_fields = [x for x in self.Meta.fields if x not in fields] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Tilesets in the cloud - Leaflet example</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" /> | |
<style type="text/css"> | |
html, body, #map { | |
margin: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Sensor Widgets Simple Example</title> | |
<script src="http://sensors.fonts.cat/js/SensorWidgets.js"></script> | |
<script> | |
SensorWidget('compass', { | |
service: 'http://sensors.portdebarcelona.cat/sos/json', | |
offering: 'http://sensors.portdebarcelona.cat/def/weather/offerings#1m', | |
feature: 'http://sensors.portdebarcelona.cat/def/weather/features#02', | |
property: 'http://sensors.portdebarcelona.cat/def/weather/properties#31', |
OlderNewer