Skip to content

Instantly share code, notes, and snippets.

View IrregularShed's full-sized avatar
🤦‍♂️
Remember the good old days, when we had a future?

Steve Anderson IrregularShed

🤦‍♂️
Remember the good old days, when we had a future?
View GitHub Profile
@IrregularShed
IrregularShed / pt2258.py
Created September 12, 2023 17:18
CircuitPython PT2258 control
import time
import board
from adafruit_bus_device.i2c_device import I2CDevice
i2c = board.I2C() # uses board.SCL and board.SDA
pt2258 = I2CDevice(i2c, 0x44)
# define CHANNEL1_VOLUME_STEP_01 0x90
# define CHANNEL1_VOLUME_STEP_10 0x80
# define CHANNEL2_VOLUME_STEP_01 0x50
@IrregularShed
IrregularShed / scan.py
Created September 12, 2023 17:14
CircuitPython I2C scan
# SPDX-FileCopyrightText: 2017 Limor Fried for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""CircuitPython I2C Device Address Scan"""
# If you run this and it seems to hang, try manually unlocking
# your I2C bus from the REPL with
# >>> import board
# >>> board.I2C().unlock()
@IrregularShed
IrregularShed / README.md
Created January 31, 2019 11:06
SCRIPT-8
@IrregularShed
IrregularShed / FontSinclair.js
Created December 10, 2018 16:17
Sinclair ZX Spectrum-derived Espruino font
/* Glyphs copyright (c) 1982 Sinclair Research Ltd/Amstrad plc/Sky plc. Non-commercial use approved. */
/* Made with ❤ by Steve Anderson/Irregular Shed, 2018. */
/*
Classic 8x8 Sinclair font, taken from a ZX Spectrum, with
* added backtick and Euro symbols
* pounds sterling and copyright symbols moved to standard ISO/IEC 8859-1 locations
Created using http://ebfc.mattbrailsford.com/
a = document.querySelector('#tabset .mdl-tabs__tab-bar a[is-active]:not(.is-active)');
if (a) a.classList.add('is-active');
b = document.querySelector('#tabset .mdl-tabs__panel[is-active]:not(.is-active)');
if (b) b.classList.add('is-active');
@IrregularShed
IrregularShed / ir-codes.md
Last active June 14, 2023 19:13
A variety of IR codes
@IrregularShed
IrregularShed / Dash button MACs.md
Created January 23, 2017 22:57
Addresses for Dash Buttons

Andrex dash button: 50:f5:da:46:23:1b

@IrregularShed
IrregularShed / hey.js
Created October 11, 2016 12:48
Love Javascript
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+
@IrregularShed
IrregularShed / Google Glass Camera Preview Sizes.java
Created November 11, 2014 15:25
All the different valid values for the preview images coming out of a Google Glass camera.
/*
Valid Google Glass Camera preview sizes:
1920x1080, 1280x960, 1280x720, 1024x768, 1024x576, 960x720, 800x480, 768x576, 720x576, 720x480,
768x576, 640x480, 640x368, 640x360, 512x384, 512x288, 416x304, 416x240, 352x288, 320x240,
320x192, 256x144, 240x160, 224x160, 176x144, 160x120, 128x96,
960x1280, 720x1280, 768x1024, 576x1024, 720x960, 480x800, 576x768, 576x720, 576x768, 480x720,
480x640, 368x640, 384x512, 288x512, 304x416, 240x416, 288x352, 240x320, 192x320, 144x256,
160x240, 160x224, 144x176, 120x160, 96x128
*/

Keybase proof

I hereby claim:

  • I am irregularshed on github.
  • I am irregularshed (https://keybase.io/irregularshed) on keybase.
  • I have a public key whose fingerprint is A26A 5052 8F83 EF0D 1107 6741 4A00 553A 57D7 ADE8

To claim this, I am signing this object: