Skip to content

Instantly share code, notes, and snippets.

View willcharlton's full-sized avatar

Will Charlton willcharlton

  • Minneapolis, MN
View GitHub Profile
@willcharlton
willcharlton / api-not-found.log
Last active August 2, 2022 12:52
Full log of buildozer error
+ /home/will/jenkinsworkdir/workspace/kivymd_playground/android-8.1.0/cmdline-tools/latest/bin/sdkmanager platforms;android-27
+ yes
Loading package information...
Loading local repository...
[ ] 3% Loading local repository...
[ ] 3% Fetch remote repository...
[= ] 3% Fetch remote repository...
[= ] 4% Fetch remote repository...
[= ] 5% Fetch remote repository...
[== ] 5% Fetch remote repository...
@willcharlton
willcharlton / pinny.py
Created December 13, 2021 05:33
Micropython Essentials
"""
Self-contained GPIO monitor that implements a notify on push and for how long button was pushed.
The purpose of Pinny is to provide a drop-in monitoring solution for monitoring an individual GPIO
pin on a system running micropython.
The basic way it functions is by using a `deque()` object that it appends integer values to which
signify that the button (GPIO Pin) was triggered and for how long (seconds). You can check the
length of the queue or implement other means of notifying your application of GPIO activity.
@willcharlton
willcharlton / fun-python-projects.md
Created October 11, 2021 14:08
A collection of awesome Python projects I run across from time to time.
@willcharlton
willcharlton / docker-shared-volume.sh
Created August 28, 2021 01:09
Correct way to share socket and other file types between Docker Containers
# create volume for sharing
docker volume create shared-volume
# start one of your containers with the new volume mounted to a directory that the two containers will share
docker \
run --rm --init \
-v shared-volume:/shared/files \
<container_name>
# start the other with the same shared volume mounted to the same filesystem path
@willcharlton
willcharlton / Makefile
Created June 22, 2021 19:26 — forked from lumengxi/Makefile
Makefile for Python projects
.PHONY: clean-pyc clean-build docs clean
define BROWSER_PYSCRIPT
import os, webbrowser, sys
try:
from urllib import pathname2url
except:
from urllib.request import pathname2url
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
endef
@willcharlton
willcharlton / aws-iot-mosquitto
Created May 28, 2019 19:40 — forked from lashex/aws-iot-mosquitto
Example Mosquitto CLI pub/sub using AWS IoT MQTT endpoint
The Mosquitto Pub CLI
$> mosquitto_pub --cert thing-0.pem --key thing-0.prv --cafile aws-iot-rootCA.crt -h XXXXXXXXYYYYY.iot.us-west-2.amazonaws.com -p 8883 -t 'test/thing' -m "Hello from Mosquitto"
The Mosquitto Sub CLI
$ mosquitto_sub --cert thing-0.pem --key thing-0.prv --cafile aws-iot-rootCA.crt -h XXXXXXXXYYYYY.iot.us-west-2.amazonaws.com -p 8883 -t 'test/+'
@willcharlton
willcharlton / rpi-interfaces-wpa-supplicant
Created February 28, 2019 16:16
The `/etc/network/interfaces` file of a raspberry pi to configure `wlan0` to use the `wpa_supplicant.conf` file.
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto wlan0
allow-hotplug wlan0
@willcharlton
willcharlton / mqtt_client_app.c
Last active January 28, 2019 21:46
TI CC3220SF-LAUNCHXL Connector to Murano MQTT
/*
* Copyright (c) 2016, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@willcharlton
willcharlton / edged
Created August 20, 2018 18:59
SysV Init Script for ExoEdge
#!/bin/bash
# SysV init script for edged
# Installation:
# 1. cp edged /etc/init.d/
# 2. chmod 755 /etc/init.d/edged
# 3. chown root:root /etc/init.d/edged
# 4. update-rc.d edged defaults 90 90
@willcharlton
willcharlton / pki-integration-sequence-diagram.md
Last active December 29, 2020 15:25
Sequence Diagram for PKI Integration Workshop for IoT Fuse 2018.

Main Sequence Diagram

[LI