Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block geekman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Tesla Key Card Protocol

Researched by Robert Quattlebaum

Last updated 2020-01-23.

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

marcan /
Created Jan 25, 2019
Raspberry Pi Camera V2 DRM authentication example
import hmac, hashlib
# Data from I²C trace at
# Secret key from VideoCore blob
# serial[8], serial[7:4], serial[3:0]
serial = bytes.fromhex("EE8C196D8301230B59")
# rPi -> camera random number
numIn = bytes.fromhex("5805F3C898C3133154498E082F2E703516F2DBD1")

Firebase Hosting Deploy Single File

This utility script deploy a single local file to an existing Firebase Hosting site. Other files that are already deployed are left unmodified.

The difference with firebase deploy is that this script does not require you to have a local snapshot of all hosted files, you just need the one file that you want to add/update.


marcan /
Last active Jan 21, 2020
Canon EF protocol notes

Testing done using a Canon EOS 600D and a Canon EF-S18-55mm f/3.5-5.6 IS II.


  1. VBAT
  2. DET (common with P-GND on lens side)
  3. P-GND
  4. VDD
  5. DCL
  6. DLC
chrsstrm / gas_sheet_as_json.js
Last active Mar 29, 2018
Treat a Google Sheet like a JSON API
View gas_sheet_as_json.js
* create a Google Sheet then go to Tools > Script Editor
* Paste this code into the editor. Save.
* Publish > Deploy as Web App
* Set new version, publish as me, who has access - anyone, even anon.
* GET to the URL, add on end ?sheet=[sheet name]
* Sheet name is the sheet name, manage appropriately (no spaces or symbols to keep it simple)
* Request returns JSON representation of the sheet.
mill1000 /
Last active Jan 26, 2020
Headless A2DP Audio Streaming on Raspbian Stretch


This gist will show how to setup Raspbian Stretch as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.


A quick search will turn up a plethora of tutorials on setting up A2DP on the Raspberry Pi. However, I felt this gist was necessary because this solution is:

  • Automatic & Headless - Once setup, the system is entirely automatic. No user iteration is required to pair, connect or start playback. Therefore the Raspberry Pi can be run headless.
  • Simple - This solution has few dependencies, readily available packages and minimal configuration.
  • Up to date - As of December 2017. Written for Raspbian Stretch & Bluez 5.43


ni0n / gist:a69500b9cdac25b8462882f34090bff8
Last active Aug 28, 2017
useful mappings for auditing code - highlight word under cursor until switched off
View gist:a69500b9cdac25b8462882f34090bff8
let mapleader=","
map <Leader>mon :exe printf('match IncSearch /\V\<%s\>/', escape(expand('<cword>'), '/\'))<cr>
map <Leader>moff :exe printf('match IncSearch /\V\<%s\>/', '')<cr>
View gist:826bde4f3fa8ecb3445046b92f08f90b
#!/usr/bin/env python
# Copyright 2016 Mike Ryan
# Copyright 2016 Matthew Garrett
# This code will connect to a Bluetooth nuLock and reset the password to 123456
# This file is part of PyBT and is available under the MIT license. Refer to
# LICENSE for details.
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&
Last active Dec 22, 2019
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.
View VAAPI-hwaccel-encode-Linux-Ffmpeg&

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

cyphunk /
Last active May 28, 2018
notes from iOS security documentation that I used to write

Notation iOS 9

This homebrewed notation I typically use when evaluating secure boot designs of embedded devices. It doesn't apply accurately for the iOS review, hides the key-wrapping schema for example. But it's enough to keep track of storage location of secrets and some interdependency.

pfk                  = 256bit per_file_key
You can’t perform that action at this time.