Skip to content

Instantly share code, notes, and snippets.

http://bit.do/lightningdays
http://developerforce.github.io/lightning-connect-tutorial
http://developerforce.github.io/lightning-process-builder-tutorial
http://developerforce.github.io/lightning-components-tutorial
http://developerforce.github.io/lightning-app-builder-tutorial
@ReidCarlberg
ReidCarlberg / tesselCameraChatter.js
Last active August 29, 2015 14:03
Tessel Salesforce Chatter Camera Climate
/*
by Reid Carlberg
Last update: November 20, 2014
Questions? Ask me on Twitter. https://Twitter.com/ReidCarlberg
Basic use case: monitor range finder. When something is close, snap a picture, post to Salesforce Chatter.
Sign up for a free developer edition to try this code
http://developer.salesforce.com/signup
You'll need to setup a Connected App in your developer edition for OAuth2 stuff. Detailed instructions:
@ReidCarlberg
ReidCarlberg / printer-gateway
Created May 10, 2014 11:16
3D Printer Farm Management with Salesforce1 - Code
var http = require('http');
var request = require('request');
var nforce = require('nforce');
var http = require('http'),
faye = require('faye');
var client;
//salesforce settings
var sfuser = "user@some.name";
var http = require("http");
var Cylon = require('cylon');
var copter1 = Cylon.robot({
connection: {name: 'ardrone', adaptor: 'ardrone', port: '192.168.1.1'},
device: {name: 'drone', driver: 'ardrone'},
reidStart: function(my) {
console.log("reidStart");
my.drone.takeoff();
var http = require('http');
var nforce = require('nforce');
var http = require('http'),
faye = require('faye');
var client;
var AckCounter = 0;
console.log("Welcome to the Drone interface");
@ReidCarlberg
ReidCarlberg / gist:9128823
Created February 21, 2014 04:34
LAB_Hue_HueForce.js
var hue = require("node-hue-api"),
HueApi = hue.HueApi,
lightState = hue.lightState;
var nforce = require('nforce');
var http = require('http'),
faye = require('faye');
var client;
var AckCounter = 0;
var HueApi = require("node-hue-api").HueApi;
var hostname = "192.168.1.103",
newUserName = null // You can provide your own username value, but it is normally easier to leave it to the Bridge to create it
userDescription = "device description goes here";
var displayUserResult = function(result) {
console.log("Created user: " + JSON.stringify(result));
};
var hue = require("node-hue-api");
var displayBridges = function(bridge) {
console.log("Hue Bridges Found: " + JSON.stringify(bridge));
};
// --------------------------
// Using a promise
hue.locateBridges().then(displayBridges).done();
var i2c = require('i2c');
var device1 = new i2c(0x18, {device: '/dev/i2c-1', debug: false});
device1.setAddress(0x4);
var AckCounter = 0;
var nforce = require('nforce');
var http = require('http'),
faye = require('faye');
@ReidCarlberg
ReidCarlberg / WildThumper-I2C
Created February 10, 2014 03:56
I wanted to control an Arduino with a Raspberry Pi and Node.js using I2C.
#include <Servo.h>
#include "IOpins.h"
#include "Constants.h"
#include <Wire.h>
//-------------------------------------------------------------- define global variables --------------------------------------------
unsigned int Volts;
unsigned int LeftAmps;
unsigned int RightAmps;