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
# From: https://stackoverflow.com/questions/29082422/ffmpeg-video-compression-specific-file-size | |
# Here's a way to do it automatically with a bash script | |
# Just call like ./script.sh file.mp4 15 for 15mB | |
# Audio Bitrate is 64k | |
# TODO: Write a simple wrapper, make audio variable / add controls | |
bitrate="$(awk "BEGIN {print int($2 * 1024 * 1024 * 8 / $(ffprobe \ | |
-v error \ | |
-show_entries format=duration \ |
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 | |
# A bit of a hack... useful for old bank docs and PDFs as a | |
# first step to converting to CSV before importing to a | |
# spreadsheet or accounting application | |
# Requires Imagemagick and Tesseract: | |
# brew install imagemagick | |
# brew install tesseract |
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 | |
# The first script (I) will show you locations of the bot servers / proxies. | |
# The second (II) denies access. | |
# NOTE: Use an automated service like fail2ban before using these scripts. | |
# These are handy for bots that slip through the cracks. | |
# | |
# Ref: https://stackoverflow.com/questions/67812746/someone-made-some-wp-wlwmanifest-xml-http-requests-but-why | |
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 | |
# This is a simplified version of this script: https://gist.github.com/earthgecko/3089509 | |
# "Random numbers in a range, more randomly distributed than $RANDOM | |
# which is not very random in terms of distribution of numbers." | |
# You may want to add a reference to your .bashrc file, e.g.: | |
# alias rnd="path/to/script/rnd.sh" |