Skip to content

Instantly share code, notes, and snippets.

View jonathanbarton's full-sized avatar

Jonathan Barton jonathanbarton

View GitHub Profile
@jonathanbarton
jonathanbarton / pizerochromiumkiosk.md
Last active March 25, 2019 18:22
Pi Zero (Jessie/Stretch) Chromium Kiosk Mode
@jonathanbarton
jonathanbarton / swagger.json
Created February 15, 2018 22:18
swagger.json
{"swagger":"2.0","info":{"title":"Course Maps API","description":"API for interacting with Engrade Course Maps","contact":{"name":"Isaac Riceweber","email":"isaac.riceweber@engrade.com"},"version":"v1"},"host":"core-api-c2qastg.lms.nonprod.mheducation.com","basePath":"\/coursemaps\/v1","schemes":["https"],"consumes":["application\/json"],"produces":["application\/json"],"paths":{"\/folders\/{folderid}\/children\/{itemid}\/assignment":{"post":{"tags":["folders"],"description":"Creates an assignment for an item and creates a mapping between the item and assignment","operationId":"assignFolderItem","parameters":[{"name":"folderid","in":"path","description":"Identifier for the folder requested.","required":true,"type":"integer","minimum":1},{"name":"itemid","in":"path","description":"Identifier for the item that will be assigned","required":true,"type":"integer","minimum":1},{"$ref":"#\/parameters\/ContextType"},{"$ref":"#\/parameters\/ContextId"},{"name":"payload","in":"body","description":"Structure for JSON re
@jonathanbarton
jonathanbarton / pycitylookup.py
Created February 6, 2018 14:23
python city lookup
import json
import urllib, urllib2, hashlib
class DataAccessLayer(object):
def __init__(self):
self.cache = None
def __load__(self, file_path):
path_hash = hashlib.md5(file_path).hexdigest()[:7]
file_name = '{}.json'.format(path_hash)
urllib.urlretrieve(file_path, file_name)
@jonathanbarton
jonathanbarton / coursemap.json
Created November 17, 2017 15:38
coursemap.json
{"swagger":"2.0","info":{"title":"Course Maps API","description":"API for interacting with Engrade Course Maps","contact":{"name":"Isaac Riceweber","email":"isaac.riceweber@engrade.com"},"version":"v1"},"host":"core-api-c2qastg.lms.nonprod.mheducation.com","basePath":"\/coursemaps\/v1","schemes":["https"],"consumes":["application\/json"],"produces":["application\/json"],"paths":{"\/folders\/{folderid}\/children\/{itemid}\/assignment":{"post":{"tags":["folders"],"description":"Creates an assignment for an item and creates a mapping between the item and assignment","operationId":"assignFolderItem","parameters":[{"name":"folderid","in":"path","description":"Identifier for the folder requested.","required":true,"type":"integer","minimum":1},{"name":"itemid","in":"path","description":"Identifier for the item that will be assigned","required":true,"type":"integer","minimum":1},{"$ref":"#\/parameters\/ContextType"},{"$ref":"#\/parameters\/ContextId"},{"name":"payload","in":"body","description":"Structure for JSON re
@jonathanbarton
jonathanbarton / swagger.yml
Created October 11, 2017 17:55
swagger.yml
swagger: '2.0'
info:
title: Assess Authoring Service API (implemented)
description: The current development state of the Assess Authoring Service API
version: "0.0.1"
schemes:
- https
basePath: /v1
produces:
- application/json
@jonathanbarton
jonathanbarton / rpi_format_imaging_steps.md
Last active October 3, 2017 15:20
Steps for Cloning / Formatting / Imaging SD Card for Raspberry Pi: OSX

Optional: Displaying Copy Progress

Optionally, you can install pv command to display inline cli progress bars for dd command.

brew install pv

Insert SD and Identify

@jonathanbarton
jonathanbarton / dle-config.js
Last active September 13, 2017 12:44
dle-config.js
(function(appConfig, pubsub){
var config = (function(){ return <?=json_encode($_GLOBAL['app-config'])?> })() || {};
appConfig.get = function() {
return config;
};
appConfig.set = function(key, value) {
if(config[key]) {
config[key] = value;
@jonathanbarton
jonathanbarton / Emilie_loves_code_nodes.md
Created September 13, 2017 11:52
Emilie_loves_code_nodes.md
  • AAS integration with IdM:

    • Outputs: AAUI will dev prototype, AA API will own final endpoints, email to Tariq & BG with requirements for stories DONE
  • Integration of item picker with Assignments

    • Outputs: AAUI to diagram assignments + AA API interaction flow
  • Integration of item picker with AA API

    • Outputs: Write stories