home.social

#how-to — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #how-to, aggregated by home.social.

fetched live
  1. CW: Food: The greatest How To ever.

    Do you love Cheeze-its? Ever dream of having a giant Cheeze-it? I am here to make your dreams come true.

    #PeerTube #Video #baking #cooking #howto

    dudelike.wtf/w/xr26Wka34G5uhwF

  2. 🆕 blog! “A simple "copy this code" button in JavaScript”

    Next to all the code samples on this blog is a little "copy" button. That makes it easier to grab any of the code I've shared.

    The HTML and JS is delightfully simple:

    <button
    onclick="navigator.clipboard.writeText(
    this.parentNode.getElementsByTagName('code')[0].textContent
    );"

    👀 Read more: shkspr.mobi/blog/2026/08/a-sim

    #HowTo #HTML #javascript

  3. A simple "copy this code" button in JavaScript

    shkspr.mobi/blog/2026/08/a-sim

    Next to all the code samples on this blog is a little "copy" button. That makes it easier to grab any of the code I've shared.

    The HTML and JS is delightfully simple:

    <button
        onclick="navigator.clipboard.writeText(
            this.parentNode.getElementsByTagName('code')[0].textContent
        );" 
        title="Copy code"
    >⧉</button>
    

    The navigator.clipboard.writeText needs a user interaction to work - so it is tied to a click on the button.

    It takes some plaintext content. But how to get that content? My code samples look like this:

    <pre itemscope itemtype=https://schema.org/SoftwareSourceCode translate=no>
        <button onclick="navigator.clipboard.writeText( this.parentNode.getElementsByTagName('code')[0].textContent );">⧉</button>
        <span>
            <img alt height=32 src=html.svg width=32>
            <span itemprop=programmingLanguage> HTML</span>
        </span>
        <code itemprop=text>[…]</code>
    </pre>
    

    There are various ways I could get that <code> element:

    • Give it a unique ID (but that might clutter the code, or conflict with something else).
    • Use this.nextSibling.nextSibling (but that might not work if the layout changes).
    • Use this.lastChild.textContent (but, again, depends on the layout staying the same).
    • Select based on itemprop (could make the code a bit longer).
    • Complex filtering on a NodeList (urgh).

    None of those are particularly bad per se, so I've chosen the method which makes most sense to me.

    You can read more about my Classless Design, and how I use metadata to identify programming languages, including whether HTML's code blocks be translated.

    To let people know that it has worked, I've added a little popover.

    Every piece of code has it's own dialog element with a unique id:

    <dialog
        id=pop
        popover=hint>Copied JS to 📋</dialog>
    

    No JavaScript is required to show the popover when the copy button is pressed:

    <button popovertarget=pop popovertargetaction=show>
    

    Closing the the popover hint doesn't require JS; clicking outside it will dismiss it. But a little scrap of JS on the button's onclick will make it disappear after a few seconds:

    setTimeout(
        function() {
            document.getElementById("pop").hidePopover();
        }, 
    3000);
    

    The browser's default is to place it in the middle of the screen.

    Positioning the popup so it is in proximity to the button also requires CSS - no JS.

    dialog[popover] {
        inset: unset;
        position: absolute;
        position-area: top;
        padding: .5em;
    }
    

    OK, that started out simple but got a bit more complex. Sorry!

    Update! It turns out there are some accessibility issues with this approach. See these updates by Curtis Wilcox.

    #HowTo #HTML #javascript
  4. Find Love With Emily
    The podcast for successful, single women in their 30s and 40s, exhausted by dating and wondering why love's so hard to find...

    Great Australian Pods Podcast Directory: greataustralianpods.com/loved-

    #AusPods #Podcasts #Podcasting #Australia #Society #Culture #HowTo #Relationships

  5. Do you wanna be an alt-text rockstar? I got you.

    I just published a comprehensive guide on the when, what, and how of image descriptions. There are sections for design/development practitioners and social media posters alike.

    So read up, then get your alt-text on.

    markwrites.io/alt-text-is-the-

    #Accessibility #Article #AltText #Guide #HowTo #A11y #Design #Development #Code #SocialMedia

  6. 💁🏻‍♀️ ICYMI: 🔢🎲 Mathematician Ben Sparks introduces the 15-game, a two-player number #game where players take turns picking digits from 1 to 9 to reach a sum of 15. He explains how visual #diagrams can simplify complex strategies and change how we approach mathematical problems.

    👉 Learn more: seethis.tv/post/15-game-mathem

    #dataviz #data #diy #games #howto #math #numbers #patterns #play #shapes #squares #toys #tricks #geometry #puzzles #education #learning #logic #addition #tksst #video

  7. It’s a Binary World 2.0: More Fun With Local AI Models. “A few days ago I mentioned playing around with local AI models, despite having low strength hardware for the task. Yesterday I was trying our some new models – tinyllama and smollm2 – and I asked each model the same question to compare the answers. After doing this for a few questions, I had the same feeling I always have when I’m doing […]

    https://rbfirehose.com/2026/08/22/its-a-binary-world-2-0-more-fun-with-local-ai-models/
  8. Lifehacker: Social Media Platforms Are Training Their AI Models on Your Content, but You Can Stop Them (Sometimes). “Even if you find out how your data’s being used, many sites simply don’t offer you the ability to opt out. And of all the ones I looked at, not a single one that trains AI offers an opt-in model. Put simply, if you logged on today, tech companies took that as your consent to […]

    https://rbfirehose.com/2026/08/22/lifehacker-social-media-platforms-are-training-their-ai-models-on-your-content-but-you-can-stop-them-sometimes/
  9. My new #zine is out - you can learn how to #doodle in my wild Scribbly-Wobbly-Timey-Wimey Style. 😁
    And if you are quick - you get it for free during the week-end: ko-fi.com/s/507f02742a

    But you can also give what you want, I'm still collecting for those waiting horror bills ... ko-fi.com/naturematchcuts/goal

    I do these #doodles after a stressful day and even as illustrations for my blog.

    #doodling #drawing #HowTo #zines #art #MastoArt #zinester #colouring #wellness #wellbeing #creativeProcess

  10. 💁🏻‍♀️ ICYMI: 🔢🎲 Mathematician Ben Sparks introduces the 15-game, a two-player number #game where players take turns picking digits from 1 to 9 to reach a sum of 15. He explains how visual #diagrams can simplify complex strategies and change how we approach mathematical problems.

    👉 Learn more: seethis.tv/post/15-game-mathem

    #dataviz #data #diy #games #howto #math #numbers #patterns #play #shapes #squares #toys #tricks #geometry #puzzles #education #learning #logic #addition #tksst #video

  11. Speaking With Confidence With Cat Matson: Communication Coaching For Humble Leaders
    This show is for humble leaders - public servants, corporate hippies and business owners - who want to speak up and be heard without sounding pushy or arrogant...

    Great Australian Pods Podcast Directory: greataustralianpods.com/speaki

    #AusPods #Podcasts #Podcasting #Australia #Education #HowTo #SelfDevelopment #Advice

  12. Hey I'm not a music dummy but I'm a MIDI / synth / VST(??) dummy so anyone got any favorite introductory guide books?

    I'm such a… classical musician. 🙃 All I ask is do NOT make me learn midi tab.

    (Reminds me of the time my ex made me transpose the Violin II part of the entire Sweeney Todd orchestra score into alto clef so he could fill in on viola (we were in the pit together for several shows - I was playing Toby in this one). I mean, he could read treble clef, at least well enough to re-write it. But he made me do it.)(TBF I was quicker but - he would have been just as quick by the end if he'd done it himself! Acquire new / improve current skills when given the chance, people.)


    #Synth #MIDI #how-to #how-to-guide #hardware #software #really-interested-in-organic-expressive-stuff #music #music-how-to #synthesizer #midi-controller
  13. To keep a Windows PC running fast and safe, install critical updates, clear junk files regularly, manage startup apps, and run virus scans using built-in tools like Windows Security and Storage Sense. windowscult.com/make-windows-f

    #windows11 #tech #howto