Skip to content

Instantly share code, notes, and snippets.

View andrewhayward's full-sized avatar

Andrew Hayward andrewhayward

View GitHub Profile
#!/usr/bin/env python
from optparse import OptionParser
import os
import re
import datetime
def main():
usage = "usage: %prog [options] host ..."
@andrewhayward
andrewhayward / badge-class.json
Created June 4, 2014 09:27
JSON Schema for Badge Class v1.0
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Badge Class",
"description": "The definition of an available achievement.",
"type": "object",
"required": [
"name",
"description",
"image",
"criteria",
@andrewhayward
andrewhayward / schema.sql
Last active December 30, 2015 06:19
Potential database schema for openbadger API
DROP TABLE IF EXISTS `system`;
CREATE TABLE `system` (
`systemId` INT NOT NULL AUTO_INCREMENT,
`slug` VARCHAR(20) UNIQUE NOT NULL,
`name` VARCHAR(255) NOT NULL,
`image` BLOB,
`deleted` BOOLEAN NOT NULL,
PRIMARY KEY (`systemId`)
);
@andrewhayward
andrewhayward / badgeindex-schema.json
Created October 30, 2013 14:40
Various potential schema for badge indexing.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Badge List",
"description": "An index of available Open Badge lists",
"type": "object",
"required": ["badgeindex"],
"additionalProperties": false,
"properties": {
"badgeindex": {
"description": "Container for a set of badge lists.",