Skip to content

Instantly share code, notes, and snippets.

View zathomas's full-sized avatar

Zach A. Thomas zathomas

View GitHub Profile
@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
echo Provisioning QA environment...
echo Deploying latest OAE...
echo Starting up...
echo OAE ready at http://qa20-us.sakaiproject.org:8080/
echo Provisioning test environment...
echo Deploying latest OAE...
echo Starting up...
echo Executing tests...
echo .............................
echo 2048 tests, 0 failures, 0 errors
@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");
@zathomas
zathomas / what-up-bnd.txt
Created January 19, 2012 16:20
these are the manifests produced by different versions of the maven-bundle plugin: 2.1.0, 2.3.4, 2.3.5, and 2.3.6
Manifest-Version: 1.0
Service-Component: OSGI-INF/core-serviceComponents.xml,OSGI-INF/servic
eComponents.xml
Export-Package: org.sakaiproject.nakamura.api.lite.authorizable;uses:=
"org.sakaiproject.nakamura.api.lite,org.sakaiproject.nakamura.api.lit
e.util,org.sakaiproject.nakamura.api.lite.accesscontrol,org.slf4j,com
.google.common.collect,org.apache.commons.lang,javax.security.auth",o
rg.sakaiproject.nakamura.api.lite;uses:="org.sakaiproject.nakamura.ap
i.lite.accesscontrol,org.sakaiproject.nakamura.api.lite.authorizable,
org.sakaiproject.nakamura.api.lite.content,org.sakaiproject.nakamura.
@zathomas
zathomas / oae-data-dictionary.txt
Created January 20, 2012 17:34
Preliminary output from my data dictionary generator
AUTHORIZABLES
g (11)
sakai:group-description
sakai:creatorRole
sakai:role-title-plural
contentCount
principals
type
rep:group-managers
sakai:roles
{
"items": 18,
"results": [{
"hash": "suzy",
"basic": {
"access": "everybody",
"elements": {
"lastName": {
"value": "Queue"
},
-> % gem list
*** LOCAL GEMS ***
bundler (1.0.22)
curb (0.7.17)
json (1.6.4)
nakamura (0.6, 0.4, 0.3)
rake (0.9.2)
zach@Zachs-Mac [03:58:31] [~/dev/nakamura/testscripts/SlingRuby/tests] [search-broken *]
mvn archetype:generate -DarchetypeGroupId=org.sakaiproject.nakamura \
-DarchetypeArtifactId=org.sakaiproject.nakamura.acme-archetype \
-DarchetypeVersion=1.1 \
-DarchetypeRepository=https://source.sakaiproject.org/maven2/
Migrators : {
/**
* Run through the structure0 page structure object and update all of the
* pages that haven't been migrated yet
* @param {Object} structure0 Sakai Doc's structure0 object. Contains
* the page structure and references
* @param {Object} originalstructure The full Sakai Doc object. Contains the
* full structure0 object and page objects
* @param {Object} json Migrated object that will be returned