Skip to content

Instantly share code, notes, and snippets.

Jonathan Batchelor jmb

  • Hampshire, UK
Block or report user

Report or block jmb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jmb /
Created Jul 14, 2018
Script to extract all email addresses from all emails in all folders of an IMAP account.
"""Create a connection to an IMAP server and find ALL email addresses
Original script by abought:
__author__ = 'jmb'
import email
jmb /
Created Sep 25, 2016
A quick and simple demo of the APA102_Pi library which fades the entire LED strip from green through to red then blue and back to green.
import apa102
import signal
from time import sleep
numLEDs = 60
globalBrightness = 5
stepDelay = 0.1
jmb /
Last active Jan 27, 2019
MQTT Data Subscriber for Dashing


Dashing job to subscribe to MQTT messages.

MQTT is a lightweight publish/subscribe messaging transport. This job allows Dashing to subscribe to these messages and send them as events. There is no associated widget as the data can take any form - commonly numbers, but not necessarily. The script as laid out below sends events with value, current (the same contents) and last values so can be plugged directly into the Numbers or Meter widgets using the data-id in the dashboard file. The send_event could easily be modified if required.

Set up

Add to Gemfile:

jmb /
Last active Feb 14, 2019
Google Calendar API v3 widget for Dashing


Dashing widget to display the next and some subsequent Google Calendar events using the Google Calendar API v3.

I use this widget to display my shift calendar - see the screenshot below

Set up

This widget works with API v3 and requires a service account to be set up via the Google Developer's Console. Once a project is set up, enable the Calendar API. On the Credentials page create a new OpenID and download the p12 key file - set up the path to this file in the job file and grant the email address access to the relevant calendar.

You can’t perform that action at this time.