This file contains hidden or 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 python3 | |
| """Flatpak CLI Shortcut Generator | |
| A simple no-argument tool that generates launchers with traditional non-flatpak | |
| command names for your installed Flatpak applications in ~/.local/bin/flatpak. | |
| Does full collision detection and warns you if you forgot to add its output | |
| directory to your PATH. Also overrules the command-line specified in the | |
| ``.desktop`` file if the Flatpak maintainer didn't include support for | |
| command-line arguments. |
This file contains hidden or 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
| Windows Registry Editor Version 5.00 | |
| ; Use this if you're blocking off network access in a way which causes timeouts | |
| ; and it's causing some games to wait 25 seconds on every game start as DirectX tries | |
| ; to check the root certs for updates as part of video driver signature checking | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\AuthRoot\AutoUpdate] | |
| "DisableWebRetrieval"=dword:00000001 | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SystemCertificates\AuthRoot] | |
| "DisableRootAutoUpdate"=dword:00000001 |
This file contains hidden or 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
| # Convenience helper to set up an "incognito mode" for a shell session. | |
| # | |
| # Installation: | |
| # 1. Create a folder like ~/.zsh/functions | |
| # 2. Add it to your ZSH function path with fpath=(~/.zsh/functions(:A) $fpath) in ~/.zshenv | |
| # 3. Save this script as ~/.zsh/functions/anonsh | |
| # 4. Add `autoload -Uz anonsh` to your ~/.zshrc | |
| # | |
| # Now you can type `anonsh` in any zsh session | |
| # |
This file contains hidden or 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
| ! ---=== Experiment with making Motif less ugly for DDD ===--- | |
| ! (DDD ignores generically-set Motif properties so we must do this) | |
| ! TODO (if possible): | |
| ! - Hide text cursors in unfocused fields | |
| ! - Convert on-hover effect from shadow to background color or border | |
| ! - Pick better fonts and check which package provides them | |
| ! Use the lighter background grey from the Lubuntu GTK+ theme | |
| ! (Still a cool grey. Eyedropper the Clearlooks warm grey if necessary.) | |
| Ddd*background: #e0e0e0 |
This file contains hidden or 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 python3 | |
| # -*- coding: utf-8 -*- | |
| """Simple notify2-based apt-get update notifier | |
| Requires: | |
| - dbus-python (A.K.A. python-dbus) | |
| - notify2 | |
| - python-gobject (for Python 2.x) | |
| (Though it shouldn't be too difficult to adapt to Python 3.x since |
This file contains hidden or 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 | |
| """python-xlib example which reacts to changing the active window/title. | |
| Requires: | |
| - Python | |
| - python-xlib | |
| Tested with Python 2.x because my Kubuntu 14.04 doesn't come with python-xlib | |
| for Python 3.x. |
This file contains hidden or 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/bash | |
| # Toggle the KVM switch programmatically by toggling the Scroll Lock LED | |
| # Source: https://askubuntu.com/a/546989/23552 | |
| SLEEP=0.5 | |
| LEDNAME="Scroll Lock" | |
| echo "Switching..." | |
| xset led named "$LEDNAME" | |
| sleep $SLEEP |
This file contains hidden or 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
| """Primitive terminal emulator example made from a PyQt QTextEdit widget.""" | |
| import fcntl, locale, os, pty, struct, sys, termios | |
| import subprocess # nosec | |
| # Quick hack to limit the scope of the PyLint warning disabler | |
| try: | |
| # pylint: disable=no-name-in-module | |
| from PyQt5.QtCore import Qt, QSocketNotifier # type: ignore | |
| from PyQt5.QtGui import QFont, QPalette, QTextCursor # type: ignore |
This file contains hidden or 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 python3 | |
| """Helper to block Esc key presses from reaching Thunderbird | |
| (Works by using XGrabKey to claim Esc on all Thunderbird "3pane" windows, | |
| either at startup or when the window first receives focus.) | |
| Requires: | |
| - Python | |
| - python-xlib |
NewerOlder