Skip to content

Instantly share code, notes, and snippets.

View JamesMGreene's full-sized avatar

James M. Greene JamesMGreene

View GitHub Profile
@JamesMGreene
JamesMGreene / NoRootNamespaceEnforcement.js
Created July 8, 2012 12:14
Shortcut functions to easily create deep namespaces in JavaScript
(function(exports) {
/**
* @namespace My namespace!
*/
exports.MyNS = {
/**
* Returns the namespace object specified and creates it if it doesn't exist.
* Does NOT enforce that any requested namespace is attached to the MyNS root namespace.
*
* @param {String} nsString A string representation of the desired namespace.
@JamesMGreene
JamesMGreene / jetty-macros-for-ant-using-ant-contrib.xml
Created May 15, 2012 20:10
How to start and stop Jetty from Ant. Two versions: one using Ant Contrib, one without.
<!--
***********************
A more-correct version of the Ant script bits outlined on this blog post:
http://ptrthomas.wordpress.com/2006/10/10/how-to-start-and-stop-jetty-from-ant/
NOTE: This file's macrodefs use task definitions from the Ant Contrib library ("if", "then" and "else", in particular).
If you are not using the Ant Contrib library, you cannot use this version of the file.
***********************