Just a geek, finding my way in the fediverse.

  • 1 Post
  • 16 Comments
Joined 3 years ago
cake
Cake day: June 11th, 2023

help-circle


  • That’s mostly correct. If we want to be super technical, I’m not “logging in” to my router, just using it as a Tailscale network bridge to gain LAN access so I can SSH from my phone to my server. But, in general, yeah.

    I currently don’t allow any direct access to my server from the internet. The only way to access it is Tailscale. I have Tailscale installed on both my desktop (always on) and my router (also, always on). The reason I installed it on the router is because my desktop is also full disk encrypted. So, if there’s a power outage then both the server and desktop will reboot and both will be waiting for LUKS unlock, rendering my desktop useless as a Tailscale jump point.

    Since the router boots automatically then it will always start back up and allow Tailscale access after an outage and therefore I can use it to access my LAN and SSH to the server to enter the password.

    Basically the same setup you’ve got with the RPi - having a node that comes online automatically after a power outage, automatically starts Tailscale, and allows LAN access. You use an RPi, I use my router. (I briefly did the exact same thing as you, with an RPi, until I found I could install it on the router : )


  • I used Mint for about a decade. When I upgraded the drives on my desktop RAID from 2TB to 14TB the newest version only recognized 999GB. After some troubleshooting I begrudgingly tried Ubuntu, same thing. I figured Debian would be the same since that’s Grandma but I tried anyway. It worked perfect so I’ve been on Debian for a few years now and haven’t noticed any big differences so here I’ll stay.

    Love me some Debian






  • The two biggest things I use it for are programmatically generating “lists of lists” (lists of pages, more accurately) and as a semi-hacky way to get text colors. Semi-related, the “Treeview” plugin gives you a folder hierarchy panel off to the left (by default) which is really, really nice.

    I should probably clarify that I didn’t write these, I stole them from the Silverbullet community forums… also I should reiterate that I suck at Lua so take my explanations with a grain of “this person may not know what they’re talking about” ; )

    Lists of Lists : I have a bad memory so I create a LOT of lists. I even have a base page named “Lists” that I then nest different types of lists under (TODOs for home, for work, for school, for projects, for selfhosting, etc). Since the table is programmatically generated, it’s always up to date on each load. This first snippet relies on using frontmatter on the respective pages along with the tags property.

    ${query[[
    from index.tag "todolist"
    order by lastModified desc
    select {
      List="[[" .. _.name .. "]]",
      Modified=_.lastModified
      }
    ]]}
    

    This retrieves all pages from the space index with a tag of todolist (from the frontmatter), orders them by lastModified, descending, and renders a table that contains the name and lastModified date. This is excellent for providing a list of pages (based on tag, todolist in this case) related to a topic and ordering them by the last time they were changed. I use this in the base page for pretty much all of my “folders”. Screenshot :

    Text Color Hack : Since the Silverbullet markdown interpreter doesn’t (currently) support plain HTML, and the way we usually color specific areas of text within Markdown is <span style="color: #fff">white text</span>, they had to get inventive. Somebody came up with a way to provide Lua functions that will accept text as a parameter and then render it with the specified HTML color/style.

    In my CONFIG page (that is applied to the entire space) I included a space-lua code block like :

    function Red(text)
      return widget.html(dom.span {
        style="color:#e60000; font-weight: bold;",
        text
      })
    end
    // Also about 5 more for different colors I use, snipped for simplicity.
    

    Then, anywhere in my Silverbullet space I can use a Lua code snippet like The following word is ${Red("red")} and it will invoke the space-lua function named Red() on the text red, apply the styling, and render it with CSS color #e60000. Hacky? Yeah… but it works for now. Screenshot :

    … I’ve been meaning to build a generic Colorize(text, hexColor) function (which would likely take all of 30 seconds : ) but haven’t yet. Maybe tonight.

    EDIT: That did, in fact, take 30 seconds. Function :

    // This assumes "color" parameter is a valid/properly formatted CSS color, meaning a known word ("red"), hex ("#ff0000"), or presumably RGB/etc but so far I've only tested color names and hex (I typically use hex)
    function Colorize(text, color)
    return widget.html(dom.span {
        style=string.format("color:%s; font-weight: bold;", color),
        text
      })
    end
    

    Usage : ${Colorize("any text", "#00ff00")}




  • https://silverbullet.md/

    It’s like obsidian (I hear) but FOSS. I love it and it’s by far the self hosted service I use most.

    It stores your notes in a plain directory hierarchy of markdown files so you can just point a cron shell script at it to git add/commit/push at your desired internal and you’ve got history tracking/backups too

    Edit: also provides a PWA so you can “install” it on your phone instead of always using a full browser.

    Edit x2: includes a Lua interpreter so you can get scripty with it. I use that functionality more than I expected and I suck at Lua

    Edit x3: and it auto synchs to each device when open with conflict detection. Full copy is stored local to each device, synched when possible