Skip to content

Instantly share code, notes, and snippets.

View bpanulla's full-sized avatar

Brian Panulla bpanulla

View GitHub Profile
@bpanulla
bpanulla / RDFRepresentation.cfc
Created April 14, 2011 18:18
Taffy Representation class for rendering a Jena model into the various RDF serializations
<cfcomponent extends="taffy.core.baseRepresentation" output="false">
<cfinclude template="/include/CleanHighAscii.cfm">
<!--- Property to receive injected references --->
<cffunction name="init" access="public" returntype="RDFRepresentation">
<cfargument name="rubricUtil" type="org.rubrichub.util.RubricUtil" required="true" />
<cfset variables.rubricUtil = arguments.rubricUtil>
@bpanulla
bpanulla / AppConfig.cfc
Created June 16, 2011 23:32
Composing an Application.cfc via function copying
<cfcomponent output="false">
<cfscript>
function init()
{
// Application settings
this.name = "OMNOMno.us";
this.applicationTimeout = createTimespan(5,0,0,0);
this.loginStorage = "session";
this.clientManagement = false;
this.sessionManagement = true;
@bpanulla
bpanulla / gist:1856719
Created February 18, 2012 01:19
Loading structured non-SQLified data into PostgreSQL from <stdin>
$sql = "copy myTable ( …lots fields …) from STDIN with null as '' delimiter '\t'"
zcat mydata.txt.gz | psql -U myUser myDB -c "$sql"
create table JobHistory (
jobid integer not null auto_increment,
jobtitle varchar(32) not null,
salary int not null,
startdate date not null,
enddate date null,
primary key (jobid)
);
INSERT INTO `JobHistory` (`jobid`, `jobtitle`, `employee`, `salary`, `startdate`, `enddate`)
@bpanulla
bpanulla / gist:7921071
Created December 12, 2013 00:17
Holiday Decorations
a Christmas tree
a partridge in a pear tree
tinsel
glass ornaments
a star
an angel
pine cones
Christmas lights
candles
bells
@bpanulla
bpanulla / gist:9077387
Created February 18, 2014 18:55
Charitable orgs that could benefit from a focused Hackathon for HighEdWeb 2014
Oregon Food Bank (oregonfoodbank.org) is a common cause here in Portland. Every summer they have a large blues fest supporting them (http://www.waterfrontbluesfest.com/). Here are others:
Ecotrust
Medical Teams International (they have an exhibit here to give a "real life" experience of places they support -- like living at a Mexico garbage dump -- https://www.medicalteams.org/home/real-life-exhibit
Mercy Corps
Loaves & Fishes Centers
The Oregon Community Foundation
Oregon Environmental Council
It might be nice to support a women in tech organization or partner with:
Exception in thread "Thread-14" java.lang.NoSuchMethodError: org.apache.solr.common.SolrInputDocument: method <init>()V not found
at org.apache.solr.handler.dataimport.DocBuilder$DocWrapper.<init>(DocBuilder.java:575)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:465)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:414)
at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:329)
at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:232)
at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:416)
at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:480)
at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:461)
53261 INFO (commitScheduler-41-thread-1) [ x:props] o.a.s.u.DirectUpdateHandler2 start commit{,optimize=false,openSearcher=false,waitSearcher=true,expungeDeletes=false,softCommit=false,prepareComm
@bpanulla
bpanulla / gist:aaeedbf11b36290774eec50b3837fa10
Created September 26, 2017 23:58
How to preserve order of elements in JSON with arrays
/* what it might have looked like in XML */
<types>
<foo>
<category name="A">
<item name="A1" />
<item name="A2" />
</catgory>
<category name="B">
<item name="B1" />
<item name="B2" />