Skip to content

Instantly share code, notes, and snippets.

View ascandroli's full-sized avatar

Alejandro Scandroli ascandroli

View GitHub Profile
@ascandroli
ascandroli / gist:2274287
Created April 1, 2012 10:25
@CommitAfter not working in RESTEasy
Index: pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+><project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\t\t xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n\t<modelVersion>4.0.0</modelVersion>\n\t<groupId>org.amneris</groupId>\n\t<artifactId>petstore</artifactId>\n\t<packaging>war</packaging>\n\t<version>0.1.0-SNAPSHOT</version>\n\t<name>petstore - My Tynamo project</name>\n\t<url>http://tynamo.org/</url>\n\n\t<properties>\n\t\t<tynamo-version>0.3.0-SNAPSHOT</tynamo-version>\n\t\t<tapestry.app-package>org.amneris.petstore</tapestry.app-package>\n\t\t<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n\t</properties>\n\n\t<scm>\n\t\t<connection>scm:git:git://github.com/ascandroli/petstore.git</connection> <!-- Read-Only access -->\n\t\t<url>https://github.com
@ascandroli
ascandroli / AssetProtectionModule.java
Created May 29, 2012 21:59
tapestry-security based configuration that block access to assets (inspired by T5AssetProtectionDispatcher)
package org.tynamo.security.services;
import org.apache.shiro.util.PatternMatcher;
import org.apache.tapestry5.SymbolConstants;
import org.apache.tapestry5.ioc.Configuration;
import org.apache.tapestry5.ioc.annotations.Symbol;
import org.tynamo.security.services.impl.SecurityFilterChain;
import java.util.regex.Pattern;
package org.amneris.petstore.services;
import org.apache.tapestry5.EventContext;
import org.apache.tapestry5.SymbolConstants;
import org.apache.tapestry5.TapestryConstants;
import org.apache.tapestry5.internal.EmptyEventContext;
import org.apache.tapestry5.ioc.MethodAdviceReceiver;
import org.apache.tapestry5.ioc.OrderedConfiguration;
import org.apache.tapestry5.ioc.annotations.Advise;
import org.apache.tapestry5.ioc.annotations.Contribute;
@ascandroli
ascandroli / AmnerisSymbols.java
Created October 11, 2012 14:46
copy of BaseURLSourceImpl 5.3 version adapted to make it work with 5.2
public class AmnerisSymbols {
/**
* The hostname that application should use when constructing an absolute URL. The default is "", i.e. an empty
* string,
* in which case system will use request.getServerName(). Not the same as environment variable HOSTNAME, but you can
* also
* contribute "$HOSTNAME" as the value to make it the same as the environment variable HOSTNAME.
*
* @since 5.3 copy of SymbolConstants.HOSTNAME

Keybase proof

I hereby claim:

  • I am ascandroli on github.
  • I am ascandroli (https://keybase.io/ascandroli) on keybase.
  • I have a public key ASCqHd4mo5QFW5LqAu5SFc3tk72bYW5Ade3shPA-RJmVfwo

To claim this, I am signing this object: