Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
"""
Patch R02_3.00.06_FasterRawValuesMOD.bin into an optimized accel-only firmware.
This script takes the FasterRawValuesMOD firmware and applies three optimizations:
1. NOPs the PPG (photoplethysmography) driver initializationfrees CPU cycles
2. NOPs the Blood and HRS BLE notification sendsonly accelerometer data is sent
3. Sets the timer config byte to 0x04 for maximum stable rate (~40Hz)
The result is a firmware that streams accelerometer data at ~40Hz without crashing,
@harryaskham
harryaskham / dbus.nix
Created November 10, 2024 01:16
nix-on-droid minimal dbus module
{ config, lib, pkgs, ...}:
# Cut from https://raw.githubusercontent.com/NixOS/nixpkgs/refs/heads/master/nixos/modules/services/system/dbus.nix
let
cfg = config.dbus;
dbus-start-bin = "dbus-start";
dbus-start = pkgs.writeScriptBin dbus-start-bin ''
#!${pkgs.runtimeShell}
${pkgs.dbus}/bin/dbus-daemon --session &
@harryaskham
harryaskham / server.hs
Created March 16, 2023 14:50
GPT-4 Written ChatGPT WebApp in Haskell
{- cabal:
build-depends: base
, scotty
, aeson
, http-client-tls
, http-client
, bytestring
, text
, http-types
-}
@harryaskham
harryaskham / Fira Code Nerd Font Complete.css
Last active February 12, 2022 17:55
Fira Code Nerd Font Complete Blink.sh CSS
@font-face {
font-family: "Fira Code NerdFont";
font-style: normal;
font-weight: 200;
src: url('https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/FiraCode/Regular/complete/Fira%20Code%20Regular%20Nerd%20Font%20Complete.ttf') format('truetype'));
}
@font-face {
font-family: "Fira Code NerdFont";
font-style: normal;
font-weight: 400;