Skip to content

Instantly share code, notes, and snippets.

@mook
mook / #README.md
Last active November 23, 2024 18:25
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
#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;
}
// ==UserScript==
// @name bugzilla flow
// @namespace http://mook.moz.googlepages.com/greasemonkey/bugzilla/
// @description embeds bug history in comment flow and other tweaks
// @include */show_bug.cgi?*
// @require sitePrefs.js
// @require E4XtoDOM.js
// ==/UserScript==
// vim: set sw=2 : */