Skip to content

Instantly share code, notes, and snippets.

define(function() {
// Insert custom configuration here
var config = {
// Custom CSS Files to load in
skinCSS : ["/dev/skins/nyu/nyu.skin.css"],
Authentication : {
"allowInternalAccountCreation": false,
"internal": false,
"external": [{
@thecarlhall
thecarlhall / bundle_graphs.py
Created September 2, 2011 05:10
Nakamura Bundle Dependency Graphs
#! /usr/bin/env python
import re
from sets import Set
import os
import pygraphviz as pgv
import sys
import telnetlib
# [ 1] [Active ] [ 15] org.sakaiproject.nakamura.messaging (0.11.0.SNAPSHOT)
bundle_from_ps = re.compile('^\[\s*(?P<bundle_id>\d+)\]\s\[.+\]\s(?P<bundle_name>.+)\s')
@thecarlhall
thecarlhall / run_tests_single_threaded.sh
Created September 22, 2011 20:55
Testing Solr Indexing
#!/bin/bash
NUM_USERS=100
THREADS=1
# variable to get us back to the parent director of nakamura & oae builder
BASE=../
BRANCHES=('content-indexing' 'master')
PROCS=('conns' 'msgs')
WINDOW_NAME="Java Monitoring & Management Console"
update drupal_users
set mail = "seley@aarweb.org"
where mail not like '%@aarweb.org'
and mail not like '%@hallwaytech.com';
update drupal_users
set mail = 'ssnider@aarweb.org'
where name in ('Z22505', 'S00304', 'Z37527', 'Z21587', 'Z38940', 'Z34751');
update drupal_users
DATE=$(date +%Y%m%d-%H%M)
SITE_URL=papers.hallwaytech.com
DB_NAME=cod2.aar
DB_PASS="mm07e1bca901%7Emm"
DATA_FILE=$DB_NAME-$DATE.sql
SITE_FILE=papers_$DATE.tar.gz
SERVER_LOC=/srv/www/cod2.hallwaytech.com
# dump local mysql to data/
mysqldump -u root -p$DB_PASS $DB_NAME > $DATA_FILE
@thecarlhall
thecarlhall / page.tpl.php
Created February 10, 2012 02:15
AAR updates to seven/page.tpl.php
<?php
?>
<div id="branding" class="clearfix">
<?php print $breadcrumb; ?>
<?php print render($title_prefix); ?>
<?php if ($title): ?>
<h1 class="page-title"><?php print $title; ?></h1>
<?php endif; ?>
<?php print render($title_suffix); ?>
@thecarlhall
thecarlhall / JcrSparseTest.java
Created March 6, 2012 22:13
Unit Test Mocks for JCR, Sparse Sessions
private javax.jcr.Session jcrSession;
private org.sakaiproject.nakamura.api.lite.Repository repository;
private org.sakaiproject.nakamura.api.lite.Session session;
// Create an in-memory repository to work with
repository = new BaseMemoryRepository().getRepository();
// mock a jcr session but also include SessionAdaptable for easier mocking to a sparse session
jcrSession = mock(javax.jcr.Session.class, Mockito.withSettings().extraInterfaces(SessionAdaptable.class));
@thecarlhall
thecarlhall / org.sakaiproject.nakamura.composite
Created July 25, 2012 01:49
Pax Runner profile for Sakai OAE 1.4.0-SNAPSHOT
#########################################################################
# Pax Runner profile for Sakai OAE 1.4.0-SNAPSHOT using Apache Felix Http
#########################################################################
#
##### Dependencies
#
# start level 1
scan-bundle:mvn:commons-io/commons-io/1.4@1
scan-bundle:mvn:commons-fileupload/commons-fileupload/1.2.2@1
scan-bundle:mvn:commons-collections/commons-collections/3.2.1@1
$ sudo apt-get install ffmpeg youtube-dl
$ sudo install youtube2mp3 /usr/local/bin/
@thecarlhall
thecarlhall / gist:4021017
Last active October 12, 2015 11:38
bash prompt for git
function parse_git_branch {
git rev-parse --git-dir &> /dev/null
git_status="$(git status 2> /dev/null)"
branch_pattern="^On branch ([^${IFS}]*)"
remote_pattern="# Your branch is ([[:alnum:]]*)"
diverge_pattern="# Your branch and (.*) have diverged"
if [[ ${git_status} =~ ${branch_pattern} ]]; then
branch=${BASH_REMATCH[1]}
if [[ ${git_status} =~ "Changes not staged for commit" ]]; then