This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( | |
and ( | |
YEAR(Date_Start__c) == YEAR(TODAY()), | |
IF( | |
CEILING( ( Date_Start__c - DATE( YEAR( Date_Start__c ), 1, 1) + 1) / 7) > 52, | |
52, | |
CEILING( ( Date_Start__c - DATE( YEAR( Date_Start__c ), 1, 1) + 1) / 7) | |
) == | |
IF( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Challenge: deploy node-red to a heroku endpoint. | |
2013/12/27 | |
First challenge -- you have to have red.js listen on process.env.PORT rather than 1880. | |
https://devcenter.heroku.com/articles/getting-started-with-nodejs | |
Second challenge -- web sockets -- node-red uses web sockets, so the server comes up and disconnects right away. | |
When you enable the lab:websockets it doesn't fix it out of the box. | |
https://blog.heroku.com/archives/2013/10/8/websockets-public-beta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you use this as a template, replace IBM Corp. with your own name. | |
// Sample Node-RED node file | |
// Require main module | |
var RED = require(process.env.NODE_RED_HOME+"/red/red"); | |
var nforce = require('nforce'); | |
var http = require('http'), | |
faye = require('faye'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Sample html file that corresponds to the 99-sample.js file --> | |
<!-- This creates and configures the onscreen elements of the node --> | |
<!-- If you use this as a template, replace IBM Corp. with your own name. --> | |
<!-- First, the content of the edit dialog is defined. --> | |
<script type="text/x-red" data-template-name="salesforce in"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Reid Carlberg | |
[email protected] | |
v4 - With updated alarm LED wiring and new DISCO handler | |
v3 - With alarm LED, Longer duration, 00 is key for "ALL DEVICES" | |
v2 - Custom serial scheme & fixed ID | |
v1 - JSON & Random ID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Requires npm installs for | |
* nforce (handles salesforce API) | |
* faye (handles streaming API -- there's an old version in nforce, but install a new one) | |
* serialport (this handles serial communication and will do a little compiling on your machine) | |
Configure Salesforce as follows | |
* Start with a standard developer org -- http://developer.force.com/join | |
* Install the package for the simple Streaming API demo here | |
https://github.com/ReidCarlberg/LAB-Streaming-API-Demo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is a test sketch for the Adafruit assembled Motor Shield for Arduino v2 | |
It won't work with v1.x motor shields! Only for the v2's with built in PWM | |
control | |
For use with the Adafruit Motor Shield v2 | |
----> http://www.adafruit.com/products/1438 | |
This sketch creates a fun motor party on your desk *whiirrr* | |
Connect a unipolar/bipolar stepper to M3/M4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is a test sketch for the Adafruit assembled Motor Shield for Arduino v2 | |
It won't work with v1.x motor shields! Only for the v2's with built in PWM | |
control | |
For use with the Adafruit Motor Shield v2 | |
----> http://www.adafruit.com/products/1438 | |
*/ | |
#include <Wire.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int xInput = A0; | |
const int yInput = A1; | |
const int zInput = A2; | |
void setup() | |
{ | |
Serial.begin(9600); | |
} | |
void loop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Terrible Code written by @ReidCarlberg | |
I promise to refactor it sometime. | |
*/ | |
#include <Wire.h> | |
#include <Adafruit_LSM303.h> | |
#include <Adafruit_NeoPixel.h> | |
#define PIN 6 |