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
#!/usr/bin/env python | |
# -*- coding: utf-8 | |
""" | |
Get extent from SHP | |
version 1.0 | |
autor José Gómez Castaño | |
email jgcasta@gmail.com |
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
#! /usr/bin/env python | |
# -*- coding: utf-8 | |
""" | |
Plot histogram | |
version 1.0 | |
autor José Gómez Castaño | |
email jgcasta@gmail.com |
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
#!/usr/bin/python | |
""" | |
Traza la Analema para un Madrid | |
@precondition: se necesita tener el paquete Ephem | |
""" | |
import ephem |
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 | |
# Delete 1 year before today | |
# | |
# 20/02/2013 v1.0 | |
# | |
# | |
ANO=$(date +%Y) |
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 | |
# Add and update EPEL and RPMFusion repositories in a CentOS 5 | |
# jgcasta at gmail dot com | |
wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm | |
wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt | |
rpm -import RPM-GPG-KEY.dag.txt | |
rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm | |
rpm -ivh http://mirror.chpc.utah.edu/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm |
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
public static XMLGregorianCalendar date2XMLGregorianCalendar(Date fecha, Date hora) { | |
Calendar calendarFecha = Calendar.getInstance(); | |
calendarFecha.setTime(fecha); | |
Calendar calendarHora = Calendar.getInstance(); | |
calendarHora.setTime(hora); | |
//System.out.println("hora->" + calendarHora.get(Calendar.HOUR_OF_DAY) + "/" + calendarHora.get(Calendar.MINUTE) + "/" +calendarHora.get(Calendar.SECOND)); | |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" | |
xmlns:p="http://www.springframework.org/schema/p" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"> | |
<bean | |
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> | |
<property name="location"> |
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
Install an external dependency into the local repository | |
$ mvn install:install-file -Dfile=<path-to-file> -DgroupId=Id=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging> | |
Generate a package | |
$ mvn package | |
Install into the local repository |
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 | |
#Delete Oracle table since 1 natural year | |
# | |
ANO=$(date +%Y) | |
ANTERIOR=$[ANO-1] | |
FBORRADO=$(date +%d-%m-$ANTERIOR) | |
MES=$(date +%m) | |
MESANTERIOR=$[MES-1] |
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
/** | |
* Return a String date with format dd-MM-yyyy from a XMLGregorianCalendar | |
* | |
* @param cal | |
* @return | |
*/ | |
public String XmlGregorianCalendar2String(XMLGregorianCalendar cal){ | |
String str = ""; | |
SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy"); |
OlderNewer