Skip to content

Instantly share code, notes, and snippets.

View olorton's full-sized avatar

Oliver Lorton olorton

View GitHub Profile
olorton / bleak_error.txt
Created June 22, 2021 16:08
example output of intermittent error with bleak
(oxhome-UL5lUEBP) ~/Code/oxhome $ ./
zsh: permission denied: ./
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./
Traceback (most recent call last):
File "./", line 18, in <module>
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/", line 587, in run_until_complete
return future.result()
File "./", line 13, in print_services
async with BleakClient(device) as client:
olorton /
Last active February 11, 2020 11:33

Keybase proof

I hereby claim:

  • I am olorton on github.
  • I am olorton ( on keybase.
  • I have a public key whose fingerprint is 8ED0 0C15 30A0 71A2 5BC4 B3E8 DAA9 233F DBB8 F006

To claim this, I am signing this object:

Verifying that +olorton is my blockchain ID.
olorton / gist:72bf276ec8541129a42e
Created December 22, 2015 11:49
MySQL 5.6 on CircleCI
- - sudo add-apt-repository 'deb precise main'
+ - sudo apt-add-repository -y 'deb precise main'
- - export DEBIAN_FRONTEND=noninteractive; sudo apt-get -y install mysql-server
+ - export DEBIAN_FRONTEND=noninteractive; sudo apt-get -y install mysql-server-5.6
olorton / gist:a00d9c7b46be582d7dd6
Created November 24, 2014 19:49
Dynamically hide the a website in a directory
// Your web folder should look like this:
// /change/index.php <-- this file
// /test-123/ <-- The website that you want to test
// Make sure that you have no other files or folders in the root that begin with 'test' (e.g. /testing)
// When you visit /change/ then the test folder will be moved to a new location,
// you will be provided with a link to that new location.
// Permissions... The root folder should be writable by the webserver (so it can create new folders), and
olorton / provision
Created May 19, 2014 13:39
Anisble provision script
while getopts "v:" OPTION; do
case $OPTION in
v) shift; verbose=true;;
# Unknown option. No need for an error, getopts informs
# the user itself.
\?) exit 1;;
olorton / wordpress-update-email-notification-cron.php
Created February 8, 2014 14:31
Wordpress cron notification email
$details = get_preferred_from_update_core();
$to = ''; // Put your email(s) here
$subject = 'Wordpress upgrade notification';