Skip to content

Instantly share code, notes, and snippets.

@bp2070
bp2070 / build.xml
Created October 8, 2011 00:15
ant build script
<?xml version="1.0"?>
<project name="PROJECT_NAME" default="run" basedir=".">
<!--**************************************************-->
<!-- Configureable Properties -->
<!--**************************************************-->
<!-- The main class, where public static void main(String... is -->
<property name="Main.class" value="MAIN_CLASS"/>
@bp2070
bp2070 / nc-stat
Created March 21, 2012 15:13
reads a single column of numeric data from stdin and prints out statistics
#!/bin/sh
# reads a single column of numeric data from stdin and prints out statistics
# blank lines are ignored
# prints sum, count, mean, median, minimum, maximum
sort -n |
awk 'BEGIN{c=0;sum=0;}\
/^[^#]/{a[c++]=$1;sum+=$1;}\
END{ave=sum/c;\
@bp2070
bp2070 / simple-build.xml
Created September 5, 2013 20:04
simple ant buildfile
<project name="MyProject" default="dist" basedir=".">
<description>
simple example build file
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<target name="init">
@bp2070
bp2070 / gist:8012405
Created December 17, 2013 20:51
Incident causing WebEOC to blow up IG-48d7bca8-0e47-46ad-923a-17841b423fe9
<str:WorkProduct xmlns:str="http://www.saic.com/precis/2009/06/structures">
<ulex:PackageMetadata xmlns:ulex="ulex:message:structure:1.0">
<ulex:DataItemID>Incident-c8ec700e-f8c9-4b27-9a3a-8b4f84a4f4fa</ulex:DataItemID>
<ulex:DataItemReferenceID>Incident-c8ec700e-f8c9-4b27-9a3a-8b4f84a4f4fa</ulex:DataItemReferenceID>
<ns:DataItemStatus ns:label="UICDS Work Product Status" ns:codespace="http://uicds.org/1.0/codespace/workproduct/status" ns:code="Active" xmlns:ns="http://ucore.gov/ucore/2.0"/>
<ulex:DataOwnerMetadata>
<ns:DataOwnerIdentifier xmlns:ns="http://ucore.gov/ucore/2.0">
<ns1:Organization xmlns:ns1="http://metadata.dod.mil/mdr/ns/DDMS/2.0/">
<ns1:name>ucids.org</ns1:name>
</ns1:Organization>