Skip to content

Instantly share code, notes, and snippets.

Avatar

Yan Pujante ypujante

View GitHub Profile
@ypujante
ypujante / CustomizePlanPlugin.groovy
Created Nov 14, 2012
Example of a glu plugin to customize a plan
View CustomizePlanPlugin.groovy
/*
* Copyright (c) 2012 Yan Pujante
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
@ypujante
ypujante / RefreshPlanPlugin.groovy
Created Nov 5, 2012
Example of a glu plugin to handle custom plan type
View RefreshPlanPlugin.groovy
/*
* Copyright (c) 2012 Yan Pujante
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
View MyPlugin.groovy
/*
* Copyright (c) 2011 Yan Pujante
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
View MonitorMain.groovy
/*
* Copyright (c) 2011 Yan Pujante
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
@ypujante
ypujante / jroller401_to_disqus.groovy
Created Mar 2, 2011
generate the wpr xml formatted output for importing jroller 4.0.1 comments into disqus
View jroller401_to_disqus.groovy
import groovy.xml.MarkupBuilder
import java.text.SimpleDateFormat
/**
* Parses the xml file produced by the template from jroller and generates
* wxr xml file for importing in disqus
*/
sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssz")
sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
@ypujante
ypujante / jroller401_to_jekyll.groovy
Created Mar 2, 2011
Parses the xml file produced by the template from jroller 4.0.1 and generate the posts for jekyll
View jroller401_to_jekyll.groovy
/**
* Parses the xml file produced by the template from jroller
*/
def xml = new XmlSlurper()
def posts = xml.parse(new File(args[0]))
posts.post.each { post ->
def date = post."@date".toString().split("T")[0]
def title = post."@title".toString()
@ypujante
ypujante / maven_staging_upload
Created Nov 21, 2010
This script uploads all your artifacts to maven (staging)
View maven_staging_upload
/*
* Copyright (c) 2010-2010 LinkedIn, Inc
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software