Skip to content

Instantly share code, notes, and snippets.

#include <Arduino.h>
#include "I2Cdev.h"
#include "MPU6050_6Axis_MotionApps20.h"
#include <Adafruit_BME280.h>
MPU6050 mpu;
int const INTERRUPT_PIN = 6;
bool DMPReady = false;
uint8_t devStatus;
@tomwardill
tomwardill / iosimap.py
Created November 2, 2024 16:23
Replication of iOS failure to load messages in IMAP
from datetime import datetime
from twisted.cred import portal, credentials
from twisted.internet import protocol, defer, task
from twisted.mail import imap4
from zope.interface import implementer
from twisted.mail import imap4
from zope.interface import implementer
Install the latest vscode or insiders. Minimum version needs to support the https://code.visualstudio.com/docs/remote/remote-overview features.
Install 'Remote SSH' plugin
ctrl-shift-p -> Remote SSH Connect to Host
Configure for your launchpad LXD
ctrl-shift-p: Remote install extensions in <container name>
This will install all your local extensions to the remote container. At a minimum, you're going to need the Python extension
### Keybase proof
I hereby claim:
* I am tomwardill on github.
* I am tomwardill (https://keybase.io/tomwardill) on keybase.
* I have a public key whose fingerprint is 8137 5031 99B3 76C5 FF04 39BE 2CA4 DB81 6597 D2C1
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am tomwardill on github.
  • I am tomwardill (https://keybase.io/tomwardill) on keybase.
  • I have a public key whose fingerprint is 1FCA CBEC 89B3 A14B 17AC 783D A22F 82E1 09AC F172

To claim this, I am signing this object:

@tomwardill
tomwardill / PowerCost.py
Created July 15, 2012 15:30
Power monitoring with Server Density
from StringIO import StringIO
from datetime import datetime
import serial
from lxml import etree
class PowerCost:
def __init__(self, agentConfig, checksLogger, rawConfig):
self.agentConfig = agentConfig
self.checksLogger = checksLogger
@tomwardill
tomwardill / gist:1127647
Created August 5, 2011 14:25
rb_fsevent fail install
gem install rb-fsevent
Fetching: rb-fsevent-0.4.2.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rb-fsevent:
ERROR: Failed to build gem native extension.
/Users/tomwardill/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
creating Makefile
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -mdynamic-no-pic -std=gnu99 -Os -pipe -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wuninitialized -Wunknown-pragmas -Wshadow -Wfour-char-constants -Wsign-compare -Wnewline-eof -Wconversion -Wshorten-64-to-32 -Wglobal-constructors -pedantic' /usr/bin/gcc -isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -mdynamic-no-pic -std=gnu99 -dead_strip -framework CoreServices -o '/Users/tomwardill/.rvm/gems/ruby-1.9.2-p290/gems/rb-fsevent-0.4.2/bin/fsevent_watch' fsevent/fsevent_watch.c
fsevent/fsevent_watch.c:1:19: error: stdio
@tomwardill
tomwardill / .gitconfig
Created May 20, 2011 14:00
Magic git log, shamelessly stolen from https://github.com/wrboyce
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
@tomwardill
tomwardill / gist:927873
Created April 19, 2011 13:54
FakeEmail buildout
[buildout]
develop = src/
parts =
fakeemail-eggs
python
fakeemail
versions = versions
smtp-port = 2025
web-port = 8000