Skip to content

Instantly share code, notes, and snippets.

@pfgray
pfgray / SmartTime.js
Last active December 18, 2015 22:29
turn input boxes into super-usable time inputs!
SmartTime = function(options){
var textBoxes = $(options.inputs);
if(options.onerror && typeof(options.onerror) != 'function'){
console.error('Error: onerror is not a function');
return;
}
var fixTime = function(input){
var hour;
@pfgray
pfgray / client.js
Created June 19, 2014 00:28
NodeDCHelloNodeModules
var dgram = require('dgram');
var client = dgram.createSocket("udp4");
function sendNumber(number){
console.log('sending... ' + number);
var message = new Buffer(number.toString());
client.send(message, 0, message.length, 41234, "192.168.1.243", function(err, bytes) {
sendNumber(number + 1);
});
[
{
"identity": {
"originator_id": "a9a860ae-7c0f-4c12-a1cf-9fe490ee1f49",
"id": "lti-chat"
},
"original": {
"timestamp": "2015-01-02T22:17:00.371Z",
"uri": "http://lti-chat.paulgray.net",
"share": true,
@pfgray
pfgray / casa-apps-old
Last active August 29, 2015 14:12
old-casa-apps
[
{
"identity": {
"originator_id": "a9a860ae-7c0f-4c12-a1cf-9fe490ee1f49",
"id": "lti-chat"
},
"original": {
"timestamp": "2014-12-31T20:28:54.841Z",
"uri": "http://lti-chat.paulgray.net",
"share": true,
[
{
"identity": {
"originator_id": "a9a860ae-7c0f-4c12-a1cf-9fe490ee1f49",
"id": "lti-provider"
},
"original": {
"timestamp": "2015-01-02T22:17:00.371Z",
"uri": "http://lti-provider.paulgray.net",
"share": true,
@pfgray
pfgray / test
Last active August 29, 2015 14:16
testPayloads
[{
"identity":{
"originator_id":"a9a860ae-7c0f-4c12-a1cf-9fe490ee1f49",
"id":"lti-provider"
},
"original":{
"timestamp":"2015-01-02T22:17:00.371Z",
"uri":"http://lti-provider.paulgray.net",
"share":true,
"propagate":true,
@pfgray
pfgray / lti-provider.json
Created April 30, 2015 17:36
Local lti-provider
[{
"identity":{
"originator_id":"a9a860ae-7c0f-4c12-a1cf-9fe490ee1f49",
"id":"local-lti-provider"
},
"original":{
"timestamp":"2015-01-02T22:17:00.371Z",
"uri":"http://lti-provider.paulgray.net",
"share":true,
"propagate":true,
@pfgray
pfgray / campuspack.json
Last active August 29, 2015 14:20
CASA Campus Pack
[
{
"identity": {
"originator_id": "a9a860ae-7c0f-4c12-a1cf-9fe490ee1f49",
"id": "campus-pack"
},
"original": {
"timestamp": "2015-01-02T22:17:00.371Z",
"uri": "http://campuspack.net",
"share": true,
@pfgray
pfgray / casa_content.json
Last active August 29, 2015 14:20
Casa Content
[{
"identity":{
"originator_id":"a9a860ae-7c0f-4c12-a1cf-9fe490ee1f49",
"id":"how-to-hipster"
},
"original":{
"timestamp":"2015-01-02T22:17:00.371Z",
"uri":"http://www.wikihow.com/Be-a-Hipster",
"share":true,
"propagate":true,
@pfgray
pfgray / lti.json
Created May 6, 2015 17:21
Lti items
[{
"identity":{
"originator_id":"a9a860ae-7c0f-4c12-a1cf-9fe490ee1f49",
"id":"local-lti-provider"
},
"original":{
"timestamp":"2015-01-02T22:17:00.371Z",
"uri":"http://lti-provider.paulgray.net",
"share":true,
"propagate":true,