Skip to content

Instantly share code, notes, and snippets.

@bgloh
bgloh / serverless.yml
Created September 24, 2020 23:39 — forked from DavidWells/serverless.yml
DynamoDB custom index serverless.yml example
service: service-name
provider:
name: aws
runtime: nodejs6.10
functions:
myfunc:
handler: handler.myfunc
@bgloh
bgloh / 0x00000.bin
Created February 11, 2018 18:34 — forked from ajfisher/0x00000.bin
ESP8266 Transparent bridge to J5
@bgloh
bgloh / golang_on_rpi.md
Created February 10, 2018 01:29 — forked from simoncos/golang_on_rpi.md
Install Golang 1.9 on Raspberry Pi

Install Golang 1.9:

wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile

If already installed old golang with apt-get:

@bgloh
bgloh / MqttSubscribeSample.java
Created January 24, 2018 01:35 — forked from benedekh/MqttSubscribeSample.java
MQTT Asynchronous Subscriber Client Sample based on https://www.eclipse.org/paho/clients/java/
package mqtt.demo;
import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.MqttAsyncClient;
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
@bgloh
bgloh / SimpleMqttClient.java
Last active January 24, 2018 01:36 — forked from m2mIO-gister/SimpleMqttClient.java
Example MQTT Messaging in Java
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.eclipse.paho.client.mqttv3.MqttTopic;
public class SimpleMqttClient implements MqttCallback {
@bgloh
bgloh / sensortag_example.py
Last active June 8, 2017 04:55 — forked from atotto/sensortag_example.py
sensortag example (bluepy)
# import bluepy
from bluepy import sensortag
import math
def main():
import time
import sys
import argparse
parser = argparse.ArgumentParser()