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
| [[gateway]] | |
| name="mygateway" | |
| enable=true | |
| [[gateway.inout]] | |
| account="discord.myserver" | |
| channel="general" | |
| [gateway.inout.options] | |
| WebhookURL="https://discordapp.com/api/webhooks/NNNNN/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
| [[gateway.inout]] | |
| account="slack.myteam" |
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
| [Interface] | |
| Address = 192.168.2.1/24 | |
| Table = 51820 | |
| PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i %i -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
| PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i %i -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE | |
| ListenPort = 51820 | |
| PrivateKey = <PrivateKey> | |
| # Jerry | |
| [Peer] |
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
| if ($username -eq "" -or $api_key -eq "" -or $serverId -eq "") { | |
| echo "Please edit this script and fill in the variables at the top before using it" | |
| exit | |
| } | |
| $auth_body = @{ | |
| auth = @{ | |
| "RAX-KSKEY:apiKeyCredentials" = @{ | |
| username = "" | |
| apiKey = "" |
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 requests | |
| import re | |
| from glob import glob # Google this. It's really good! | |
| from os.path import basename, join # Basename removes the path part of a file, returning only the filename. Can also handle urls. | |
| from concurrent.futures import ThreadPoolExecutor # For our concurrent downloads in download_many. | |
| def get_urls(data, pattern): | |
| urls = pattern.findall(data.text) | |
| endings = ['.pdf', '.mobi', '.epub'] |
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 | |
| from html.parser import HTMLParser | |
| import requests | |
| class MyHTMLParser(HTMLParser): | |
| book_title = "" | |
| start_title_check = False | |
| grab_book_title = False | |
| def handle_starttag(self, tag, attrs): |