Skip to content

Instantly share code, notes, and snippets.

@nicktoumpelis
nicktoumpelis / repo-rinse.sh
Created April 23, 2014 13:00
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@LukeLambert
LukeLambert / uvcsnapshot.py
Last active May 23, 2022 14:01
A quick-and-dirty script to grab a JPEG snapshot from a Ubiquiti camera at a specified interval.
#!/usr/bin/env python
"""Grab a JPEG snapshot from a Ubiquiti camera at a specified interval.
Usage: python uvcsnapshot.py -i INTERVAL -c CAMERA -p PASSWORD -o OUTPUT
Required arguments:
-i interval in seconds
-c camera IP address
-p camera password
-o path to output directory
@wido
wido / mkteslaemmcimg.sh
Last active October 11, 2024 19:28
Tesla Model S/X MCU1 eMMC image creator
#!/bin/bash
#
# Create a 8GB eMMC image for Tesla Model S/X MCU1
#
# Example usage: ./mkteslaemmcimg.sh ./vinXXXXX.img ./develop-2019.20.2.1-16-5659e07dfd.img
#
set -e
FIRMWARE=$2
IMAGE=$1
@darconeous
darconeous / tesla-key-card-protocol.md
Last active November 8, 2024 21:21
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum darco@deepdarc.com.

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@appleguru
appleguru / ha-HUSBZB-fw-update.md
Last active January 11, 2023 02:57
Home Assistant HUSBZB-1 firmware update cheatsheet

Home assistant HUSBZB-1 fw update cheatsheet. SSH into your HA machine and then:

ha core stop
git clone https://github.com/walthowd/husbzb-firmware.git && cd husbzb-firmware
pip install pyserial
pip install xmodem
python3 ncp.py scan
python3 ncp.py flash -p /dev/ttyUSB1 -f ncp-uart-sw-6.7.8.ebl
python3 ncp.py scan