[–] 1 point 1 month ago* (1 child)

This might go beyond what you were asking for, but I'm always more comfortable handling file paths, deletions and errors in Python.

#!/usr/bin/env python3

import shutil
from pathlib import Path
from tempfile import TemporaryDirectory

# Refuse to run without Python's symlink-resistant cleanup.
if not getattr(shutil.rmtree, "avoids_symlink_attacks", False):
    raise RuntimeError("Symlink-resistant cleanup is unavailable")

with TemporaryDirectory(prefix="test-run-", dir="/tmp") as name:
    tests = Path(name) / "tests"
    tests.mkdir(mode=0o700)
    print(f"Created {str(tests)!r}", flush=True)

    try:
        # Put your test code here.
        (tests / "example.txt").write_text(
            "temporary data\n", encoding="utf-8"
        )
    finally:
        print(f"Cleaning {name!r}", flush=True)

# The entire temporary directory has now been removed.
  • source
  • This feels like a very US-specific way of framing it. In the UK and much of Europe, many of those “societal-level solutions” already exist to varying degrees: healthcare and mental healthcare free at the point of use, unemployment support, benefits towards rent, social and temporary housing, legal homelessness-prevention duties, and Housing First programmes.

    They’re nowhere near perfect. We have social-housing shortages, benefit limits, long healthcare waiting lists and plenty of people who still fall through the gaps. But the response doesn’t have to begin and end with moving homeless people somewhere less visible to protect property values.

    Your point that individual businesses and property owners cannot solve homelessness is completely fair. That’s precisely why they should sit behind a publicly funded safety net which helps keep people housed and supports them back into stability, instead of leaving everyone involved to deal with the consequences.

  • source
  • parent
  • context
  • [–] 5 points 2 months ago (1 child)

    That’s completely fair! Sorry, I underestimated the cost and the problem of getting permission as a renter. I looked into it properly and, although the plastic covering and curtain are cheap, constructing the drainage, sloped floor and waterproofing can still cost around £6,000–£8,500 here. If you’re comfortable saying which country or state you’re in, I’d still be happy to check whether there are any local grants, charities or tenant protections that might help. No need to give your precise location.

  • source
  • parent
  • context
  • [–] 9 points 2 months ago* (last edited 2 months ago) (3 children)

    No offense intended, but isn't that why shower rooms were invented? Waterproof the walls/floor with that cheap plastic stuff, curved edges on the walls for easy cleaning, plastic curtain on rails on the ceiling for blocking most of the water. Slope it down into the floor drain. No steps or doors. Is there really no safety net to get this sort of thing installed where you live? I would happily contribute a bit to a gofundme link for this, and I'm sure there's plenty of others who would too. Example https://www.gofundme.com/f/helping-ric-live-safely-in-his-later-years?cp_src=m . Ideally social services should have grants for this sort of thing though. There may be one you can access depending on where you live, DM me and I'd happily put in a bit of research to help you find out if this is an option.

    Edit: UK example https://www.gov.uk/disabled-facilities-grants/what-youll-get

  • source
  • parent
  • context
  • Overall, Coke is most affordable compared with minimum wage in England, especially when Coke Zero is on offer, then Helsinki; in the US it takes the most minimum-wage work to buy a litre, and because regular and sugar-free cost exactly the same, there’s no price incentive at all to choose the sugar-free one.

    In England for a 24 pack (330ml?), sugar is £15 (€17.5, $20 USD), sugar free is £12 with a deal for £8.50 (€10, $11.5 USD), no deals for the sugar one! £12.71 is minimum wage here (€14.86, $17.21 USD). In US Walmart I see 24 pack of sugar and non sugar for $15.37 USD (12 OZx24) and US minimum wage is $7.25 USD (£5.40, €6.30).

    Location and drink EUR per litre GBP per litre USD per litre
    Helsinki — regular Coke €2.46 £2.10 $2.85
    Helsinki — Coke Zero €1.96 £1.67 $2.26
    England — regular Coke €2.22 £1.89 $2.56
    England — Coke Zero, normal price €1.77 £1.52 $2.05
    England — Coke Zero, offer price €1.26 £1.07 $1.45
    US Walmart — regular Coke €1.56 £1.33 $1.80
    US Walmart — Coke Zero €1.56 £1.33 $1.80
    Location and wage benchmark EUR/hour GBP/hour USD/hour Work for 1 litre of regular Coke Work for 1 litre of Coke Zero
    Helsinki — first-year supermarket minimum €11.61 £9.92 $13.43 12.7 minutes 10.1 minutes
    UK — adult minimum wage €14.87 £12.71 $17.20 8.9 minutes 7.2 minutes normally; 5.1 on offer
    US — federal minimum wage €6.27 £5.36 $7.25 14.9 minutes 14.9 minutes
  • source
  • parent
  • context
  • [–] 4 points 3 months ago* (1 child)

    You must get this sort of thing a lot, but why is the palace of Westminster missing, imo it's second in impressiveness only to Buckingham palace and it's fairly world famous. https://en.wikipedia.org/wiki/Palace_of_Westminster

    And the palace of Whitehall is listed as number 7 in England, but I've never heard of it, it's mostly destroyed, and what's left is not that impressive. If it's on historical value then fair enough, but still would have thought that Westminster makes the cut.

  • source
  • parent
  • context
  • [–] 13 points 4 months ago (1 child)

    I block DOGE, Trump and Elongated Muskrat as keywords, because Lemmy sometimes thinks it's AmeriLemmy, and I just don't care. But the blocks don't work on comments or pictures. Using Voyager app, anyone have any ideas?

  • source
  • [–] 2 points 5 months ago* (last edited 5 months ago)

    Reticulum is peer to peer via any method, including the internet, it's more a protocol than a meshnet. Has text based websites too btw. Mostly chat apps and forums, as well as some blogs and libraries. It's pretty neat, but takes a little setting up and is fairly niche right now. Feels like the original internet culture, people building things just because they can and building communities also.

    Meshtastic is definitely also not too slow and is pure LoRa, it's just a bit lossy and has range issues in busy networks. You can do voice chat over it if you have strong enough links.

  • source
  • parent
  • context
  • view more: next ›