Skip to content

Instantly share code, notes, and snippets.

View philpem's full-sized avatar

philpem

View GitHub Profile
@jasoncoon
jasoncoon / fibonacciStars
Last active March 15, 2022 13:57
Star pattern for Fibonacci256: https://www.tindie.com/products/19429
// Fibonacci Stars pattern by Jason Coon
// For Fibonacci256: https://www.tindie.com/products/19429
// Meant for use in this sketch: https://github.com/jasoncoon/esp8266-fastled-webserver/tree/fibonacci256
// Draws shooting stars radiating outward from the center, along Fibonacci spiral lines.
void fibonacciStarsWithOffset(uint16_t stars[], uint8_t starCount, uint8_t offset = 21, bool setup = false, bool move = false) {
// use a number from the Fibonacci sequence for offset to follow a spiral out from the center
for (uint8_t i = 0; i < starCount; i++) {
@ccawley2011
ccawley2011 / srcrename
Created July 30, 2020 12:03
Bash script to convert a source code tree for use on RISC OS
#!/bin/bash
ACTION="ln -sf"
if [ $# -lt 2 ]; then
echo "usage: $0 srcdir dstdir"
exit 1
fi
SRCDIR=$1
DSTDIR=$2

⚠️ There is now an official way to connect Glow to Home Assistant via MQTT, I would suggest using that instead of the method described below. Here are the sensor templates for that (replace GLOW_DEVICE_ID with the relevant information for your device):

mqtt:
  sensor:
    - name: "Home Power"
      state_topic: "glow/GLOW_DEVICE_ID/SENSOR/electricitymeter"
      unit_of_measurement: 'W'
      value_template: "{{ (value_json['electricitymeter']['power']['value'] * 1000) | int }}"
      icon: 'mdi:flash'
@sarg
sarg / README.md
Last active May 25, 2024 17:04
rk30xx loader image unpacker

Obtaining RK3066 boot ROM.

Here are my steps.

At first, I took a look to RK30xxLoader(L)_V1.18.bin. This file appears in update.img for my device. So, I unpacked update.img using rk29Kitchen.

strings on that file returns nothing interesting, so I assumed the file is crypted