This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
STRINGS = dict( | |
negative = ["negative"], | |
base = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", | |
"nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", | |
"sixteen", "seventeen", "eighteen", "nineteen"], | |
tens = ["twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
import random | |
import re | |
import threading | |
import time | |
import sys | |
class JokeSorts: | |
@classmethod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Thanks to Zorawar on unix.stackexchange: <https://unix.stackexchange.com/a/202489> | |
KEYBOARD_ID=12 # from `xinput list` | |
press="key press " | |
release="key release" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KERNEL=="loop*", ENV{UDISKS_IGNORE}="1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Disable USB and lid wakeup triggers in /proc/acpi/wakeup | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/sh -c 'for i in EHC1 EHC2 XHC LID0; do echo $i > /proc/acpi/wakeup; done' | |
ExecStop=/bin/sh -c 'for i in EHC1 EHC2 XHC LID0; do echo $i > /proc/acpi/wakeup; done' | |
RemainAfterExit=yes | |
[Install] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Options */ :root { | |
--accent-normal: #642792; | |
--accent-light: #642792cc; | |
--accent-dark: #642792; | |
--scrollbar-thumb-normal: #ccc; | |
--scrollbar-thumb-sidebar: #d8d8d8; | |
--scrollbar-thumb-inactive: #e6e6e6; | |
--scrollbar-track: transparent; | |
--font-family-sans: "Ubuntu", "Droid Sans", "Trebuchet MS", "DejaVu Sans", "Bitstream Vera Sans", "Verdana", sans-serif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window { | |
font-weight: 300; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run in Browser Console (Ctrl+Shift+J; ≡ menu → Web Developer → Browser Console), | |
// then right click on the JSON output and click Copy object. | |
// Use (eg.) <https://code.s.zeid.me/bin/blob/master/sessionstore2html> to convert to HTML. | |
SessionStore.getWindowState(window); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[kwin-translucent-hack] | |
# Hack to make the window translucent when there is no video track. | |
# | |
# * Set up 2 KWin window rules: | |
# * class: exact match `mpv`, title: regular expression `\x034f$` | |
# -> active/inactive opacity: force 50% | |
# * class: exact match `mpv`, title: regular expression `^[^\x034f]*$` | |
# -> active/inactive opacity: force 100% | |
# | |
# * U+034F is used because KWin strips non-printable characters and replaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ -fPIC -I/usr/include/qt5 -lQt5Core qisprint.cc -o qisprint | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <QtCore/qchar.h> | |