Skip to content

Instantly share code, notes, and snippets.

@font-face {
font-family: 'oldherl-songti';
font-weight: bold;
src: local('STZhongsong');
}
@font-face {
font-family: 'oldherl-songti';
font-weight: 500;
src: local('STZhongsong');
}
@oldherl
oldherl / AccentoOrangeOldherl.colors
Last active December 13, 2020 13:51
Orange color scheme. For use with KDE / Breeze.
[ColorEffects:Disabled]
Color=56,56,56
ColorAmount=0
ColorEffect=0
ContrastAmount=0.65
ContrastEffect=1
IntensityAmount=0.1
IntensityEffect=2
[ColorEffects:Inactive]
@oldherl
oldherl / github-oldherl.css
Last active June 26, 2020 16:34
Userstyle to fix the new Github theme
@-moz-document domain("github.com") {
/* no round avatars */
.avatar-user {
border-radius: 0 !important;
}
/* only slightly round buttons */
.btn {
border-radius: 2px;
}
@oldherl
oldherl / tcom.py
Created August 19, 2019 07:36
Google Translate comments in C/C++ source code (to English by default) from clipboard
from comment_parser import comment_parser as cmp
from googletrans import Translator as Tr
# pip install ansicolors
from colors import color
def print_item(item):
print(color("Original (%s):" % item.src, fg="red", style="underline+bold"))
print(item.origin)
print(color("Translated (%s):" % item.dest, fg="green", style="underline+bold"))
@oldherl
oldherl / loop_notify_wifi.sh
Created July 1, 2018 07:35
Show desktop notification of wifi data usage in loop (linux)
notify_net_usage() {
notify-send -t 5000 -i network-transmit-receive "$1" "`ifconfig $1 | grep packets`"
}
loop_notify_wifi() {
while true; do
notify_net_usage wlp2s0
sleep 30
done
}