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_WS2801.h" | |
#include "SPI.h" // Comment out this line if using Trinket or Gemma | |
#ifdef __AVR_ATtiny85__ | |
#include <avr/power.h> | |
#endif | |
// 2 pins used for output. | |
uint8_t dataPin = 2; // Yellow wire on Adafruit Pixels | |
uint8_t clockPin = 3; // Green wire on Adafruit Pixels |
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 https = require('https'); | |
// For information about Uber http status codes see: https://developer.uber.com/docs/api-reference | |
const successfully_cancelled_uber_status_code = 204; | |
// For information about Uber tokens see: https://developer.uber.com/docs/authentication | |
const token = process.env.TOKEN; | |
function cancelUber(event, context) { | |
var headers = { |
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 https = require('https'); | |
// For information about Uber http status codes see: https://developer.uber.com/docs/api-reference | |
const uber_surge_pricing_status_code = 409; | |
function requestUber(event, context, product_id, surge_confirmation_id) { | |
// MOAR CODE | |
// Uber has surge pricing |
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 https = require('https'); | |
// For information about Uber http status codes see: https://developer.uber.com/docs/api-reference | |
const successfully_requested_uber_status_code = 202; | |
const start_latitude = 37.7749; // Lat SF | |
const start_longitude = -122.4194; // Long SF | |
// For information about Uber tokens see: https://developer.uber.com/docs/authentication | |
const token = process.env.TOKEN; |
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
const uberx_id = 'a1111c8c-c720-46c3-8534-2fcdd730040d'; // UberX SF | |
const uberblack_id = 'd4abaae7-f4d6-4152-91cc-77523e8165a4'; // UberBlack SF | |
const single_click = 'SINGLE'; | |
const double_click = 'DOUBLE'; | |
const long_click = 'LONG'; | |
function callUber(event, context) { | |
if (event.clickType === single_click) { | |
requestUber(event, context, uberx_id) |