Skip to content

Instantly share code, notes, and snippets.

View kastork's full-sized avatar

Kirk Stork kastork

View GitHub Profile
@kastork
kastork / server.groovy
Created February 3, 2013 23:45
Basic example of a CAS login and logout route in a Vertx Route Matcher application.
import org.vertx.groovy.core.http.RouteMatcher
import org.vertx.groovy.core.http.HttpClient
import org.vertx.groovy.core.http.HttpClientRequest
import org.vertx.groovy.core.http.HttpServerResponse
import org.vertx.groovy.core.http.HttpClientResponse
// made with with vertx 1.3.0
// set your own CAS server details,
//
@kastork
kastork / gist:4596497
Created January 22, 2013 17:30
example portal-log4j.xml to put in a plugin project's META-INF
<?xml version="1.0"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<category name="edu.nps.eccogs.eccoag">
<priority value="DEBUG" />
</category>
</log4j:configuration>
@kastork
kastork / noodle.xml
Created June 26, 2012 01:41
OpenSocial gadget example
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Gifts part 1 - Friends">
<Require feature="opensocial-0.8"/>
<Require feature="dynamic-height" />
</ModulePrefs>
<Content type="html">
<![CDATA[
<script type="text/javascript">
function loadFriends() {
@kastork
kastork / node-and-npm-in-30-seconds.sh
Created January 16, 2012 22:17 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
On my OSX Lion box with an up to date MacPorts installation the following does not work
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
@kastork
kastork / Classpath control inside Jython script
Created February 3, 2011 20:57
Here's a quick little method to take control of the classpath right inside a Jython script.
import sys
...
def setClassPath():
libDir = "/path/to/my/jar/files/"
classPaths = [
"foo.jar",
"bar.jar"
]