Skip to content

Instantly share code, notes, and snippets.

View jimklo's full-sized avatar

Jim Klo jimklo

View GitHub Profile
@jimklo
jimklo / Dockerfile
Last active August 26, 2016 00:42
Dockerized Jenkins
FROM jenkins
MAINTAINER jim.klo@xxx.com
ENV REFRESHED_AT Thu Aug 25 15:48:21 PDT 2016
ENV JENKINS_OPTS --prefix=/jenkins
USER root
RUN echo "${JENKINS_VERSION}" > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state && \
windows.vm.synced_folder synced_folder, "/cygdrive/c/vagrant_sync", type: "rsync",
rsync__exclude: [ ".git/", "sunflower-*/", "delta-packs/", "*.box" ],
rsync__args: ["--verbose", "--archive", "--delete", "-z", "--copy-links", "--progress"]
@jimklo
jimklo / SampleViewController.java
Created January 8, 2014 20:49
JavaFX Context Menus broken in when using E3 FXViewPart
package com.sri.sunflower.fxquery;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.scene.control.ListView;
@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