Skip to content

Instantly share code, notes, and snippets.

View dado3212's full-sized avatar

Alex Beals dado3212

View GitHub Profile
@dado3212
dado3212 / requirements.txt
Created May 23, 2025 11:44
Script for selecting everything in automation
pyobjc
@dado3212
dado3212 / Info.plist.txt
Last active May 23, 2025 22:26
Shortcuts.app Info.plist for deeplink schemes (part of writeup at https://blog.alexbeals.com/posts/reverse-engineering-ios-deeplinking-for-shortcuts)
shortcuts-production
shortcuts
workflow
workflow000000
workflow1B9AF7
workflow7B72E9
workflow49E845
workflow55DAE1
workflow3871DE
workflow19BD03
@dado3212
dado3212 / search_sqlite_for_column.py
Created January 31, 2025 08:42
Search all tables in a SQLite database for a specific column
import sqlite3
def search_in_all_tables(db_path, text):
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
cursor.execute("SELECT name FROM sqlite_master WHERE type='table'")
tables = [t[0] for t in cursor.fetchall()]
results = []
for table in tables:
@dado3212
dado3212 / hp1gba_text_decrypt.lua
Created December 16, 2024 02:27
Extracts all of the strings from the Harry Potter 1 game for GBA
function decompressString(memoryOffset)
-- this is 0x0300064C in IWRAM and is updated when you change languages
local englishOffset = 0x0804BFD8
local position = memory.read_u8(memoryOffset)
local totalString = ""
local cap = 0
local bitCounter = 0
while cap < 9000 do
@dado3212
dado3212 / extractAltText.py
Created April 3, 2023 19:22
A script to extract the alt text from images in an ePub
from ebooklib import epub
import io
from PIL import Image
from bs4 import BeautifulSoup
# Open the EPUB file
book = epub.read_epub('frugal.epub')
image_alts = {}
raw_images = {}
@dado3212
dado3212 / downloadPearls.py
Created October 12, 2018 04:08
A download script to download all of the PearlsBeforeSwine comic strips, and run them through OCR
import datetime, requests, re, urllib
from StringIO import StringIO
from PIL import Image
import pytesseract
from cgi import escape
import json
base_url = "http://www.gocomics.com/pearlsbeforeswine/"
start_date = datetime.datetime(2002, 1, 7)
headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"}
#!/bin/bash
recepients=(
"[email protected]"
)
sender="[email protected]"
senderName="Sender Name"
# error handling
@dado3212
dado3212 / SearchTexts.py
Last active September 29, 2017 06:54
Searches through all of your texts for one matching a string
__author__ = "Alex Beals"
import sqlite3, markovify, codecs, warnings, os
# Handle errors from running on Python 2.7 (emoji support)
warnings.simplefilter("ignore")
print("Connecting to chat database...")
# Extract all of my texts from the 'db' file
@dado3212
dado3212 / ConcatenateVCards.py
Last active September 25, 2017 05:21
Creates one giant vCard from a multitude of contacts
# Name: Alex Beals
# Description: Turn an array of contact data into a single vCard for easy import
# Returns a string created from a first and last name, and an optional phone number and email address
def createContact(firstname, lastname, phone="", email=""):
contact = "BEGIN:VCARD\r\n"
contact += "VERSION:2.1\r\n"
contact += "N;LANGUAGE=en-us:" + str(lastname) + ";" + str(firstname) + "\r\n"
contact += "FN:" + str(firstname) + " " + str(lastname) + "\r\n"
if (phone != ""):
@dado3212
dado3212 / ridethebus.py
Created August 13, 2017 00:09
Ride the Bus testing
import itertools, random, csv
suits = ["Spades", "Diamonds", "Hearts", "Clubs"]
values = ["Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"]
class InfiDeck:
def __init__(self):
self.deck = self.new_deck()
self.new_decks = 0
self.cards = 0