This file contains hidden or 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 | |
# Linux usage: ./extract_tampermonkey_script.py "/home/<USER>/.config/<BROWSER>/Default/Local Extension Settings/<EXTENSION_ID>" | |
# i.e.: ./extract_tampermonkey_script.py "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf" | |
# Mac usage: ./extract_tampermonkey_script.py "/Users/<USER>/Library/Application Support/Google/Chrome/Default/Local Extension Settings/<EXTENSION_ID>/" | |
# i.e.: ./extract_tampermonkey_script.py "/Users/foo/Library/Application Support/Google/Chrome/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/" | |
import leveldb | |
import sys | |
import re |
This file contains hidden or 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 | |
# Auto rotate screen based on device orientation | |
# based on https://linuxappfinder.com/blog/auto_screen_rotation_in_ubuntu | |
# install | |
# 1. apt-get install iio-sensor-proxy inotify-tools | |
# 2. add script to autostart | |
# Receives input from monitor-sensor (part of iio-sensor-proxy package) | |
# Screen orientation and launcher location is set based upon accelerometer position |
This file contains hidden or 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
for line in $(sqlite3 /root/minidlna/files.db "SELECT ID,PATH FROM DETAILS WHERE TITLE='HERE THE NONE UNIQUE TITLE';"); | |
do | |
id=$(echo $line | cut -d"|" -f1); | |
path=$(echo $line | cut -d"|" -f2); | |
echo $id; | |
echo $path; | |
sqlite3 /root/minidlna/files.db "UPDATE DETAILS SET TITLE='$(basename $path)' WHERE ID=$id;"; | |
done; | |