Skip to content

Instantly share code, notes, and snippets.

View zathomas's full-sized avatar

Zach A. Thomas zathomas

View GitHub Profile
#!/bin/sh
if [ $# -lt 1 ] ; then
echo "Pushes the current branch to your personal github repo,"
echo "then issues a pull request of that branch to sakaiproject."
echo "usage: git pushpr <pull request title>"
exit 0
fi
######### setup #########
GITNAME=johndoe
GITPASS=supersecret
@zathomas
zathomas / AdminSession.java
Created March 26, 2012 15:42
the way to use an administrative sparsemap session in nakamura
Session adminSession = null;
try {
adminSession = repository.loginAdministrative();
// do whatever with the admin session
} finally {
if (adminSession != null) {
try {
adminSession.logout();
} catch (Exception e) {
LOGGER.error("Could not logout administrative session.");
#!/bin/sh
rm -rf sling
mkdir sling
cp -r sling-1.1/* sling/
rm -rf sling/felix sling/startup org.apache.sling.launchpad.base.jar*
./tools/sanitize_config_files.sh ./sling
__extend__(HTMLElement.prototype,{
set innerHTML(html){
HTMLParser.parseFragment(html, this);
}
});
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
mvn archetype:generate -DarchetypeGroupId=org.sakaiproject.nakamura \
-DarchetypeArtifactId=org.sakaiproject.nakamura.acme-archetype \
-DarchetypeVersion=1.1 \
-DarchetypeRepository=https://source.sakaiproject.org/maven2/
-> % 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 *]
{
"items": 18,
"results": [{
"hash": "suzy",
"basic": {
"access": "everybody",
"elements": {
"lastName": {
"value": "Queue"
},
@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
@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.