Skip to content

Instantly share code, notes, and snippets.

@mook
mook / Desktop Applications in Containers.md
Created February 15, 2026 05:58
Notes on Running Desktop Applications in Containers

Desktop Applications in Containers

This includes some notes about running desktop applications (e.g. KCalc, winecfg) in containers.

Caution

Things described here have security implications; in general, it is assumed that the containerization exists only to isolate the filesystem against accidental modification.

@mook
mook / #README.md
Last active November 11, 2025 02:38
KDE Plasma Change Color Scheme on Night Color

This is a script plus a systemd (user) unit to change color schemes when Night Color kicks in (to get dark mode).

This is basically a workaround until maybe someday Plasma gets proper support.

The color schemes are named in plasma-color-scheme-on-night-color.sh line 16 and 18. For a hack it's not worth makig it configurable.

Write the systemd config file in ~/.config/systemd/user/plasma-color-scheme-on-night-color.service and the script in ~/opt/scripts/plasma-color-scheme-on-night-color.sh.

Once the files are written, use systemctl --user enable --now plasma-color-scheme-on-night-color to turn on.

@mook
mook / afraid.org dns update.md
Created October 18, 2017 04:25
Afraid.org Dynamic DNS updating units

Usage

  • Save files as /etc/systemd/system/dyndns-afraid@.service and /etc/systemd/system/dyndns-afraid@.timer
  • Run systemctl daemon-reload to pick up the new files
  • Log in at http://freedns.afraid.org/dynamic/v2/
  • Note the last component of the URL for updating (http://sync.afraid.org/u/XXXXXXXX/)
  • Run systemctl enable --now dyndns-afraid@XXXXXXXX.timer to enable processing
#include <windows.h>
#include <stdio.h>
#include <map>
#define print_error(msg) printf(msg ": %08lx\n", GetLastError())
#if defined(PARENT)
struct DebugProcessData {
HANDLE hProcess;
@mook
mook / moz-committers.py
Created November 5, 2013 08:45
Script to figure out how many people got commit access to mozilla.org-related repositories, whether they are MoCo employees/interns, and the "highest" level of access granted.
# This was the the command used to grab the JSON dump. To re-fetch, please
# enter valid userid / cookie; see
# https://wiki.mozilla.org/Bugzilla:REST_API#Authentication for instructions
#import requests
#
#r = requests.get("https://api-dev.bugzilla.mozilla.org/latest/bug",
# headers={"Content-Type": "application/json",
# "Accept": "application/json"},
# params={"component": "Repository Account Requests",
@mook
mook / caller.cpp
Created October 10, 2012 04:25
temp
nsRefPtr<sbRunnable_<nsresult>> job =
new sbRunnableXPCOMMethod3_<nsresult,nsIObserverService,
nsISupports*,const char*,const PRUnichar*>(
mObserverService,&nsIObserverService::NotifyObservers,
this,"service-ready",serviceContractID.get());
NS_DispatchToMainThread(job);
rv = job->Wait();
NS_ENSURE_SUCCESS(rv, rv);
@mook
mook / temp
Created October 10, 2012 04:24
temp
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 :miv */
/*
*=BEGIN SONGBIRD GPL
*
* This file is part of the Songbird web player.
*
* Copyright(c) 2005-2010 POTI, Inc.
* http://www.songbirdnest.com
*
@mook
mook / stackato-openssl-cert-gen.conf
Created February 4, 2012 20:16
openssl config to create a self-signed ssl cert with support for multiple names
# openssl req -new -x509 -nodes -days 365 -key stackato.key -batch -config stackato-openssl-cert-gen.conf > stackato-custom.crt
[req]
default_md = sha1
x509_extensions = extensions
prompt = no
distinguished_name = distinguished_name
[extensions]
subjectAltName = @alt_names
@mook
mook / gist:867723
Created March 13, 2011 00:05 — forked from aikar/gist:867710
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@-moz-document url(chrome://komodo/content/komodo.xul) {
#topview tabs > vbox,
#topview tabs .tabstrip-box,
#topview tabs .tab-arrowscrollbox,
#topview tabs .tab-arrowscrollbox > scrollbox,
#topview tabs .scrollbox-innerbox {
display: block !important;
}
<style>
.result {
width: 35px;
height: 35px;
}
.col-header, .row-header {
font-weight: bold;
}