Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am rbramley on github.
  • I am rbramley (https://keybase.io/rbramley) on keybase.
  • I have a public key ASC71to_cVAewQ77VuUV4CpZEqsRJahjOmNulEO_B1CJ4Qo

To claim this, I am signing this object:

@rbramley
rbramley / CloudEvents-0.1.avsc
Created Apr 6, 2018
CloudEvents 0.1 Avro schema (draft)
View CloudEvents-0.1.avsc
{
"namespace": "CloudEvents",
"type": "record",
"name": "Event",
"fields": [
{"name": "cloudEventsVersion", "type": "string", "doc": "The version of the CloudEvents specification which the event uses. This enables the interpretation of the context."},
{"name": "eventType", "type": "string", "doc": "Type of the event data. Producers can specify the format of this, depending on their service. This enables the interpretation of data, and can be used for routing, policy and more."},
{"name": "eventTypeVersion", "type": ["null", "string"], "doc": "The version of the event-type. This enables the interpretation of data by eventual consumers, requires the consumer to be knowledgeable about the producer."},
{"name": "source", "type": "string", "doc": "This describes the event producer. Often this will include information such as the type of the event source, the organization publishing the event, and some unique idenfitiers. The exact syntax and semantics behind the data encoded in the URI is e
@rbramley
rbramley / AndroidEmailAccounts.groovy
Created Sep 22, 2015
Companion gist for email extraction to list accounts & mailboxes
View AndroidEmailAccounts.groovy
/**
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved. This file is offered as-is,
* without any warranty.
*
* Script to list accounts/mailboxes from an Android ADB email dump.
*
* @author Robin Bramley (c) 2015
*/
View AndroidEmailExtractor.groovy
/**
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved. This file is offered as-is,
* without any warranty.
*
* Script to take an Android ADB email dump and process emails to .eml RFC822
* format files. Does not handle attachments/multipart at present.
*
* <em>Notes:</em>
@rbramley
rbramley / blueprints_rdf_graphsail_neo4j.groovy
Created Jan 7, 2014
An executable Groovy script to create and query some simple RDF statements within a Neo4j database using the Blueprints GraphSail ouplementation. Based on sample code from the Tinkerpop wiki: https://github.com/tinkerpop/blueprints/wiki/Sail-Ouplementation It sources dependencies from Maven Central using Grape.
View blueprints_rdf_graphsail_neo4j.groovy
@Grab(group='com.tinkerpop.blueprints', module='blueprints-neo4j-graph', version='2.4.0')
@Grab(group='com.tinkerpop.blueprints', module='blueprints-graph-sail', version='2.4.0')
@Grab(group='org.openrdf.sesame', module='sesame-repository-sail', version='2.7.8')
@Grab(group='org.openrdf.sesame', module='sesame-queryparser-sparql', version='2.7.8')
import com.tinkerpop.blueprints.*
import com.tinkerpop.blueprints.oupls.sail.GraphSail
import com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph
import info.aduna.iteration.*
@rbramley
rbramley / IssueMigrator.groovy
Created Mar 2, 2013
Script to migrate GoogleCode issues
View IssueMigrator.groovy
/**
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved. This file is offered as-is,
* without any warranty.
*
* Migrate issues from one Googlecode project to another (e.g. if you need to rename).
* Note (line 39): fetch of issues from source project currently limited to 50
*
* See: http://code.google.com/p/support/wiki/IssueTrackerAPI for API details
@rbramley
rbramley / walk_and_count.groovy
Created May 4, 2012
Quick & dirty Groovy scripts for processing Freemind leaf nodes
View walk_and_count.groovy
/**
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved. This file is offered as-is,
* without any warranty.
*
* @author Robin Bramley (c) 2012
*
* Groovy script to walk a Freemind node tree and count occurrences of leaf terms.
*/
@rbramley
rbramley / CreateSonarPom.groovy
Created Jul 29, 2011
A Grails Gant script to create a Maven POM for the Sonar Groovy Plugin
View CreateSonarPom.groovy
/*
* Copyright 2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rbramley
rbramley / map_counter_bump.groovy
Created Jun 24, 2011
Groovy meta-programming to 'bump' a counter in a map
View map_counter_bump.groovy
/**
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved. This file is offered as-is,
* without any warranty.
*
* @author Robin Bramley (c) 2011
*
* Groovy meta-programming to 'bump' a counter in a map for conciseness.
*/
@rbramley
rbramley / DuplicateId_LuceneIndexWalker.groovy
Created Jun 23, 2011
Script to walk an unoptimised Lucene index to determine how many deletions were due to updates
View DuplicateId_LuceneIndexWalker.groovy
/**
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved. This file is offered as-is,
* without any warranty.
*
* @author Robin Bramley (c) 2011
*
* Purpose:
* Of the deletions in an unoptimised Lucene index, how many were