rootiest

rootiest

Joined 1 year ago

rootiest
Last active 1 week ago
0 0 1

How to DIY a SuzyQ Cable

How a SuzyQ Cable Actually Works

Chromebooks with a Titan C / Cr50 / Ti50 security chip monitor the USB Type-C Configuration Channel (CC) lines for a specific resistor combination:

  • CC1 (pin A5): Pulled to VBUS via a 22 kΩ resistor.
  • CC2 (pin B5): Pulled to VBUS via a 56 kΩ resistor.

When the Chromebook detects these exact pull-up values upon insertion, it enters Debug Accessory Mode. The internal multiplexer redirects the security chip's USB lines to the USB-C Sideband Use (SBU) pins:

rootiest
Last active 4 months ago
0 0 1

Dynamic sunlight smart bulb

Me:

Write an automation to dynamically change the bedroom lamp brightness and color temperature to match the current daylight/sun position. Also take into account weather/cloud cover/etc to account for all variables. All of the necessary entities for daylight/weather/cloud cover/sun position/etc should already be available. The ultimate goal is to have the light respond to/mimic the real-world sunlight as accurately as possible.

Additionally create a helper switch to enable/disable the automation so we can easily regain manual control any time we want.

Claude:

I'll build this properly. First, let me consult the best-practices guide and discover the available entities, since the automation should reference real entity IDs.

Now let me discover the relevant entities for sun position, weather, cloud cover, and illuminance.

rootiest
Last active 5 months ago
0 0 1

Bash Scripting Basic Hygiene Checklist

Task Recommendation Why?
The Shebang #!/usr/bin/env bash Maximum portability across different Unix-like systems.
Error Handling set -euo pipefail Ensures the script stops at the first sign of trouble.
Quoting "$VARIABLE" Prevents word splitting and globbing (essential for paths).
Variable Style local_var="value" Lowercase prevents overwriting system-wide environment variables.
Boilerplate readonly CONSTANT Prevents accidental modification of fixed values.
Extensions .sh or none Helps with syntax highlighting and identifying file types.