Skip to content

Instantly share code, notes, and snippets.

View ckcherry23's full-sized avatar
🍉
Focusing

Charisma Kausar ckcherry23

🍉
Focusing
View GitHub Profile
@David-Lor
David-Lor / MQTTSubscribe.sh
Created July 11, 2019 12:29
Shell Script to subscribe to MQTT and execute a callback
#!/bin/bash
# This script subscribes to a MQTT topic using mosquitto_sub.
# On each message received, you can execute whatever you want.
while true # Keep an infinite loop to reconnect when connection lost/broker unavailable
do
mosquitto_sub -h "127.0.0.1" -t "test" | while read -r payload
do
# Here is the callback to execute whenever you receive a message:
@reggie3
reggie3 / BraintreeLambda.js
Last active November 2, 2021 11:20
Braintree Node Server Lambda
/***********************************************************************************
AWS Lambda boilerplate for API functions
This boilerplate is designed to be used with AWS API gateway and to return information
to a client
***********************************************************************************/
const util = require("util");
// - provide access to aws-sdk
//const AWS = require('aws-sdk');