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 / CA.md
Last active June 8, 2022 01:14
A simple flask server that functions as a very basic Certificate Authority.

Basic Certificate Authority

This is a simple server that signs CSRs and responds with the signed Client Cert.

Instructions on how to run this server:

make setup
make serve
@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 / maps_url.py
Last active July 2, 2021 10:40
Python (3) snippet to generate google maps url and timezone for a given address.
#!/usr/bin/env python3
"""
So far only tested on python3 interpreter.
Given an address, this script outputs a google maps url to the address.
"""
import requests, sys, time
from urllib.parse import quote_plus
@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 / pki-integration.uml
Last active December 29, 2020 16:54
Sequence diagram for becoming a CA, an IoT Platform and securely provisioning devices.
@startuml
skinparam backgroundColor Azure
skinparam sequenceMessageAlign center
skinparam NoteBackgroundColor DarkOrange
skinparam NoteBorderColor Black
skinparam NoteFontName Lucida Console
skinparam NoteFontSize 18
@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

@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/+'