Skip to content

Instantly share code, notes, and snippets.

View msosvi's full-sized avatar

Miguel Angel Sosvilla Luis msosvi

View GitHub Profile
description "MediaTomb UPnP media server"
author "Daniel van Vugt <vanvugt in launchpad>"
start on (local-filesystems and net-device-up IFACE=wlan0)
stop on runlevel [!2345]
respawn
env CONFIGXML=/etc/mediatomb/config.xml
env LOGFILE=/var/log/mediatomb.log
env DEFAULT=/etc/default/mediatomb
@msosvi
msosvi / ApacheTrinidadAjaxHandler.java
Created February 13, 2012 21:41
Ajax handler for Apache Trinidad.
package net.enlosdetalles.spring;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.js.ajax.SpringJavascriptAjaxHandler;
/**
* Ajax handler for Apache Trinidad.
*
@msosvi
msosvi / Slf4jSessionLogger.java
Created October 30, 2011 10:25
This is a wrapper class for SLF4J. It is used when EclipseLink messages need to be logged through SLF4J.
package org.eclipse.persistence.logging;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
/**
@msosvi
msosvi / orm.xml
Created September 17, 2011 18:08
Esquema por defecto en JPA
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
version="2.0">
<persistence-unit-metadata>
<persistence-unit-defaults>
<schema>MYSCHEMA</schema>
</persistence-unit-defaults>
</persistence-unit-metadata>