Skip to content

Instantly share code, notes, and snippets.

View CounterPillow's full-sized avatar

Nicolas F. CounterPillow

View GitHub Profile

Modding your EDID for Fun and Profit

The EDID is a small binary blob your display sends to your system that describes the capabilities of the display, for example, what physical dimensions it is, or what resolution is supports at what clockrates.

I recently had to modify my EDID to fix a DTD (Detailed Timing Descriptor), which caused the display to report a 59.93 Hz refresh rate mode that actually could only do about 48 Hz. Nudging around the pixel clock and V-Blank "fixed"

@CounterPillow
CounterPillow / README.md
Last active April 17, 2022 07:50
mpv script to show GPU frequencies on Linux.

This script shows the current frequency and max frequency of a Linux DRM GPU.

To use it, bind script-message show-gpu-freq "cardnamehere" to a key, e.g. U script-message show-gpu-freq "card0".

Check /sys/class/drm/ for available cards.

@CounterPillow
CounterPillow / rp64_gpio.h
Created June 3, 2021 19:35
Header file for the ROCKPro64 GPIO lines for use with /dev/gpiochip stuff.
/*
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without
* fee is hereby granted.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.

Hacktoberfest and why it has always been doomed to become like this

I'm writing this essay to really gather my thoughts on this, so I can finally put them to rest and stop getting distracted by the discourse surrounding it all. If you don't know what Hacktoberfest is, don't worry; I'll explain it in "Background" below.

I'm someone who has participated in the past 3 Hacktoberfests, completing them all with at least 4 genuine useful pull requests. I've never attended any of the events surrounding Hacktoberfest. I am not an active DigitalOcean customer, nor have I ever really been. I have signed up for Hacktoberfest 2020.

This shit was inevitable.

CUMFILE="$HOME/.cum/config.json"
MADOKAMI_USERNAME=$(jq -r '.madokami.username' $CUMFILE)
MADOKAMI_PASSWORD=$(jq -r '.madokami.password' $CUMFILE)
BATOTO_USERNAME=$(jq -r '.batoto.username' $CUMFILE)
BATOTO_PASSWORD=$(jq -r '.batoto.password' $CUMFILE)
export MADOKAMI_USERNAME
export MADOKAMI_PASSWORD
export BATOTO_USERNAME
export BATOTO_PASSWORD
#include <GLFW/glfw3.h>
#include <stdio.h>
int main() {
if (!glfwInit())
return(-1);
int monitor_count;
GLFWmonitor** monitors = glfwGetMonitors(&monitor_count);
@CounterPillow
CounterPillow / fix-ini-data.patch
Created October 26, 2015 19:20
Snowmix build system patches
--- ini/Makefile.am 2015-10-26 18:28:47.631165505 +0100
+++ ini/Makefile_new.am 2015-10-26 18:53:43.926985177 +0100
@@ -1,2 +1,12 @@
-ini_DATA = *
+ini_DATA = audio basic_feeds.ini basis.ini camrelay-stream-ts Clock \
+demo-scenes DigitalClock DigitalCounter DigitalMeter example-3vfeed \
+gl_test2.ini intercom logotest logotest2 minimal minimal-1feed \
+minimal-1feed.ini minimal.ini mosaic-basis ninefeeds.ini saphire-audio \
+saphire-basis.ini saphire-DigitalCounter saphire-DigitalMeter saphire-Radar \
+saphire-shape sapphire-audio sapphire-basis.ini sapphire-clocks sapphire-feeds \
@CounterPillow
CounterPillow / suckage.md
Created April 17, 2015 18:42
Shit that sucks

List of Current Gripes With Various Open-Source Software

This document is an ever-evolving list of shitty usability in open-source software. It's not meant as a "list of shame", but as a piece of evidence for FLOSS not putting enough effort towards creating usable GUI applications.

All of it

  • Apparently no standard or widespread bad implementation of standard for system theme colour detection and application-specific overrides configuration. Many applications assume light background colour and dark font colour and have some of those colours hardcoded, but not others. This leads to some applications with dark system colours ending up with black text on dark background, e.g. the ksysguard detailed memory information dialogue.

Keybase proof

I hereby claim:

  • I am counterpillow on github.
  • I am fratti (https://keybase.io/fratti) on keybase.
  • I have a public key whose fingerprint is 0D41 0011 861B C0A5 AE40 EF19 92DC BCC5 5E99 8B10

To claim this, I am signing this object: