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 python3 | |
"""Simple program that shows AQI on system tray as a colored pie chart. | |
It fetches PM_2.5 data via Graphite's HTTP API every minutes. | |
Required Python packages: | |
requests, pystray, Pillow | |
""" | |
import time | |
import webbrowser |
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 python3 | |
import asyncio | |
import logging | |
from aiohttp import web | |
from aiodnsresolver import Resolver, TYPES, DnsRecordDoesNotExist | |
from des import DesKey | |
TENCENT_KEYS = { |
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 | |
#encoding: utf-8 | |
# Copyright (C) 2013 @XiErCh | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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=Setup WireGuard link | |
After=network-online.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/bin/wg-quick up %i | |
ExecStop=/usr/bin/wg-quick down %i |
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 python3 | |
from threading import Thread | |
from urllib.parse import unquote | |
from pathlib import Path | |
from queue import Queue | |
import requests | |
import os.path | |
import sys | |
import re |
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
server { | |
server_name example.com; | |
charset utf-8; | |
location ~ "/t/([^/]+)(/[^/]+)?$" { | |
alias /srv/http/paste/data/$1; | |
gunzip on; | |
gzip_static always; | |
default_type text/plain; |
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 python3 | |
"""GitHub New Release Checker | |
./check_release.py path/to/releases.ini | |
It fetches release tag from GitHub, then comparing it with the | |
old one in ini file. If tag changed, send a email to configured | |
address. | |
""" | |
import re |
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=Comment sender for example.com | |
[Service] | |
Type=simple | |
User=nobody | |
Group=nobody | |
ExecStart=/usr/bin/python3 /opt/comment-sender/sender.py | |
PrivateDevices=True |
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
-oooooooooooo- -::::::::::::::::::::- | |
.---------. oMMMMMMMMMMMM+ dMMMMMMMMMMMMMMMMMMMMM. | |
.NMMMMMMMMMN` oMMN:...-yMMM: /+++++++++++++yMMMo+++` | |
.NMMhyyydMMN` oMMN. `mMMd /MMN` | |
.NMM/ oMMN` oMMN. +MMN: /MMN` | |
.NMM/ oMMN` oMMN. `dMMs /MMN` | |
.NMM/ oMMN` oMMN. /MMN. -hhhhhhhhhh/ /MMN` | |
.NMM/ oMMN` oMMN. dMMo :MMMNmmmNMMs /MMN` | |
.NMM/ oMMN` oMMN. +MMN. :MMN.```yMMs /MMN` |
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/bash | |
echo -e "\033[2J\033[?25l"; R=`tput lines` C=`tput cols`;: $[R--] ; while true | |
do ( e=echo\ -e s=sleep j=$[RANDOM%C] d=$[RANDOM%R];for i in `eval $e {1..$R}`; | |
do c=`printf '啊'` # fork from http://bruxy.regnet.cz/web/linux/EN/matrix-sh/ # | |
$e "\033[$[i-1];${j}H\033[32m$c\033[$i;${j}H\033[37m"$c; $s 0.1;if [ $i -ge $d ] | |
then $e "\033[$[i-d];${j}H ";fi;done;for i in `eval $e {$[i-d]..$R}`; #[mat!rix] | |
do echo -e "\033[$i;${j}f ";$s 0.1;done)& sleep 0.05;done #(c) 2011 -- [ BruXy ] |