Skip to content

Instantly share code, notes, and snippets.

@dotdoom
dotdoom / set-chrome-remote-desktop-pin.py
Created March 22, 2018 20:25
Forgot PIN for Linux Remote Desktop, but still have SSH access? Here's a solution. Remember to backup all config files!
#!/usr/bin/env python
# Portions Copyright Chromium Project.
import base64
import hashlib
import hmac
import json
import os
import sys
@dotdoom
dotdoom / i2c.ino
Created June 1, 2016 09:51
An example of doing an i2c slave with Arduino
#define I2CAddress 0x42
void setup() {
Wire.begin(I2CAddress);
// Remember to keep those handlers as time-critical as possible:
// no interrupts will be happening while these are running.
// Also the other end of i2c communication might just
// give up waiting. So keep the logic in loop() and let i2c
// handlers only operate on ready data.
Wire.onReceive(i2cReceive);