<!--- Template
👑
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
# Coloured man page support | |
# using 'less' env vars (format is '\E[<brightness>;<colour>m') | |
$LESS_TERMCAP_mb = "\033[01;31m" # begin blinking | |
$LESS_TERMCAP_md = "\033[01;31m" # begin bold | |
$LESS_TERMCAP_me = "\033[0m" # end mode | |
$LESS_TERMCAP_so = "\033[01;44;36m" # begin standout-mode (bottom of screen) | |
$LESS_TERMCAP_se = "\033[0m" # end standout-mode | |
$LESS_TERMCAP_us = "\033[00;36m" # begin underline | |
$LESS_TERMCAP_ue = "\033[0m" # end underline |
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
# /etc/udev/rules.d/10-my-media-automount.rules | |
# start at sdb to ignore the system hard drive | |
KERNEL!="sd[b-z]*", GOTO="my_media_automount_end" | |
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end" | |
# import some useful filesystem info as variables | |
IMPORT{program}="/sbin/blkid -o udev -p %N" |
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
/** | |
** Dark Quassel Theme | |
** | |
** - Settings > Configure Quassel > Interface > Client Style. | |
** - Restart Quassel. | |
** | |
*/ | |
/* Window colors */ |
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
QTabBar::tab:selected, QTabBar::tab:hover { | |
background: qlineargradient(x1: 0 y1: 0, x2: 1 y2: 0, stop: 0 cyan, stop: 1 lightgreen); | |
color: black; | |
font: bold italic 20px Oxygen | |
}; | |
/* Save it, set it as StyleSheet on Settings of Konsole! */ |
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
mkdir cgi-bin | |
echo '#!/usr/bin/env python3' > cgi-bin/test.py | |
echo 'print("Content-type:text/html\n\n"+__import__("calendar").HTMLCalendar().formatyearpage(2017).decode("utf-8"))' >> cgi-bin/test.py | |
chmod +x cgi-bin/test.py | |
python3 -m http.server --cgi & | |
xdg-open http://127.0.0.1:8000/cgi-bin/test.py |
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 -*- | |
"""Crossplatform Sound Playing with StdLib only,No Sound file required. | |
Plays an 8-Bit game style music procedurally generated on the fly.""" | |
import os | |
import sys |
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
def pdb_on_exception(debugger="pdb", limit=100): | |
"""Install handler attach post-mortem pdb console on an exception.""" | |
pass | |
def pdb_excepthook(exc_type, exc_val, exc_tb): | |
traceback.print_tb(exc_tb, limit=limit) | |
__import__(str(debugger).strip().lower()).post_mortem(exc_tb) | |
sys.excepthook = pdb_excepthook |
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
​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ |
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 -*- | |
"""Tinyslations, smallest possible Translations from Internet with fallback.""" | |
from urllib import parse, request | |
from locale import getdefaultlocale | |
from json import loads |