Skip to content

Instantly share code, notes, and snippets.

@moson-mo
moson-mo / pci_write_smu_example.go
Created July 3, 2022 09:21
Go - Reading/Writing to PCI config registers via sysfs. (example of controlling CPU boosting for a Ryzen mobile processor)
/*
Example of reading/writing to PCI config registers via sysfs.
In this example we write to the SMU (MP1 mailbox) of a Ryzen mobile processor
to modify a setting that controls CPU's boosting behavior.
There are two modes, "power-saving" (which is usually automatically activated when running on battery power)
and "max-performance" (when connected to AC)
@moson-mo
moson-mo / README
Last active September 13, 2022 06:05
OpenAPI v3 spec proposal for AUR /api (v6)
WIP: Proposal for the v6 REST-API or aurweb
@moson-mo
moson-mo / cpupower.go
Created March 12, 2023 15:14
Expose CPU power consumption (AMD ZenX processors) via REST-API
package main
import (
"encoding/binary"
"fmt"
"net/http"
"os"
"sync"
"time"
)
@moson-mo
moson-mo / setup.md
Last active April 30, 2023 10:54
aurweb - containerized dev/test environment setup

aurweb - containerized dev/test environment setup

This guide aims to explain how to set up an aurweb environment for local development and testing.
We'll make use of the containerized (docker) version of aurweb.

Prerequisites

We need docker-compose to be able to build our set of containers.
For development and testing we need python-poetry which creates a virtual environment
and installs all required python packages for us.