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/logrotate.d/userlogs | |
/var/run/user/*/log/*.log | |
/var/run/user/*/log/**/*.log | |
{ | |
daily | |
missingok | |
rotate 7 | |
compress | |
notifempty |
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 | |
""" Example argparser based python file | |
""" | |
import argparse | |
ARGP = argparse.ArgumentParser( | |
description=__doc__, | |
formatter_class=argparse.RawTextHelpFormatter, |
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
my_hello = 'Hello!' | |
my_world = { | |
'antartica': 'cold', | |
} | |
anonymous_callback = function (injected1, injected2, param1, param2) { | |
param1 = param1 ? param1 : 'One'; | |
param2 = param2 ? param2 : 'Two'; |
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/python3 | |
import os | |
import subprocess | |
import re | |
import humanfriendly | |
SIZE_RE = re.compile("^\d{,4}([KMG])$") | |
def main(): | |
file_size = ( |
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/python3 | |
import os | |
import subprocess | |
import re | |
import humanfriendly | |
SIZE_RE = re.compile("^\d{,4}([KMG])$") | |
def main(): | |
file_size = ( |
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 | |
import time | |
import socket | |
servers = [ | |
["MOTD", 25565], | |
] | |
BROADCAST_IP = "255.255.255.255" |
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
python3 <(printf "import pyfiglet, re, sys, pytz, datetime, time\nwhile True:\n\tprint('\\033[1;1H{}'.format(pyfiglet.Figlet(font=sys.argv[1], width=float('inf')).renderText(' '.join(str(pytz.timezone('utc').localize(datetime.datetime(year=2018, month=10, day=31, hour=23, minute=59, second=59)) - pytz.timezone('America/Los_Angeles').localize(datetime.datetime.now()))))))\n\ttime.sleep(0.02)\n") univers |
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 | |
import argparse | |
import logging | |
import psutil | |
import random | |
import sys | |
import time | |
import shutil | |
import os |
OlderNewer