Skip to content

Instantly share code, notes, and snippets.

View jimklo's full-sized avatar

Jim Klo jimklo

View GitHub Profile
@jimklo
jimklo / README.md
Last active June 13, 2021 19:11
Fix for installing MediaTek USB(RT2870/RT2770/RT3X7X/RT537X) driver in OS X Mavericks
@jimklo
jimklo / Pathmaster.py
Created October 1, 2013 20:46
Sublime Text 2 Path Hack
import sublime, sublime_plugin
import os
homebrew_path = [
"/usr/local/bin",
"/usr/local/sbin"
]
class PathmasterCommand(sublime_plugin.TextCommand):
@jimklo
jimklo / build-command.txt
Last active December 21, 2015 05:39
trying to build couchdb master using https://github.com/iriscouch/build-couchdb on ubuntu 12.04.2
rake git="https://github.com/apache/couchdb.git tags/master" install=~/dependencies couchdb_build=~/master
@jimklo
jimklo / replacment-data.json
Created April 29, 2013 20:47
Publishing a LR Delete
{
"documents": [{
"doc_type": "resource_data",
"doc_version": "0.49.0",
"doc_ID": "urn:learningregistry.org:testing:uuid:C134DD8D-6580-4A68-B456-506B07D5A288",
"resource_data_type": "paradata",
"active": true,
"resource_locator": "http://example.com",
"resource_data": {
"testing": "this can be ignored"
@jimklo
jimklo / test_jsonschema.py
Created April 24, 2013 05:20
jsonschema bug
from jsonschema import *
import pprint
working_good_schema = {
"type": "array",
"items": {
"patternProperties": {
"a|b|c": { "type": "string" }
},
"additionalProperties": False
@jimklo
jimklo / lrmi.json
Created April 18, 2013 21:24
Schema.org + LRMI JSON Schema
{
"definitions": {
"MedicalSignOrSymptom": {
"title": "Medical Sign or Symptom",
"anyOf": [
{
"$ref": "#/definitions/MedicalEntity"
}
],
"description": "Any indication of the existence of a medical condition or disease.",
@jimklo
jimklo / validate.py
Created January 25, 2013 04:24
Extension of Julian's jsonschema for use by Learning Registry
# Author: Jim Klo jim.klo[at]sri[dot]com
#
# LICENSE
# Copyright 2013 SRI International
# 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
@jimklo
jimklo / oauth-sample-README.md
Created October 11, 2012 17:38
Learning Registry OAuth Sample

OAuth Sample

This is a trivial example of publishing to Learning Registry using OAuth 1.0 authored in python 2.7.

To use, you will need to install the oauth2 library:

    pip install oauth2
@jimklo
jimklo / The Missing Manual.md
Created August 17, 2012 20:20
The Missing Manual for Opteka BP-SC4000 Ultra Thin Solar Powered High Capacity (4000mAh) Backup Battery and Charger

Here's the owners manual they should have included with the Opteka BP-SC4000 Backup Battery and Charger that's sold on Amazon: http://www.amazon.com/Opteka-BP-SC4000-Powered-Capacity-4000mAh/dp/B005ZSVZRY

  1. When placed in direct sun light, the four LEDs at the bottom right of the device will flash from left to right. The rate at which they are flashing indicates the rate at which the internal battery is being charged. The faster they flash, the more power you are getting from the sun. Put the solar cells in direct sun light for maximum charge.

  2. When the device is fully charged (although it does not have to be fully charged to attempt to charge your device) all the LEDs will go out.

  3. While the battery is charging (and the LEDs are flashing) you can press the silver button quickly to see an indication of the internal power level of the battery. (1 LED = 1/4 charge, 2 = 1/2 charge, 3 = 3/4 charge, and *none) = fully charged)

  4. To charge your device, plug it into the included USB adapter. If the solar L

@jimklo
jimklo / a-spidermonkey-test.js
Created July 2, 2012 22:43
OpenPGP.js with SpiderMonkey example
// make check for navigator properties not fail.
var navigator = {};
// support some basic HTML5 localStorage operations
function _localStorage() {
this.ls = {};
this.getItem = function(key) {