Skip to content

Instantly share code, notes, and snippets.

View zathomas's full-sized avatar

Zach A. Thomas zathomas

View GitHub Profile
@zathomas
zathomas / NewMeServlet.java
Created January 13, 2012 18:04
A nakamura servlet the way it ought to be.
@SlingServlet(paths = { "/system/newme" }, generateComponent = true, generateService = true, methods = { "GET" })
public class NewMeServlet extends SlingSafeMethodsServlet {
@Reference
MeService meService;
@Override
protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)
throws ServletException, IOException {
response.setContentType("application/json");
echo Provisioning test environment...
echo Deploying latest OAE...
echo Starting up...
echo Executing tests...
echo .............................
echo 2048 tests, 0 failures, 0 errors
echo Provisioning QA environment...
echo Deploying latest OAE...
echo Starting up...
echo OAE ready at http://qa20-us.sakaiproject.org:8080/
@zathomas
zathomas / tag-date-and-push.sh
Created August 12, 2011 17:34
This automates the process of creating a new tag based on today's date.
#!/bin/sh
version="1.0"
date=`date "+%Y%m%d"`
git checkout -b $version-$date-branch
sed "s/$version-SNAPSHOT/$version-$date/" pom.xml > pom.xml.new
mv pom.xml.new pom.xml
git add pom.xml
git ci -m "changing version number for tag"
git tag -m "tagging $version-$date" $version-$date HEAD
git push origin $version-$date