Skip to content

Instantly share code, notes, and snippets.

View jeriley's full-sized avatar

Jesse jeriley

View GitHub Profile
@jeriley
jeriley / java-ish.xsl
Created January 7, 2015 19:49
V1 Meta to java classes
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stylesheet
[
<!ENTITY mdash "&#8212;">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<head>
@jeriley
jeriley / Update Story Example.ps1
Last active August 29, 2015 14:12
V1Api example : powershell
$username = "admin"
$password = "admin"
$instance = "http://localhost/VersionOne.Web/"
$base64ed = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($($username + ":" + $password)))
$storyId = "S-01001"
$story = GetStoryByID $storyId
UpdateAsset $story "<Asset><Attribute name='Description' act='set'>Descript Insert!</Attribute></Asset>"
#disabled because this will update a pile of stories -- be careful!
@jeriley
jeriley / book.js
Last active August 29, 2015 14:07
example plugins for the leapmotion, also note you'll need underscorejs
Leap.plugin('book', function(options) {
options || (options = {});
options.frameDuration || (options.frameDuration = 20);
var toDegrees = 180/Math.PI;
var sendEvent = _.debounce(function(eventName, controller){
console.log(eventName);
$.jGrowl(eventName);
controller.emit(eventName);
@jeriley
jeriley / FullMultiMock.cls
Last active August 29, 2015 14:02
Salesforce Apex http callout test helper and example
public class FullMultiMock implements HttpCalloutMock {
private integer urlCount { get; set; }
private List<MockCallout> mockCallouts {get; set;}
public FullMultiMock(List<MockCallout> callouts){
system.debug('callouts : ' + callouts);
mockCallouts = callouts;
urlCount = 0;
}
@jeriley
jeriley / V1Api.cls
Last active August 29, 2015 14:00
Example of Apex code for sending a Story to VersionOne
public class V1Api {
private V1BasicConnector;
public V1Api(){
V1BasicConnector = new V1BasicConnector('https://www99.host.com/myInstance', 'admin', 'admin');
}
public void CreateStory(V1Story story)
{
Dom.Document doc = new Dom.Document();