This file contains 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
/* | |
After purchasing a humble book bundle, go to your download page for that bundle. | |
Open a console window for the page and paste in the below javascript | |
this fork downloads all formats and does so without using jquery (since that didnt work for me) | |
note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this | |
Settings (chrome://settings) --> Advanced --> Privacy and security --> Content settings --> PDF documents --> Download PDF files instead of automatically opening them in Chrome --> Turn ON | |
Settings (chrome://settings) --> Advanced --> Downloads --> Ask where to save each file before downloading --> Turn OFF | |
*/ |
This file contains 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 extractDomain(data): | |
# Remove protocol part of url | |
data = re.sub(r"^http(s)?\x3a\x2f\x2f", "", str(data), flags=re.IGNORECASE) | |
# Remove part after FQDN | |
data = re.sub(r"\x2f(.*)$", "", str(data), flags=re.IGNORECASE) | |
# Remove port | |
data = re.sub(r"\x3a\d{1,}$", "", str(data), flags=re.IGNORECASE) |
This file contains 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
function Get-IniFile { | |
<# | |
.SYNOPSIS | |
Read an ini file. | |
.DESCRIPTION | |
Reads an ini file into a hash table of sections with keys and values. | |
.PARAMETER filePath | |
The path to the INI file. |
This file contains 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
// This is an example of connecting poles from | |
// https://gist.github.com/BarDweller/f467cb58f5c252efda60eaa6777309ca | |
poleradius = 9/2; //radius of pole | |
socketdepth = 15; //depth required for pole socket (note: not absolute due to ball join) | |
totalplugsize = 20; //exterior depth of pole corner | |
wallthick = 2; //thickness for walls | |
joinangle = 120; //angle to join two connectors at. | |
smoothness = 64; //number of faces for cylinder/sphere. |