- The next big thing
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 | |
# INIT | |
/bin/echo " - Start snapshot - " | |
/bin/date >> /opt/resources/snap-hard-`/bin/date -I`.out | |
/bin/echo " " >> /opt/resources/snap-hard-`/bin/date -I`.out | |
/bin/echo " " >> /opt/resources/snap-hard-`/bin/date -I`.out |
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
from threading import Thread | |
class RestartableThread(Thread): | |
def __init__(self, *args, **kwargs): | |
self.init_args, self.init_kwargs = args, kwargs | |
super(RestartableThread, self).__init__(*args, **kwargs) | |
def clone(self): | |
r = RestartableThread(*self.init_args, **self.init_kwargs) |
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 lua | |
--https://www.tutorialspoint.com/lua/lua_quick_guide.htm | |
requests = require 'requests' | |
inspect = require 'inspect' | |
response = requests.get{'http://httpbin.org/get', timeout=1} | |
json_data = response.json() |
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
import argparse | |
import os | |
from os.path import splitext | |
from PIL import Image | |
DEFAULT_SIZE = (220, 180) | |
# DEFAULT_SIZE = (300, 30) | |
# DEFAULT_SIZE = (300, 128) |
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
from copy import deepcopy | |
from logging.config import dictConfig | |
from os.path import isfile | |
import yaml | |
class LoggerDictConfigFormatter: | |
unwanted_keys: tuple = ('level', 'handlers', 'propagate') | |
max_deep: int = 10 |
OlderNewer