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
[ | |
{ | |
"busId": "1", | |
"routeId": "", | |
"name": "Princess Alice Terminal to Speightstown Terminal", | |
"num": "1", | |
"stops": [] | |
}, | |
{ | |
"busId": "2", |
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
{ | |
"cities": [ | |
"Aquat Village", | |
"Arima", | |
"Arnos Vale", | |
"Aranguez", | |
"Arouca", | |
"Auzonville", | |
"Avocat", | |
"Blanchisseuse beach", |
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
'use strict'; | |
//lambda endpoint - https://xxxxxxx.execute-api.us-east-1.amazonaws.com/prod/whatever-you-call-it?text={{TextField}}&time={{CreatedAt}} | |
//https://github.com/pmorjan/paho-node | |
/* | |
git clone https://github.com/pmorjan/paho-node.git | |
cd paho-node | |
npm install | |
wget https://raw.githubusercontent.com/eclipse/paho.mqtt.javascript/v1.0.2/src/mqttws31.js |
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
'use strict'; | |
//lambda endpoint - https://xxxxxxx.execute-api.us-east-1.amazonaws.com/prod/whatever-you-call-it?text={{TextField}}&time={{CreatedAt}} | |
//https://github.com/pmorjan/paho-node | |
/* | |
git clone https://github.com/pmorjan/paho-node.git | |
cd paho-node | |
npm install | |
wget https://raw.githubusercontent.com/eclipse/paho.mqtt.javascript/v1.0.2/src/mqttws31.js |
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
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266HTTPClient.h> | |
#include <ESP8266httpUpdate.h> | |
#define USE_SERIAL Serial | |
#define SKETCH_NAME "app222le112122" | |
//#define LAMBDA_URL "https://xxxx.execute-api.us-east-1.amazonaws.com/prod/iot-update-handler" | |
//#define SSL_SIGNATURE "xx xx xx ... xx" |
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
'use strict'; | |
const personalAllowance = 25000; | |
const calculateTaxes = (taxBrackets, taxableAllowance) => { | |
const taxInfo = taxBrackets.reduce( | |
(accumulator, taxBracket) => { | |
if (accumulator.remainingAmountToBeTaxed <= 0) { | |
return accumulator; | |
} |
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
'use strict'; | |
var AWS = require('aws-sdk'); | |
AWS.config.update({ | |
accessKeyId: process.env.S3_ACCESS_KEY_ID, | |
secretAccessKey: process.env.S3_ACCESS_KEY_SECRET, | |
region: 'us-east-1' | |
}); |