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 | |
# txtrecord_decode.py [-h] output.png logo.example.com | |
import dns.resolver # pip3 install dnspython | |
import base64 | |
import sys | |
from argparse import ArgumentParser | |
def parse_records(name): | |
_next = "" | |
print("{}".format(name), file=sys.stderr) | |
q = dns.resolver.query(name,"TXT").response.answer[0] |
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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: >- | |
AWS CloudFormation Sample Template LAMP_Single_Instance: Create a LAMP stack | |
using a single EC2 instance and a local MySQL database for storage. This | |
template demonstrates using the AWS CloudFormation bootstrap scripts to | |
install the packages and files necessary to deploy the Apache web server, PHP | |
and MySQL at instance launch time. **WARNING** This template creates an Amazon | |
EC2 instance. You will be billed for the AWS resources used if you create a | |
stack from this template. | |
Parameters: |
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
[1001] | |
exten => _X.,1,Set(CALLERID(name)=1.0.0.1) | |
exten => _X.,n,Answer | |
exten => _X.,n,Wait(1) | |
exten => _X.,n,Playback(1001-recordtype) ; "Enter record type on your phone keypad, followed by the hash key. Press 1 to go to next character" | |
exten => _X.,n,Read(recordtype,,,si,) | |
exten => _X.,n,Playback(1001-domain) ; "Enter domain name to retrieve record, followed by the hash key" | |
exten => _X.,n,Read(domain,,,si,) | |
exten => _X.,n,Set(RECORD="${SHELL(/usr/bin/1001.py "${recordtype}")}") | |
exten => _X.,n,Set(ADDR="${SHELL(/usr/bin/1001.py "${domain}")}") |
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 socket | |
from requests import get | |
EXTEN = "1" | |
presence_api = "http://127.0.0.1:8081" | |
auth = ("me", "aa") | |
pbx_ip = "127.0.0.2" | |
def process_event(resp): | |
d = {} |
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 pypresence import Presence # https://github.com/qwertyquerty/pypresence | |
from flask import * | |
from requests import get | |
from time import sleep | |
client_id = "556918123421368329" | |
RPC = Presence(client_id) | |
RPC.connect() | |
app = Flask(__name__) |
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 pypresence import Presence # https://github.com/qwertyquerty/pypresence | |
from requests import get | |
from time import sleep | |
from sys import exit | |
client_id = "556909532417228919" | |
user = "blha303" | |
tautulli_instance = "https://tau.home.b303.me" # https://github.com/Tautulli/Tautulli | |
RPC = Presence(client_id) |
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 | |
# A script to generate videos for MP3s | |
from moviepy.editor import * | |
import numpy as np | |
from PIL import Image | |
from glob import glob | |
from mutagen.mp3 import MP3 | |
from io import BytesIO | |
#points |
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 gmusicapi | |
import os | |
from argparse import ArgumentParser | |
import requests | |
from mutagen import File | |
gmusic = gmusicapi.Mobileclient() | |
gmusic.login(os.environ["GMUSICAPI_EMAIL"], os.environ["GMUSICAPI_PASSWORD"], os.environ["GMUSICAPI_MACADDR"]) |
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 subprocess,gmusicapi,sys,mutagen,os | |
c = gmusicapi.Mobileclient() | |
c.login(os.environ["GMUSICAPI_EMAIL"], os.environ["GMUSICAPI_PASSWORD"], os.environ["GMUSICAPI_MACADDR"]) | |
for track in c.get_album_info(sys.argv[1], include_tracks=True)["tracks"]: | |
try: | |
fn = "{trackNumber:0>2} {artist} - {title}.mp3".format(**track).replace("/", "-") | |
print(fn) | |
p = subprocess.run(["wget", c.get_stream_url(track["storeId"]), "-O", fn], stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL) |