Skip to content

Instantly share code, notes, and snippets.

@ilovefreesw
ilovefreesw / pdfcompress.py
Created December 30, 2021 12:53
A Python script to batch compress PDF files on Windows, MAC, and Linux. Make sure gs and Python are in PATH before running this script.
from __future__ import print_function
import os
import subprocess
root = "."
try:
os.mkdir('compressed')
except FileExistsError:
pass
@iwakura
iwakura / mount_fwextfs
Last active March 18, 2020 11:19
mount ext3fs from firmware image
#!/bin/sh
fail() {
echo $1 1>&2
exit $2
}
[ $# -eq 2 ] || fail "Usage: `basename $0` fw.img /mount/point" 1
[ `which bgrep` ] || fail "Please install bgrep tool." 2
[ -r $1 ] || fail "Unable to locate image file: $1" 3
@frenck
frenck / hassio_ubuntu_install_commands.sh
Last active February 1, 2023 05:38
Simple install command for installing Hass.io on a Generic Ubuntu/Debian machine
Unbuntu is no longer support by the Home Assistant project.
The installation commands previous listed here, are not up 2 date, not recommended, not supported and, therefore, removed.