Skip to content

Instantly share code, notes, and snippets.


FTP ftpmorph

  • LDN
View GitHub Profile
ftpmorph /
Last active Apr 21, 2022
Samsung Galaxy Z Fold 3 (+ Fold 2, Flip 2/3, S20/S21, Note 20/21 etc...) and Galaxy Watch 4 debloating reference
# Tips for what is safe to remove for latest gen Samsung Android phones
# Does not require root, only Android Debug Bridge (adb)
# Has been tested on both a Samsung Galazy Z Fold 3 and Samsung Galaxy A71 both running Android 11 with One UI 3.1.1
# Have not noticed any crashes or other bugs, however if you decide you want an app/service back for any reason, simply run:
# pm install-existing --user 0
# Where "" can be any preinstalled package you have removed
# Can also be run as a bash script to automate removal of everything here once below steps are followed
# It is also a good idea to run this after each OS update as if one of these components is updated it is sometimes reinstalled
ftpmorph / Details and config tips.txt
Last active Jan 30, 2021
Amazon AWS S3 IAM permissions required for Mastodon
View Details and config tips.txt
When setting up a Mastodon instance I had a very hard time working out the required S3 permissions.
Wasted a day on it. None of the tutorials or even the official documentation gave me this information.
In the end I gave up and just gave it blanket access to all permissions for the Mastodon bucket (S3Administrator).
But this didn't set well with me - I don't like granting unnecessary permissions, especially not when S3 has about 100 of them.
If the server were to become compromised or the keys were to otherwise fall into the wrong hands I'd want a potentially malicious actor to have as limited permissions as possible.
Anyway I finally worked out the permissions required to for Mastodon to function with an S3 bucket as its media storage.
See below for the IAM policy.
ftpmorph / mastodon automated cache wipe.txt
Last active Mar 12, 2021
mastodon user's crontab to keep cache from piling up - login to mastodon acct and run crontab -e to add this
View mastodon automated cache wipe.txt
# Output of commands will be written to log files specified in home folder of mastodon user
# This allows for easy debugging, but once you know it works you can remove the part starting at >> to disable logging
# Conversely if you want more output in the log you can add "--verbose" to the command
# Tried and tested successfully with mastodon v3.3.0 and the v3.3.0+glitch fork.
# Clears cached media from other instances that's over a week old by default. You can add "--days 3" for example to clear out media quicker.