Skip to content

Instantly share code, notes, and snippets.

View gist:7d513cbdde328f38a959
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 Aug 29, 2015
Tessel Salesforce Chatter Camera Climate
View tesselCameraChatter.js
/*
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
3D Printer Farm Management with Salesforce1 - Code
View printer-gateway
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";
View Drone Server Example
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();
View Drone Gateway Example
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 Feb 21, 2014
LAB_Hue_HueForce.js
View gist:9128823
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;
View LAB_Hue_NewUser
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));
};
View LAB_Hue_Bridge
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();
View Wild Thumper - Node.js, Salesforce Streaming API
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 Feb 10, 2014
I wanted to control an Arduino with a Raspberry Pi and Node.js using I2C.
View WildThumper-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;