Skip to content

Instantly share code, notes, and snippets.

@silvercircle
silvercircle / userChrome.css
Last active March 23, 2024 01:19
My Thunderbird userChrome for square tabs + some minor UI tweaks
/*
* Thunderbird userChrome.css
*
* WARNING: This style was designed for TB version 60 and will likely not work
* with more recent versions (see comments)
*
* it's meant to be used with the default 3 panel split layout
*/
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@silvercircle
silvercircle / arcdark.conf
Created April 4, 2018 09:55
Geany theme to match Arc-Dark
# No explicit license available
#
# Based on Monokai
# Indicated author and assumed copyright holder is:
# Wimer Hazenberg <monokai.nl>
#
# Originally ported to Geany and tweaked by Thanh Tran
# <trongthanh(at)gmail(dot)com>
#
# Slightly modified to match the Arc color scheme by
@silvercircle
silvercircle / dbus_mail_notify.py
Created November 6, 2022 09:40
Python script to create desktop notifications for new mail that can be used by procmail
#!/usr/bin/python
# simple procmail filter to display a desktop notification
# usage: mailnotify username. Excepts the mail on stdin
# this is meant to live in a procmail recipe, for example:
# pipe the msg to this script to send a notification and deliver via
# dovecot-lda
#:0
#{
# :0c
@silvercircle
silvercircle / CMakeLists.txt
Created January 18, 2020 08:48
Sample CMake Qt Project for CLion
#
# sample CMakeLists.txt for a simple Qt project using CLion IDE
# shows how to use AUTOMOC, AUTOUIC
#
# sources are expected in source/
# includes in include/
#
cmake_minimum_required(VERSION 3.0)
set(TARGET_NAME Qttest)
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
* {
font-size: 8pt !important;
font-family: "Verdana" !important;
}
.newtab-cell {
margin-bottom: 0px !important;
margin-top: 0 !important;
@silvercircle
silvercircle / tlb.sh
Last active December 8, 2019 22:59
revert the BIOS fix that disables L3 caching on AMD processors with the TLB cache coherency bug (early Phenoms of B1 and B2 stepping, long obsolete, kept for historical reasons)
#!/bin/bash
MSR1=0xC0010015
MSR2=0xC0011023
# revert the BIOS fix that disables L3 caching on AMD processors
# with the TLB cache coherency bug (early Phenoms before the B3 stepping)
# needs msr-tools package
@silvercircle
silvercircle / cinnamon_compile.md
Last active December 7, 2019 22:04
Compile cinnamon from git repo on Ubuntu 19.10

Compile cinnamon from GIT on Ubuntu 19.10 (or later)

Basically, it's straightforward, but one can run into minor issue. First, you need all the prerequisites for building debian packages like dpkg-dev, C compilers, the full set of autotools and more. While building, dpkg-buildpackage is verbose enough to indicate missing dependencies. Should that happen, apt install them and restart the build process.

Official instructions:

http://developer.linuxmint.com/reference/git/cinnamon-tutorials/building.html

Follow them step-by-step.

@silvercircle
silvercircle / componentwhacker.d
Last active August 23, 2019 22:12
remove all components for an installer package from the registry.
module main;
/++
+ whack all compontents for an installed package
+ quick and dirty
+
+ dub build --build=release --compiler=dmd --arch=x86_64
+/
import std.stdio, std.string: indexOf;
"
This is my emacs configuration file. It's optimized to be used with emacs in
daemon mode, but should work without.
Tested and compatible with Emacs 25.3 and Emacs 26 on FreeBSD and several Linux
flavors. Note that display-line-numbers-mode REQUIRES Emacs 26+.
required elpa modules:
treemacs
@silvercircle
silvercircle / e.sh
Created April 10, 2018 06:00
Start emacsclient and only create a new frame if none exists. Otherwise reuse frame. Pass -nw to force console-emacs
#!/bin/bash -e
if [[ "$DISPLAY" ]]; then
frame=`emacsclient -a '' -e "(member \"$DISPLAY\" (mapcar 'terminal-name (frames-on-display-list)))" 2>/dev/null`
[[ "$frame" == "nil" ]] && opts='-c' # if there is no frame open create one
[[ "${@/#-nw/}" == "$@" ]] && opts="$opts -n" # don't wait unless we've asked to run in a terminal
else
opts='-nw'
fi