Skip to content

Instantly share code, notes, and snippets.

@george-hawkins
george-hawkins / 00-README.md
Last active June 10, 2021 17:17
Disabling HP Omen 25L case LEDs

Disabling HP Omen 25L case LEDs

If you're running Windows then you can disable the case LEDs in an HP Omen computer using the Omen Gaming Hub.

However, there's no equivalent for Linux and no obvious way to permanently disable the LEDs.

When restarting after a shutdown, the LEDs start enabled but if you boot into Windows and, if you've already disabled the LEDs via the Omen Gaming Hub, they will automatically become disabled again as part of Windows starting up. You can then reboot into Linux and they will stay disabled until you next shutdown and restart.

This is hardly ideal - a more permanent and simple approach is to simply unplug the power connector for the LEDs on the motherboard. It's clearly marked "LED":

Why does my texture image join badly at the edges? Bad UV unwrapping?

I added a Texture Image to a torus and when I started painting on the torus, I saw this undesired effect at the point where the edges of the underlying image join:

bad join

I can see this effect also in the linked image:

linked image

Here is the .blend to go with my question here on the Blender StackExchange and which has this odd distribution of particles:

strange count

@george-hawkins
george-hawkins / README.md
Last active April 18, 2023 20:02
Turn off HP Omen desktop lighting

Turn off HP Omen desktop lighting

To turn To turn off case lighting go to the Microsoft Store, search for and install OMEN Gaming Hub.

There's no need for any of the secondary installs that it tries to trigger - i.e. Light Studio and HP System Event Utility.

Open OMEN Gaming Hub - ignore any attempt to make you sign-in or register for an account.

Ignore Light Studio, click OMEN Desktop and select the Lighting tab.

@george-hawkins
george-hawkins / pom.xml
Last active April 3, 2021 15:31
Reference Kotlin pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>foobar</artifactId>
<version>1.0-SNAPSHOT</version>

Betaflight SmartAudio pit mode support

There was no pit mode before SmartAudio 2.0. SmartAudio 2.0 added the ability to configure if the device starts in pit mode when powered on and the ability to turn off pit mode.

To control this behavior, Betaflight uses a set of flags and the saSetMode function (in vtx_smartaudio.c) as shown below.

1. Configure the VTX to start in pit mode when powered up.

@george-hawkins
george-hawkins / wake-issue.md
Last active March 9, 2024 19:35
After installing Ubuntu 20.04 my machine frequently wakes from sleep for no obvious reason. This gist describes my attempts to resolve this.

Diagnosing spurious wakes

This gist documents my attempts to get to the bottom of spurious wakes after installing Ubuntu 20.04 LTS on my system.

Initially, I thought it might be another system on my network sending Wake-on-LAN (WoL) packets. Then I thought it might be a known XHCI spurious wake kernel issue. And lastly, I finally resolved things by actively disabling the ability of USB devices, e.g. the mouse, to wake the system.

Update: I later came up with a better way of disabling wake-on-mouse that's covered here.

Note: as one of these steps, I upgraded the system BIOS - while this didn't resolve this particular issue, it did resolve an annoying issue with the graphic state not being properly restored for certain applications after wake-up.

Setting up an Odroid C2 as a Pi-hole

Note that a Pi-hole can't currently block ads in YouTube as these ads come from the same DNS addresses as the content (the Pi-hole forum has numerous questions relating to this).

Install Armbian on the C2

Download Etcher. Download the server version of Armbian for Ordoid C2. Install the image on the C2's eMMC card and attach it to the C2.

[tool.poetry]
name = "foo-bar-cb3da32"
version = "0.1.1"
description = "Foo bar library with alpha for beta."
authors = ["George Hawkins"]
license = "MIT"
packages = [
{ include = "foo_bar_cb3da32", format = "sdist" }
]
@george-hawkins
george-hawkins / pyenv-install.txt
Created April 13, 2020 10:52
Failed pyenv install
$ PYENV_DEBUG=1 pyenv install -v micropython-1.12
+ [pyenv:22] enable -f /Users/georgehawkins/.pyenv/bin/../libexec/pyenv-realpath.dylib realpath
+ [pyenv:29] '[' -z '' ']'
++ [pyenv:31] type -p greadlink readlink
++ [pyenv:31] head -1
+ [pyenv:31] READLINK=/usr/bin/readlink
+ [pyenv:32] '[' -n /usr/bin/readlink ']'
+ [pyenv:57] '[' -z '' ']'
+ [pyenv:58] PYENV_ROOT=/Users/georgehawkins/.pyenv
+ [pyenv:62] export PYENV_ROOT