Skip to content

Instantly share code, notes, and snippets.

View proffalken's full-sized avatar

Matthew Macdonald-Wallace proffalken

View GitHub Profile
@proffalken
proffalken / whitelist.txt
Last active April 2, 2020 09:27
whitelist
.google.com
gist.github.com
www.bbc.co.uk
@proffalken
proffalken / Error Message
Last active August 27, 2019 08:26
Yocto Layer
Parsing recipes...done.
Parsing of 2161 .bb files complete (0 cached, 2161 parsed). 3128 targets, 152 skipped, 0 masked, 0 errors.
WARNING: No bb files matched BBFILE_PATTERN_meta-telegraf '^/media/yocto/jenkins/jenkins-meta/jenkins-meta/workspace/eway-os_feature_install_telegraf/lora-gateway-os/build/../../mbc-layers/meta-telegraf/'
NOTE: Resolving any missing task queue dependencies
@proffalken
proffalken / Makefile
Created March 28, 2019 13:16
Platformio Makefile
# Uncomment lines below if you have problems with $PATH
#SHELL := /bin/bash
#PATH := /usr/local/bin:$(PATH)
all:
platformio -f run
upload:
platformio -f run --target upload
@proffalken
proffalken / collaborative_working.md
Created March 15, 2019 11:00
Helpful Blog Posts

Five things your organisation can do to improve Collaborative Working

Collaborative working can be hard to get right, here's our top 5 tips to encourage a culture of success.

Building multi-discipinary teams is a great way to get the best out of your staff

“Collaborative Working is hard“. We’ve heard this from so many of our clients over the years, and often they really struggle with the conflict between [Generalism vs. Specialism][1], and even how to start working in a collaborative manner.

If you go into hospital for a major operation you wouldn’t expect the ward receptionist to administer the anaesthetic, nor would you expect a nurse to carry out the procedure, or the surgeon to perform post-operative care – so why do we expect so many of our software engineers to be “full stack developers”, or our operations teams to have a complete understanding of everything that happens in the process before our product reaches them?

Start by analysing your prod

@proffalken
proffalken / README.md
Last active March 13, 2019 10:09
OTA using MQTT

OTA Firmware Updates for ESP-based devices using MQTT

Use the above as a template for your code.

The device will register with the MQTT server on startup under the topic devices/state/<device_type>/<device_mac> with a device type and a client id.

Use these values to publish JSON with the content {"update_available": 1} to devices/control/<device_type>/<device_mac> when you want to update the firmware.

The firmware should be stored on a webserver under /devices//firmware.bin - this needs work as it means you can only store/deploy a single version of firmware at any given time.

@proffalken
proffalken / README.md
Created February 27, 2019 12:20
Monitoring LoRa Gateway Bridge with DataDog

Monitoring LoRa Gateway Bridge using DataDog

  • Install the DataDog Agent following the instructions on the DataDog website
  • Update the lora-gateway-bridge configuration file with the lines on this gist
  • Create /etc/datadog-agent/conf.d/prometheus.d/conf.yaml with the content from this gist
  • Restart the lora-gateway-bridge and datadog-agent services
  • Check that the metrics are being collected by running datadog-agent check prometheus
@proffalken
proffalken / HeltecGPS.ino
Created February 4, 2019 08:31
Heltec GPS LoRaWAN
#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
#include <U8x8lib.h>
#include <CayenneLPP.h>
#include "TinyGPS++.h"
#include <HardwareSerial.h>
#define BUILTIN_LED 25
#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
#include <U8x8lib.h>
#define BUILTIN_LED 25
// the OLED used
U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ 15, /* data=*/ 4, /* reset=*/ 16);
// Rotate the entire assembly for printing
rotate([90,0,0]) {
// Create the main beam and cut a cylinder that's
// wide enough for the SMA connector to pass through
difference(){
// Main beam, 90x15x5mm
cube([90,15,5]);
// Hole for SMA connector, radius of 5mm,
// smooth the edges by a factor of 200,
@proffalken
proffalken / Example.md
Created May 24, 2018 06:33
Ansible issues

Hey folks, Ansible is messing me around. I've got a load of nested defaults that are setup in <role>/defaults/main.yml as follows:

aaa:
  accounts:
    min_uid: 1000
    max_uid: 60000
    min_system_uid: 500
    max_system_uid: 999
    encryption_method: SHA512