Skip to content

Instantly share code, notes, and snippets.

@krams915
krams915 / spring.properties
Created September 15, 2011 14:54
spring.properties
# database properties
app.jdbc.driverClassName=com.mysql.jdbc.Driver
app.jdbc.url=jdbc:mysql://localhost/eventdb
app.jdbc.username=root
app.jdbc.password=
@krams915
krams915 / pom(snippet).xml
Created September 16, 2011 10:30
Jetty 7 Plugin
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
</plugin>
@krams915
krams915 / pom(snippet).xml
Created September 16, 2011 10:39
Tomcat Maven Plugin
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
</plugin>
@krams915
krams915 / pom(snippet).xml
Created September 16, 2011 10:54
Tomcat Maven Plugin - CodeHaus Version
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
</plugin>
@krams915
krams915 / pom(snippet).xml
Created September 16, 2011 14:09
Maven Copy Plugin (evgeny-goldin)
<plugin>
<groupId>com.goldin.plugins</groupId>
<artifactId>maven-copy-plugin</artifactId>
<version>0.2.3</version>
<executions>
<execution>
<id>create-archive</id>
<!-- Select compile phase so that resources are copied first before being
packaged! -->
<phase>compile</phase>
@krams915
krams915 / server2.xml
Created October 2, 2011 08:45
server2.xml
1. Modify shutdown port from
<Server port="8005" shutdown="SHUTDOWN">
to
<Server port="8105" shutdown="SHUTDOWN">
2. Modify HTTP port from
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
@krams915
krams915 / make-haproxy-1.4.18
Created October 2, 2011 09:15
make-haproxy-1.4.18
$ wget http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.18.tar.gz
$ tar -zxf haproxy-1.4.18.tar.gz
$ cd haproxy-1.4.18
$ make install
@krams915
krams915 / haproxy
Created October 2, 2011 09:41
haproxy.cfg - Basic
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
daemon
defaults
log global
mode http
option httplog
@krams915
krams915 / DummyCart.java
Created October 6, 2011 23:53
DummyCart.java
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@krams915
krams915 / DummyCart.java
Created October 6, 2011 23:55
DummyCart.java (Serializable)
public class DummyCart implements Serializable {
Vector<String> v = new Vector<String>();
String submit = null;
String item = null;
...
}