This file contains 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
var output = {}; | |
if ( msg.tweet.text.match(/(love)/i) != null) { | |
output.increment = 1; | |
} | |
if ( msg.tweet.text.match(/(hate)/i) != null ) { | |
output.decrement = 1; | |
} |
This file contains 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
var querystring = require( 'querystring' ); | |
var Buffer = require( 'buffer' ).Buffer; | |
var request = require( 'request' ); | |
var EVE = { | |
client_id: null, | |
client_secret: null, | |
redirect_url: null, | |
scope: [], | |
access_token: null, |
This file contains 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
var num_names = 45; | |
var firstnames = [ | |
"Amelia","Oliver","Olivia","Jack","Emily", | |
"Harry","Isla","George","Ava","Jacob", | |
"Ella","Charlie","Jessica","Noah","Isabella", | |
"William","Mia","Thomas","Poppy","Oscar", | |
"Sophie","James","Sophia","Muhammad","Lily", | |
"Henry","Grace","Alfie","Evie","Leo", | |
"Scarlett","Joshua","Ruby","Freddie","Chloe", |
This file contains 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
var PDFDocument = require( 'pdfkit' ); | |
This file contains 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
var PDFDocument = require( 'pdfkit' ); | |
This file contains 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
var __config = __dirname + '/config/config.json'; | |
var __src = __dirname + '/src'; | |
var __js = __src + '/js'; | |
var config = require( __config ), | |
db = require( __js + '/database' ).connect( config.mongo ); | |
var Permissions = db.Permissions, | |
Members = db.Members, | |
Payments = db.Payments, |
This file contains 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
void setup() { | |
// Start the serial port at 38.4K | |
Serial.begin( 38400 ); | |
// Set volume | |
Serial.print( "v" ); | |
Serial.write( 0 ); // 0 = maximum volume, 255 = minimum volume | |
} | |
void loop() { |
This file contains 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
#include <MPR121.h> | |
#include <Wire.h> | |
#define numElectrodes 12 | |
void setup() { | |
Serial.begin( 9600 ); | |
Wire.begin(); | |
// Setup MPR121 |
This file contains 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
PImage redImg, greenImg, blueImg; | |
PImage createChannel(float r, float g, float b) { | |
PGraphics pg = createGraphics(200, 200); | |
pg.beginDraw(); | |
pg.background(0x00); | |
pg.stroke(r, g, b); | |
pg.strokeWeight(20); | |
pg.noFill(); | |
pg.rect(0.5 * pg.width, 0.5 * pg.height, pg.width - 130, pg.height - 180); |
This file contains 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
#include <Adafruit_NeoPixel.h> | |
#define PIN 6 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel( 30, PIN, NEO_GRB + NEO_KHZ800 ); | |
void setup() { | |
Serial.begin( 9600 ); | |
strip.begin(); | |
strip.show(); |
NewerOlder