Skip to content

Instantly share code, notes, and snippets.

View sskjames's full-sized avatar

James Selvakumar sskjames

View GitHub Profile
@sskjames
sskjames / multi-module-spock-reports.groovy
Created October 17, 2017 06:52
Multi module Spock reports in Jenkins Pipeline
sh 'mkdir spock-reports'
sh 'cp **/target/spock-reports/com.* spock-reports/.'
sh '''
for dir in $(find . -mindepth 1 -maxdepth 1 -type d)
do
file=$dir/target/spock-reports/index.html
if [ -f "$file" ]
then
cp $file spock-reports/$dir-index.html
fi
@sskjames
sskjames / hotswap-agent.properties
Last active August 16, 2017 05:13
HotSwapAgent configuration for a Multi Module Apache Wicket project
extraClasspath=${myproject.rootDir}/module1/target/classes;\
${myproject.rootDir}/module1/src/main/resources/web;\
${myproject.rootDir}/module2/target/classes;\
${myproject.rootDir}/module2/src/main/resources/web;\
${myproject.rootDir}/module3/target/classes;\
${myproject.rootDir}/module3/src/main/resources/web;
@sskjames
sskjames / openlpformatter.groovy
Last active March 9, 2017 01:44
Wraps all Tamil lines in a file with OpenLP formatting tags
/**
* Wraps all Tamil lines in a file with openlp formatting tags.
*/
import groovy.transform.Field
@Field static final String PULLI = "\u0bcd";
if(args.length > 0) {
def file = new File(args[0])
if(file.exists()) {
@sskjames
sskjames / wrap-with-openlp-tag.sh
Last active March 9, 2017 01:45
Wraps all lines in a file with OpenLP formatting tags
awk '{if (NF > 0) {print "{y}" $0 "{/y}"}else{print $0}}' "$1" > temp.txt
mv temp.txt "$1"