Skip to content

Instantly share code, notes, and snippets.

@dannyduc
dannyduc / gist:3805327
Created September 29, 2012 22:28
html:starting template
<!doctype html>
<html>
<head>
<<meta charset="utf-8">
<title></title>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.js" type="text/javascript"></script>
</body>
@dannyduc
dannyduc / gist:3763023
Created September 21, 2012 18:11
Trap CTRL-C in bash
trap ctrl_c INT
function ctrl_c() {
echo "** Trapped CTRL-C"
}
for i in `seq 1 5`; do
sleep 1
echo -n "."
done
@dannyduc
dannyduc / install_jdk5_lion.sh
Created September 15, 2012 15:10 — forked from bric3/install_jdk5_post_lion.sh
Automate the install of JDK 5 on Lion and Mountain Lion
#!/bin/bash
# This script is edited by Brice Dutheil
# See there in french http://blog.arkey.fr/2012/07/30/script-pour-installer-le-jdk-5-sur-macosx-lion/
# Translate button is broken for now, please use Google to translate this website.
#
# 2012/08/25 This script didn't behave correctly when ran on 10.8.1
# Added recommendation to always run this script after updates such as Java, XCode, OSX, etc.
#
# 2O12/07/29 Added Mountain Lion support => Choose the 64bit JVM !
@dannyduc
dannyduc / gist:3728384
Created September 15, 2012 15:02
install java jdk 1.5 on a mac
http://support.apple.com/downloads/DL1359/en_US/JavaForMacOSX10.5Update10.dmg
@dannyduc
dannyduc / pom.xml
Created September 11, 2012 21:00
maven site plugin
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.1</version>
</plugin>
</plugins>
</build>
@dannyduc
dannyduc / gist:3695586
Created September 11, 2012 02:49
sample child web war pom
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>multi</artifactId>
<groupId>com.ingenuity</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
@dannyduc
dannyduc / gist:3695579
Created September 11, 2012 02:48
sample child jar pom
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>multi</artifactId>
<groupId>com.ingenuity</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
@dannyduc
dannyduc / gist:3695569
Created September 11, 2012 02:46
multi module pom example
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ingenuity</groupId>
<artifactId>multi</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>multi</name>
<modules>
@dannyduc
dannyduc / gist:3694578
Created September 10, 2012 22:57
Maven Integration Test
<project>
<properties>
<jetty.port>8123</jetty.port>
</properties>
<build>
<plugins>
<plugin>
@dannyduc
dannyduc / mavenJettyRunPlugin.xml
Created August 10, 2012 18:54
Maven plugin for "mvn jetty:run"
<build>
...
<plugins>
...
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.4.2.v20110526</version>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>