# Connect to contaner shell
docker exec -it container_name /bin/bash
# create backup tar file
pg_dump -U postgres -W -F t postgres > /bb_backup.tar
# empty password
# copy file from container
docker cp container_name:file_name.tar . # note . at the end for file location
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 os | |
import pathlib | |
import sqlite3 | |
target_path = "" | |
movie_list = [] | |
tv_list = [] | |
collection_list = [] | |
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 requests_html import HTMLSession | |
import json | |
session = HTMLSession() | |
server_ip = '' # input server ip address. Add port if necessary | |
endpoints = { | |
"children": f"http://{server_ip}/api/children/", | |
"changes": f"http://{server_ip}/api/changes/", |
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
# Delete ombi movie & tv requests if the movie is available | |
import os | |
import requests | |
# Ombi api key | |
API_KEY = os.environ["API_KEY"] # Replace with your api key from ombi | |
# Start requests session | |
s = requests.session() | |
s.headers.update({"ApiKey": API_KEY}) |
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
# Script to sort json file by Key "name" value | |
import json | |
from pathlib import Path | |
def write_json(data, filename): | |
"""Write new JSON file | |
Args: | |
data (dict): Dict data to write to JSON file |
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 pprint import pprint | |
SM = { | |
"instagram": r"instagram.com", | |
"facebook": r"facebook.com", | |
"twitter": r"twitter.com", | |
"youtube": r"youtube.com", | |
"snapchat": r"snapchat.com" | |
} |
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 python | |
# Send DDE Execute command to running program | |
# https://code.activestate.com/recipes/577654-dde-client/ | |
from ctypes import POINTER, WINFUNCTYPE, c_char_p, c_void_p, c_int, c_ulong, c_char_p | |
from ctypes.wintypes import BOOL, DWORD, BYTE, INT, LPCWSTR, UINT, ULONG | |
# DECLARE_HANDLE(name) typedef void *name; | |
HCONV = c_void_p # = DECLARE_HANDLE(HCONV) | |
HDDEDATA = c_void_p # = DECLARE_HANDLE(HDDEDATA) |
List of scary movies involving Christmas. Based on reddit list @ The Ultimate List of Creepmas Movies. So far.
- A Christmas Carol
- A Cadaver Christmas (2011)
- A Christmas Horror Story (2015)
- A Christmas Tale (2005)
- All the Creatures Were Stirring (2018)
- All Through the House (2015)
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
Note: These are based on Linuxserver.io images | |
1. We need to create a 90-config file that will download a docker binary so that lidarr can call commands in a different container | |
-----------------------------90-config---------------------------------- | |
#!/usr/bin/with-contenv bash | |
DOCKERVERSION=20.10.9 | |
curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKERVERSION}.tgz \ | |
&& tar xzvf docker-${DOCKERVERSION}.tgz --strip 1 \ |
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 table_extract(table): | |
""" | |
Extracts data from a table in an HTML document. | |
Args: | |
table (HTML element): The table element to extract data from. | |
Returns: | |
list of dict: A list of dictionaries, where each dictionary represents a row in the table. | |
The keys of the dictionaries are the headers of the table, and the values are the cell values. |