Skip to content

Instantly share code, notes, and snippets.

View johnnyman727's full-sized avatar

Jon johnnyman727

  • Arcadia
  • Seattle, WA
View GitHub Profile
@johnnyman727
johnnyman727 / rust-on-tessel.md
Last active July 26, 2016 21:41
The current state of running Rust on Tessel.
@johnnyman727
johnnyman727 / openwrt-sdk-osx-compile.md
Last active June 16, 2019 19:29
Steps for compiling the OpenWRT SDK on OSX
  1. Install dependencies: brew install sdl openssl gettext
  2. Add the bin folder of gettext to your path: export PATH=$PATH:/usr/local/Cellar/gettext/0.19.4/bin
  3. Go through steps 1-9 here
  4. git clone --recursive https://github.com/tessel/openwrt-tessel.git
  5. cd openwrt-tessel
  6. Replace openwrt/tools/mkimage/Makefile with the file included in this Gist of the similar name (an artifact of OSX being unable to link against SSL development headers). Make sure to change lines 35 and 36 with a valid link to the openssl library brew installed in the previous step, if necessary. I created it by combining this debugging suggestion which didn't work and this updated file on master which also didn't work on its own.
  7. make V=99
/Applications/Xcode.app/Contents/

Construction

let mut tessel = Tessel::new();

#I2C

// Perhaps we want an Option here for frequency?
let i2c = tessel.port.a.I2C(address: u8, frequency: u32);
// Sending a buffer, no return val
@johnnyman727
johnnyman727 / arcadia.py
Last active August 10, 2022 13:05 — forked from alejoar/arcadia.py
Python Webhook signature validation for Arc
import hashlib
import hmac
import time
import starlette
WEBHOOK_SIGNING_KEY = "<YOUR_WEBHOOK_SIGNING_KEY>"
SECONDS_TO_STALE = 300 # 5 minutes