Skip to content

Instantly share code, notes, and snippets.

@george-hawkins
george-hawkins / arm64.md
Last active May 11, 2022
Running virtualized x86_64 and emulated arm64 Ubuntu cloud images using QEMU
View arm64.md

QEMU arm64 cloud server emulation

This is basically a rehash of an original post on CNXSoft - all credit (particularly for the Virtio device arguments used below) belongs to the author of that piece.

Download the latest uefi1.img image. E.g. ubuntu-16.04-server-cloudimg-arm64-uefi1.img from https://cloud-images.ubuntu.com/releases/16.04/release/

Download the UEFI firmware image QEMU_EFI.fd from https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/

Determine your current username and get your current ssh public key:

@george-hawkins
george-hawkins / wake-issue.md
Last active Apr 10, 2022
After installing Ubuntu 20.04 my machine frequently wakes from sleep for no obvious reason. This gist describes my attempts to resolve this.
View wake-issue.md

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.

@george-hawkins
george-hawkins / 0-README.md
Created Jul 8, 2021
Diffuse bake with only color selected still results in different colors
View 0-README.md

1 2 3 4 5...

@george-hawkins
george-hawkins / 0-README.md
Last active Jul 8, 2021
Constraining area in which select similar acts?
View 0-README.md

Constraining area in which select similar acts?

Can I constrain the area over which select similar acts? In the model shown below, I wanted to select the blue faces on the underside of the model. I could do this with selecting similar by normal (and upping the threshold value until I got all faces I wanted), however this selected all faces that met the similarity condition, not just those on the underside of my model.

I could do select similar and then flip to a front view and control drag to unselect everything above the ground layer. This almost gets me to where I want to be.

However, I was wondering if there was a better way? This approach of unselecting things requires the ground layer to be perfectly flat to work well. What I really want (I think) is to be able to constrain select similar to just those faces I can see when looking at the underside.

Ignoring the normals and instead using select linked with flat faces (with the angle upped suitably) alm

View nix-suggestions-for-henrik.md

I wouldn't bother with shebangs in your Python files (or with making them exectuble, i.e. using chmod on them).

Instead, I'd create a bash script (with shebang) to orchestrate things. E.g. something like this:

#!/bin/bash

symbol=$1
start=$2
@george-hawkins
george-hawkins / 00-README.md
Last active Jun 10, 2021
Disabling HP Omen 25L case LEDs
View 00-README.md

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":

View 00-README.md

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

View 00-README.md

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 May 12, 2021
Turn off HP Omen desktop lighting
View README.md

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 Apr 3, 2021
Reference Kotlin pom
View pom.xml
<?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>