Skip to content

Instantly share code, notes, and snippets.

@fmagin
fmagin / make_audiobook.py
Created July 24, 2021 15:35 — forked from madebyollin/make_audiobook.py
Converts an epub or text file to audiobook via Google Cloud TTS
#!/usr/bin/env python3
"""
To use:
1. install/set-up the google cloud api and dependencies listed on https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/texttospeech/cloud-client
2. install pandoc and pypandoc, also tqdm
3. create and download a service_account.json ("Service account key") from https://console.cloud.google.com/apis/credentials
4. run GOOGLE_APPLICATION_CREDENTIALS=service_account.json python make_audiobook.py book_name.epub
"""
import re
import sys
@fmagin
fmagin / RenameFunctionsFromDebugPrints.java
Created June 5, 2019 09:07 — forked from astarasikov/RenameFunctionsFromDebugPrints.java
Ghidra script to rename functions from debug prints
/* ###
* IP: GHIDRA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@fmagin
fmagin / sprunge_get
Last active August 29, 2015 14:10
You give the script the four letter identifier after sprunge.us/ and an optional filename( if noone is given it defaults to the letter identifier), and it downloads it. Utilizes AES decryption with static key for imrpoved privacy for personal files
#!/bin/bash
decrypt="openssl enc -aes-256-cbc -base64 -d -k $key"
url="sprunge.us/$1"
file="$(curl $url | $decrypt)"
if [ "${file:0:9}" == "Filename:" ]; then
echo Filename found
firstline=$(echo "$file" | head -1)
filename=${firstline:9}
content=$(echo "$file" | tail -n +2)
echo "$content" > $filename