I hereby claim:
- I am azdle on github.
- I am psbarrett (https://keybase.io/psbarrett) on keybase.
- I have a public key whose fingerprint is E520 BFB2 9876 288A D460 4442 58E8 B2F2 D323 B505
To claim this, I am signing this object:
| // this is an example of using a base64 image in an exosite portals widget | |
| function( container, portal ) | |
| { | |
| // this is the actual image, you can generate this string on most | |
| // mac/linux computers by using `base64 image.png` from the command line | |
| var base64_image = "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="; | |
| // helpful for debugging | |
| console.log('widget refresh'); |
| var _ = require('underscore'), | |
| async = require('async'), | |
| page = require('webpage').create(), | |
| system = require('system'); | |
| if (system.args.length !== 3) { | |
| console.log('Usage: count.js <min_id> <max_id>'); | |
| phantom.exit(); | |
| } |
I hereby claim:
To claim this, I am signing this object:
| local exosite = require 'exosite' | |
| local json = require 'dkjson' | |
| local exo = exosite.rpc:new{cik = "9829879a04efb8f4a1b42e22245739678fd4a94e"} | |
| local status, response = exo:create{ | |
| "dataport", | |
| { | |
| format = "float", | |
| name = "Temperature", |
| /* | |
| ** Exosite Modifcations By Patrick Barrett <patrickbarrett@exosite.com> | |
| ** Modified 03-09-2014 | |
| ** | |
| ** Note: This runs on the Arduino Yun, but requires modifications to the libraries, | |
| ** provided by Sparkfun, to use software I2C (https://github.com/greiman/DigitalIO) | |
| */ | |
| /* | |
| Based on the work by |
| coap(<<Version:2, Type:2, TKL: 4, Code:8, MID:16, Token:TKL/bytes, Tail/bytes>>) when Version =:= 1-> | |
| {Options, Payload} = coap_parse_options(Tail), | |
| {coap, {Type, Code, MID, Token, Options, Payload}}. | |
| coap_parse_options(OptionBin) -> | |
| coap_parse_options(OptionBin, 0, []). | |
| coap_parse_options(<<>>, _LastNum, OptionList) -> | |
| {OptionList, <<>>}; | |
| coap_parse_options(<<16#FF, Payload/bytes>>, _LastNum, OptionList) -> |
| //***************************************************************************** | |
| // | |
| // wifi_read_write_string - A Simple read/write to the Exosite Cloud API | |
| // for the Arduino WiFi shield using the | |
| // String library | |
| // | |
| // Copyright (c) 2013 Patrick Barrett - All rights reserved. | |
| // | |
| // Redistribution and use in source and binary forms, with or without | |
| // modification, are permitted provided that the following conditions are met: |
| // Class for Communication to Exosite - No Need to Edit | |
| class Exosite{ | |
| cik = null; | |
| vendor = null; | |
| model = null; | |
| serial = null; // Consider hardware.getimpeeid() or imp.getmacaddress() | |
| constructor(cikp = null, vendorp = null, modelp = null, serialp = null){ | |
| if(cikp == null){ | |
| server.log("No CIK, need to provision.") |
| { | |
| "uuid": "14683333-c12a-451d-ad88-307d8a7e8384", | |
| "shortName": "Test App", | |
| "longName": "Test App", | |
| "companyName": "Me", | |
| "versionCode": 1, | |
| "versionLabel": "0.0.1", | |
| "watchapp": { | |
| "watchface": false | |
| }, |