• 0 Posts
  • 113 Comments
Joined 2 years ago
cake
Cake day: June 10th, 2023

help-circle
  • In that sense it is a bit of scripting, it’s a templating language similar to Jinja, so you put things you want to display between {{ }}, for example {{name}} will get rendered as the content of the name variable. [[ ]] is the way Silverbullet habgles links, so [[Something]] is a link to the file Something.md, so [[ {{ name }} ]] is a link to the file with the name from the variable.

    Also that’s because I wanted a custom view, a very similar thing could be done with:

    \```query
    recipe
    \```
    

    BTW, you can have a table of contents on Silverbullet by just putting a block named toc, i.e. ```toc and closing it on the next line.



  • Let me give you an example, I have a page with this:

     ```template
     | Name | Keywords |
     |-----------|-----------------|
     {{#each {recipe}}}
     | [[{{name}}]] | {{keywords}} |
     {{/each}}
    \ ```
    

    Then each recipe page has a header, so for example if I have a file named Recipes/Steak.md with the content:

    ---
    tags: recipe
    keywords: beef easy
    ---
    
    # Ingredients 
    
    Yadda yadda yadda...
    
    

    So that table gets populated with all of the recipes wherever they are and I can add other columns or info there. It’s very neat and customizable.


  • Silverbullet is open source and has a very simple architecture with slightly extended markdown files which are easy to sync using whatever you use for syncing files. Plus it syncs files locally and allows you to edit offline and sync later (with a basic sync conflict resolution to avoid losing changes) and a very cool feature is that it allows you to write your own scripts to get whatever feature you want.


  • Another vote for Silverbullet, I’ve been using it for a while and it’s great. There is a tree view plugin that’s very easy to install, however I disabled it after a short while because I realized that, because of the way I take notes, that is a lot less useful than other features.

    For example, I have a folder with all my cooking recipes, at first I thought having a Tree view would be good there, but actually if I use the querying mechanism I can have tables that give me more information than just the name, e.g. tags, difficulty, etc. also this works regardless of where the recipes are, so if I want to create a subfolder structure or scrap recipes from elsewhere in the whole space it would work (granted, not very useful for recipes, but I also have a table for work tools, some of which are embebed on another page, some of which are a page of their own, and I have a table that lists all of the tools to give me an overview)


  • Wow, that’s very unfortunate. If you installed docker through package manager and have added yourself to the group I believe this to be self-imposed, I don’t know which mechanism Docker uses to give access to users in the group to its service, but seems related to that since it looks like the service is running but just your user can’t access it. To confirm it’s just that run the compose command as root, i.e. sudo docker compose up, this is not ideal but if that works you know it’s a permission problem with your user.

    You seem to know your way around Linux, so it’s probably not something obvious. I’m almost sure it’s something stupid and self imposed, I’ve done my fair share of stupid shit like leaving a config file malformatted or deleting a library or installing something through manually copying files only for something else to break because I overwrote something important.


  • I know you probably heard this thousands of times, but really, if you’re into self-hosting docker is a blessing. People make it harder than it needs to be when explaining all of the ins and outs. I assume you have a Linux box where you run your stuff, just install docker and docker compose there (you might need to enable the docker service, add your user to the docker group and reboot, unless you’re using a user friendly distro like Ubuntu). Then just make a folder anywhere for Silverbullet, create a file named compose.yaml and put the following text there:

    # services means that everything inside is a service to be deployed 
    services:
      # this is the name of the service, you can put whatever you want
      silverbullet:
        # this is the docker image to use
        image: zefhemel/silverbullet
        # this is the rule to restart in case of crashes
        restart: unless-stopped
        # these are environment variables you want defined
        environment:
        # this is a specific variable for Silverbullet, it's essentially username:password change this accordingly 
        - SB_USER=admin:admin
        # volumes are local folders you want to be available
        volumes:
          # in this case we want that the folder ./space be mounted as /space inside the container
          - ./space:/space
        # these are the ports we want to expose
        ports:
          # This means expose port 3000 on port 3000, if you want to access Silverbullet on port 8080 this would be 8080:3000 (because internally the service is still listening to 3000)
          - 3000:3000
    

    Then run docker compose up and you should be able to access it on the port 3000.

    Ling story short docker compose looks for a file named compose.yaml in the local directory, and that file above has all of the information it needs to run the server. I’ve annotated each line there, feel free to remove the comments.




  • Not what you’re asking, but in case it helps. I don’t use Obsidian, I use https://silverbullet.md/ it’s very similar, markdown files with the ``[[other note]]` syntax (as well as some querying mechanism that I believe Obsidian also has), in short it’s almost an open source version of obsidian but it has some advantages IMO:

    • It is open source
    • It provides a sync mode, where you download the text to your device and it’s accessible offline to get sync afterwards.
    • It’s hackable so you can write your own functions and styles

    I’m surprised almost no one has heard of it, the main developer is here on Lemmy, that’s how I found out about it. BTW I also use syncthing to keep backups of my data, and even specifically to not sync a work folder outside of the work computer even though the rest is synced, so I can access Silverbullet from localhost on the work computer and get everything there and any changes to non-work stuff get synced to my home server, and from my personal server get everything except work stuff.







  • Even considering your edits, it’s still a stupid argument. By that same logic nothing should be preserved. Watching LotR now is not the same as watching it when it first came out, which should have never been made according to you because by that time the book should have already been destroyed since you wouldn’t want to preserve it for 50 years, but Tolkien shouldn’t have even written it, since they were based on ideas and drafts he did during the first world war exploring how war changes men and power corrupts, which obviously is only valid in that context and nowhere else so it should be destroyed since preserving it would be invasive and destructive, no?.

    Preserving something can never be destructive, it’s the opposite of it. If the Mona Lisa was destroyed you wouldn’t even know it existed, so how can having preserved it be destructive when the alternative is oblivion?

    And I agree that the Mona Lisa is no big deal, you know who else agrees? People from that time. It’s widely known that the Mona Lisa was one of Da Vinci’s less famous works, and until Napoleon made a big deal out of it it was just a random painting in a random museum. So I get part of your point, that people who make a big deal out of the Mona Lisa are only there to see the famous painting, but that doesn’t mean that there’s no reason to preserve it, or that there are no people who go there to see the actual Mona Lisa.


  • One important thing, ensure the drive is CMR, the reason is that you likely want a RAID, and non-CMR disks take so long to read the entire disk that the chances of a second failure while recovering from a disk failure is significant.

    That being said, how are you keeping track of the disks state? I built my RAID recently, and your post made me realize that I have nothing to notify me if one of the disks shows early signs of problems.


  • This will be almost impossible. The short answer is that those pictures might be 95% similar but their binary data might be 100% different.

    Long answer:

    Images are essentially a long list of pixels, each pixel is 3 numbers for Red, Green and Blue (and optionally Alpha if you’re dealing with a transparent image, but you’re talking pictures so I’ll ignore that). This is a simple but very stupid way to store the data of an image, because it’s very likely that the image will use the same color in multiple places, so you can instead list all of the colors a image uses, and then represent the pixels as the number in that list, this makes images occupy a LOT less space. Some formats add to that, because your eye can’t see the difference between two very close colors, they group all colors that are similar into one only color, making their list of colors used on the image WAY smaller, thus having the entire image be a LOT more compressed (but you might noticed we lost information in this step). Because of this it’s possible that one image choose color X in position Y, while the other choose Z in position W, the binaries are now completely different, but an image comparison tool can tell you that color X and Z are similar enough to be the same, and they account for a given percentage of the image depending on the amount minimum of the values Y and W. But outside of image software, nothing else knows that these two completely different binaries are the same. If you hadn’t loss data by compressing get images in the first place you could theoretically use data from different images to compress (but the results wouldn’t be great, since even uncompressed images won’t be as similar as you think), but images can be compressed a LOT more by losing unimportant data so the tradeoffs are not worth it, which is why JPEG is so ubiquitous nowadays.

    All of that being said, a compression algorithm specifically designed for images could take advantage of this, but no general purpose compression can, and it’s unlikely someone went to the trouble of building a compression for this specific case, when each image is already compressed there’s little to be gained by writing something that takes colors from multiple images in consideration, needing to decide if an image is similar enough to be bundled in together with that group or not, etc. This is an interesting question, and I wouldn’t br surprised to know that Google has one such algorithm to store all images you snap together that it can already know will be sequential. But for home NAS I think it’s unlikely you’ll find something.

    Besides all of this, storage is cheap, just buy an extra disk and move over some files there, that’s likely to be your best way forward anyways.


  • If all you want is ssh the easiest and cheapest way might be to hire a VPS, connect to it and connect to tailscale there. Just ensure you have very strict rules on ssh and you should be safe enough.

    Exposing web services in this manner is also easy using Caddy, but be careful since the services would then be publicly available.