Skip to content

Instantly share code, notes, and snippets.

@LegoStormtroopr
LegoStormtroopr / Identifiables
Created October 14, 2012 09:56
List of objects in DDI 3.1 by their most complex class
Abstract
Abstract
Access
ActionToMinimizeLosses
Attribute
Coding
CollectionEvent
CollectionSituation
CoordinateGroup
CreationSoftware
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="././xsltforms-beta2/xsltforms/xsltforms.xsl" type="text/xsl"?><?xsltforms-options debug="no"?><html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:rml="http://legostormtoopr/response">
<head>
@LegoStormtroopr
LegoStormtroopr / input.xml
Created August 19, 2012 00:20
Using XPath1.0 to resolve the correct implied value of an XML elements xml:lang attribute
<?xml version="1.0" encoding="utf-8"?>
<data>
<foo xml:lang="en">
<bar>
<tog xml:lang="fr">
<wel>
<vay xml:lang="sv"/>
</wel>
</tog>
<tog>
@LegoStormtroopr
LegoStormtroopr / token_search_form.py
Created October 9, 2014 00:20
Haystack google-like colon searching
# Released as GPL.
# Attribute where possible :)
from haystack.constants import DEFAULT_ALIAS
from haystack import connections
class TokenSearchForm(SearchForm):
def prepare_tokens(self):
try:
query = self.cleaned_data.get('q')
except:
@LegoStormtroopr
LegoStormtroopr / badge.html
Created August 16, 2014 00:40
Font-awesome login badge
<span class="face">
<i class="fg fa fa-user"></i>
</span>
@LegoStormtroopr
LegoStormtroopr / iassist2014.ddi31.xml
Last active August 29, 2015 14:02
IASSIST 2014 Conference evaluation questionnaire metadata
<?xml version="1.0"?>
<ddi:DDIInstance xmlns:ddi="ddi:instance:3_1" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sqbl="sqbl:1"
xmlns:a="ddi:archive:3_1" xmlns:r="ddi:reusable:3_1" xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:d="ddi:datacollection:3_1" xmlns:l="ddi:logicalproduct:3_1" xmlns:c="ddi:conceptualcomponent:3_1"
xmlns:ds="ddi:dataset:3_1" xmlns:s="ddi:studyunit:3_1" xmlns:g="ddi:group:3_1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="x0" version="0.0.1"
agency="com.kidstrythisathome.ddirepo.legostormtroopr">
<g:ResourcePackage id="x1">
<g:Purpose id="x2">
<r:Content />