Skip to content

Instantly share code, notes, and snippets.

View antipatico's full-sized avatar
👨‍💻
Let's play Global Thermonuclear War.

antipatico

👨‍💻
Let's play Global Thermonuclear War.
View GitHub Profile
@antipatico
antipatico / GameActivity.java
Created April 15, 2024 13:05
ACTION_OPEN_DOCUMENT_TREE save files PoC for Love Android
/*
* Copyright (c) 2006-2024 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
@antipatico
antipatico / ocrpdf.sh
Last active January 23, 2021 15:37
Take a PDF, OCR it, and add OCR Text as background layer to original PDF to make it searchable.
#!/bin/bash
# Take a PDF, OCR it, and add OCR Text as background layer to original PDF to make it searchable.
#
# Hacked together using tips from these websites:
# http://www.jlaundry.com/2012/ocr-a-scanned-pdf-with-tesseract/
# http://askubuntu.com/questions/27097/how-to-print-a-regular-file-to-pdf-from-command-line
#
#
# Derived from: https://gist.github.com/jburon/d31e0132dfb291dc804bac019f9d9023
/*
* cloudflare's email-decode.js
*
* (manually) "decrypted" by antipatico (github.com/antipatico)
*
* All Wrongs Reversed (Ↄ), 2018
*/
! function() {
"use strict";
#!/bin/bash
# Created by antipatico (antipatico.ml)
# Download the latest cloudflare's IPv4 ranges and create an ipset
# named "cloudflare" you can later use in your iptables rules.
IPSV4=$(mktemp)
wget --quiet -O $IPSV4 https://www.cloudflare.com/ips-v4
ipset destroy cloudflare
ipset create cloudflare hash:net
while read -r range; do