Skip to content

Instantly share code, notes, and snippets.

View zmiulan's full-sized avatar

Vitaliy Eremenko zmiulan

  • Yohanga.biz
  • Russia, Saint-Petersburg
View GitHub Profile
@yusufkandemir
yusufkandemir / 1_quasar-sentry-firebase-deployment.yml
Last active July 22, 2025 01:41
Github Actions: Deploy a Quasar Framework app to Firebase Hosting and create a Sentry release
# .github/workflows/hosting.yml
name: Hosting
on:
# You can use other strategies here, check: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on
push:
branches:
- production
jobs:
@delhoume
delhoume / tpm2net-wemos.ino
Created April 9, 2018 08:28
TPM2.NET protocol handler for esp8266
/*
TPM2.NET protocol handler
Works with Jinx LED software
*/
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <FastLED.h>
#include <WiFiManager.h>
#include <Ticker.h>
@jblang
jblang / tpm2.md
Last active December 28, 2025 18:11
TPM2 Protocol Description

TPM2 Protocol Implementation

Introduction

Frame data is transferred inside packets (similar to DMX, for example). A frame is an image representing a matrix or a light scene.

The packets start and end with one-byte characters. In between are a few control bytes followed by the payload. There is no set size for a payload; it is transmitted with each packet. This makes the protocol quite flexible. There are enough bytes in a single packet for an RGB matrix with 21,845 pixels, but if you just want to control an RGBW lamp, that only requires 9 bytes. The variable frame size means there is no overhead, allowing for maximum transfer speed.

TPM2 Packet Structure

@kgaughan
kgaughan / gist:2491663
Created April 25, 2012 17:54
Parsing a comma-separated list of numbers and range specifications in Python
from itertools import chain
def parse_range(rng):
parts = rng.split('-')
if 1 > len(parts) > 2:
raise ValueError("Bad range: '%s'" % (rng,))
parts = [int(i) for i in parts]
start = parts[0]
end = start if len(parts) == 1 else parts[1]
if start > end: