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
#!/usr/bin/env python | |
import ebookmeta | |
import argparse | |
# Initialize the argument parser | |
parser = argparse.ArgumentParser(description='Process arguments.') | |
# Add the mandatory arguments | |
parser.add_argument('series_name', help='Series Name (allowing spaces)', type=str) | |
parser.add_argument('series_index', help='Series Index', type=str) |
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
#!/usr/bin/env python | |
import openai | |
import ast | |
import os | |
openai.api_key = 'sk-SAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxj' | |
userprompt =""" | |
You can have a multi-line prompt here. |
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
#!/bin/bash | |
#Requires exiftool installed | |
#Subfolder to store results in | |
containingfolder="./epubs-folder/" | |
for i in *.epub; do | |
[ -f "$i" ] || break |
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
start_countdown(); | |
function start_countdown() { | |
for (let i = 1; i <= 2; i++) { | |
setTimeout(function timer() { | |
window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' }) | |
if (i == 2) { | |
export_csv_favorites(); | |
} | |
}, i * 4000); |
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 generateTextDownload(filename, text, type='text/plain;charset=utf-8') { | |
// Create an invisible A element | |
const a = document.createElement('a'); | |
a.style.display = 'none'; | |
document.body.appendChild(a); | |
var BOM = new Uint8Array([0xEF,0xBB,0xBF]); | |
// Set the HREF to a Blob representation of the data to be downloaded |
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 generateDownload(filename, text, type='text/plain;charset=utf-8') { | |
// Create an invisible A element | |
const a = document.createElement('a'); | |
a.style.display = 'none'; | |
document.body.appendChild(a); | |
var BOM = new Uint8Array([0xEF,0xBB,0xBF]); | |
// Set the HREF to a Blob representation of the data to be downloaded |
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 script creates a PrivateBin using Python 3. | |
Code is based on https://github.com/r4sas/PBinCLI repository. | |
Thanks a lot @r4sas! | |
Below modules should be installed in the environment. | |
requests | |
base58 | |
pycryptodome | |
""" |
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
import subprocess | |
result = subprocess.run(['mullvad', 'status'], stdout=subprocess.PIPE) | |
mullvad_status = result.stdout.decode('utf-8') | |
if 'Disconnected' in mullvad_status: | |
print('Mullvad VPN is Disconnected: Connect and try again') | |
quit() | |
else: | |
print('Mullvad VPN is Active, continuing: ') |
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
window.addEventListener("load", fixStupidDiscordSpellcheck, false); | |
window.addEventListener('locationchange', fixStupidDiscordSpellcheck, false); | |
window.addEventListener('hashchange', fixStupidDiscordSpellcheck, false); | |
function fixStupidDiscordSpellcheck(event){ | |
setTimeout(function() { | |
var textBoxes = document.querySelectorAll('div[role="textbox"]'); |
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
window.addEventListener("load", function(event) { | |
const ratingtd = document.getElementById("ratingstdtitle"); | |
const orig_rating = document.getElementById("form_rating").value; | |
const button = document.createElement('a'); | |
button.setAttribute("id", "rate-button"); | |
button.innerHTML = "<h3>Rate Book (Current Rating: "+orig_rating+")</h3>" |
NewerOlder