@michael@thms.uk cover
@michael@thms.uk avatar

michael

@michael@thms.uk

Full stack web developer currently working mostly with #PHP / #Laravel, Vanilla #Javascript and #SCSS. Love learning more about (almost) anything, but particularly #MySQL and #InfoSec. Currently learning Arabic. Husband, father of two boys, Christian.

This profile is from a federated server and may be incomplete. For a complete list of posts, browse on the original instance.

michael , to random
@michael@thms.uk avatar

How did I only just now learn about PHP WeakMaps? Sounds like a really really cool thing for caching.

https://php.watch/articles/practical-weakmap

#PHP

michael , to random
@michael@thms.uk avatar

What on earth?! Amazon S3 charges you for unauthorised requests to S3?!

That's just absolutely insane! I better check my AWS account and delete any unused buckets I have in there …

https://medium.com/@maciej.pocwierz/how-an-empty-s3-bucket-can-make-your-aws-bill-explode-934a383cb8b1

#aws #s3 #infosec #webdev #cloud

BeAware , to random
@BeAware@social.beaware.live avatar

After looking through a few of the guides I was recommended, I'm realizing that this whole idea might be over my head...😬

#Fedi #Fediverse #MastoAdmin #Mastodon #FediAdmin

michael ,
@michael@thms.uk avatar

@BeAware LOL. yeah, scaling mastodon isn't a simple 'do this to achieve that' sort of thing.

requires a bit of experimentation...

BeAware , to random
@BeAware@social.beaware.live avatar

Ugh. I wish Fedi wasn't so reliant on domains....

Back when my naive self started Fedi, I went with the most known software (mastodon). But after months of dev incompetence, it's obviously not where I want to be, but I like my domain....

I guess I'm basically stuck with all these bad UI updates and no moderation features....😬🤦‍♂️

michael ,
@michael@thms.uk avatar

@BeAware do you have a summary / screenshot of that by any chance? I can’t access it 🙄@RxBrad

BeAware , to random
@BeAware@social.beaware.live avatar

So....I want to migrate from Mastodon to Sharkey. The catch is, I would LIKE to end up back on my current domain....is this possible at all?

I have a domain I could park a Sharkey instance to migrate to, but if I make a new Sharkey instance on my current domain after I shut the Mastodon instance down, will I be able to migrate back with little issue?🤔

#Fediverse #Mastodon #MastoAdmin #FediAdmin #Sharkey #SharkeyAdmin

michael ,
@michael@thms.uk avatar

@BeAware you might be able to do this via a 2 step migration:

Firstly migrate to an instance at temp.beware.live. Then do a self destruct on your old instance. Importantly wait for all sidekiq jobs to finish afterwards. This may take hours, days, or weeks.

Finally set up a new instance on your domain and migrate to it.

This may or may not work, so do at your own risk, but this is the only way I could conceptually imagine it might work. I’ve never heard of anyone actually attempting it, though, so this seems unknown territory…

BeAware , to random
@BeAware@social.beaware.live avatar

Is there any reason to keep a service like mailgun if I don't have emails turned on for my instance and I won't be receiving new sign ups?

#Mastodon #MastoAdmin #FediAdmin #Fediverse

michael ,
@michael@thms.uk avatar

@BeAware probably not. But if you turn on emails in a year’s time and am confused that you don’t get any: will you remember that you deactivated Mailgun?

michael ,
@michael@thms.uk avatar

@BeAware oh. I’m on their free plan.

Yes, you absolutely can send from multiple providers (combine SPF and have multiple DKIM records).

But you can only use one provider for receiving email. You probably don’t need mx records for Mailgun though, as Mailgun isn’t usually used for receiving email

michael ,
@michael@thms.uk avatar

@BeAware I think Mailgun by default sort of suggests setting up mx records, but you don’t need them if you only use Mailgun for mastodon, and can remove them without any effect whatsoever.

Personally I use Mailgun for sending from mastodon, and Fastmail for everything else on the same domain. It’s definitely possible

BeAware , to random
@BeAware@social.beaware.live avatar

So, quick Linux Mastodon Admin question from a noob...

If I want to cronjob certain tootctl commands to run weekly can I just put them in the crontab with @weekly? I tried using the script from https://ricard.dev/improving-mastodons-disk-usage/ but it doesn't seem to run anymore after the last few Mastodon updates.

When setting up the script originally, I used the traditional way of setting it weekly, but I saw in the crontab that there's a few already in there with @weekly set so I was wondering if I could just set the commands themselves in the crontab like that.

Thanks for any help. Appreciate it.

michael ,
@michael@thms.uk avatar

@BeAware I don’t usually use @weekly because I’m old school, but virtually all Linux distros now support it afaik.

If @weekly already appears in your crontab, your distro most likely does support it.

Two tricks to keep track of whether your cron jobs are running:

  1. append something like > ~/cleanup.log 2>&1 to each line of your cronfile (different file name for each command). That will store all output (including error messages) in the specified file, allowing you to debug potential errors

  2. implement something like https://healthchecks.io/ to get automatic alerts when your cron job fails.

michael ,
@michael@thms.uk avatar

@BeAware yes. My personal preference would be to write one single bash script that contains all the commands though.

Experience has shown me that this is usually easier to test and keep track of.

michael ,
@michael@thms.uk avatar

@BeAware one thing that comes to mind is that cron jobs often run with different environment variables (including different PATH) than when you run the script manually.

That may cause a command to fail in cron that runs fine when run manually.

I’ve been bitten by this more often than I want to admit 😬

Redirecting the output into a log file as discussed earlier will show if that’s the cause.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • test
  • worldmews
  • mews
  • All magazines