• 2 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: December 28th, 2023

help-circle

  • Sure :)

    I don’t know if it still a thing but in the past some web URLs had spaces in their addresses e.g.

    https://www.my/%20website%20with%20spaces.com
    

    In markdown you can link to external web addresses like so

    [some link to a web address](https://my/%20website%20with%20spaces.com)
    

    However, /https/ ! s|%20|-|g replaces all occurrences of %20 (which is consider a space in html? Sorry if I’m wrong here :s still have a lot to learn) with -. This would break the link the the web URL [some link to a web address](https://my-website-with-spaces.com/). Am I wrong here?


    If I may I just found something else that doesn’t quite work 😅 and it seems a bit harder to fix i think ! Sometimes I have links in this form:

    [1.3 Subtitles](BDMV_svt-av1_encode_anime.md#1.3%20Subtitles)
    

    As you can see I append the header with 1.3 but as dumb as it is… it also need to be 1-3-subtitles

    e.g.

    [1.3 Subtitles](BDMV_svt-av1_encode_anime.md#1.3%20Subtitles)
    

    Needs to become

    [1.3 Subtitles](BDMV_svt-av1_encode_anime.md#1-3-Subtitles)
    

    Sorry for my bad English trying my best haha ! Hope it’s comprehensible.

    Edit:

    I don’t know why but lemmy add /%20 instead of %20 in my fake URLS ://


  • Haha we cross-replied !

    .* did the trick and removes my additional s|]\(.+#.+\) to include that pattern form my last reply !

    Last question https/ ! s|%20|-| change all occurrence of %20 in the whole file except if it begins with https, is there any way to just change that occurrence when it appears in the markdown link pattern []()?

    e.g. replace in [Some text](some%20text.md) but not If Hello I'm just some%20place holder text ?

    Thanks again for your easy to read and very informative walk through ! 🤩


  • Sorry to spam your unread message 😅 !

    I played a bit around and came to the following conclusion:

    s|]\(#.+\)|\L&| - Works great for in document links so I further expanded to this s|]\(#.+\)|\L&|;s|]\(.+#.+\)|\L&| to also add the following pattern [Some Text](readme.md#hello%20world.md)

    s|%20|-|g - Works on every occurrence of %20 even for the following pattern [Some text](https://my/%20home%20page.com) which would break all external links to the web. So I used this /https/ ! s|%20|-|g

    It’s probably very sloppy what I’m doing and not as elegant as your command but it does the trick :) If you to further expand on it feel free however the following command does exactly what I wanted:

    sed -re 's|]\(#.+\)|\L&|;s|]\(.+#.+\)|\L&|;/https/ ! s|%20|-|g'
    

    Thanks again from the bottom of my heart !


  • Thank you, thank you very much for taking your time to help me out here ! I really appreciate your full breakdown and complete development ! I didn’t tried it out yet but skimming through your post I’m sure it will work out !

    However, I forgot to mention something:

    The goal of this expression is to find markdown links, and to ignore https links. In your post you indicate the markdown links all start with a # symbol, so we don’t have to explicitly ignore the https as much as we just have to match all links starting with #.

    This is only true for links in the same file, if i link to another file it look something like this:

    [Why SVT-AV1 over AOM?](readme.md#Why%20SVT-AV1%20over%20AOM?)
    

    I can try to wrap my head around and find a solution by myself, with your well written breakdown I’m sure I can try something out. But if you think it will be to complex for my limited knowledge feel free to adjust :).

    Do you mind If I ping you if I’m not able to solve the issue?

    Thank again !!! 👍



  • Hello,

    I have thought of a python script and looked a bit around but couldn’t find something satisfactory. Also I’m a tiny bit more versed in bash/CLI than with python… Even though that’s very arguable !

    I looked through the Github repo and at first glance I have no idea how this could do the job, again I probably have to dig a bit deeper and understand what this is actually doing !

    Thanks for the pointer will give it a try :)







  • Heyia ! I battled a few weeks to get my own mini-ca to work in my own lan (green padlock, no warning) while a lot of people would argue that it doesn’t add much security wise and give a fault sense of protection, it still encrypts your communication in your LAN.

    Normally you will give NGNIX a “server” certificate, the one that will be tested against your rootCA installed on your computer/laptop for each service (or a wildcard domain cert).

    If you want to see if your communication is encrypted and secure, give wireshark a try and look if your communication is in plaintext or encrypted gibberish !

    Also If you want I got some good documentation on how to create your own mini-ca in your homelab !


  • N0x0n@lemmy.mltoTechnology@lemmy.mlNewpipe
    link
    fedilink
    arrow-up
    0
    ·
    7 days ago

    From what I understand, F-droid regularly audits a few new apps for malicious code

    That’s a good point, but how can a malicious code be add to a source code from github? I mean if you only use trusted applications repos (most of them are already on f-droid anyway) there shouldn’t be any concern right?

    But reading from the link you posted there’s some chance of a MITM attack and send a malicious payload directly to Obtainium? (Correct me if I’m wrong).

    Github is not neccesarily the same source used to generate their binaries.

    Didn’t knew that :/

    Thanks for sharing your knowledge !




  • imo a monorepo is better for retrieving information than if you split it out. Forgejo search does not work across repos, and imo even if you used a provider that does, it is always more complex to have to look in many places vs 1. I would advise you try putting all your personal scripts in one place rather than spread them around. I only give my apps a seperate repo when i am ready to share them with others and i need that clear boundary for access.

    Thanks for the tip ! Yeah, there goes my idea to host forgejo to the drain. If I can’t search across repos that’s a big NO ! I thought to use repos like a book and separate everything according specific subjects :/. Humm, maybe I should give Git-server + mdBook a try like someone suggested below.

    I keep a note called _focus that i go to when i am overwhelmed. It contains my “seven W’s”, which are links to separate notes which are purposefully kept simple.

    Haha, that’s a nice way to refocus your mind on what’s important ! Thanks for sharing your personal way to refocus on what’s important ! 💖



  • Thank you for your insight !

    Hmm, I don’t have experience with hosting Forgejo, but my intuition tells me that because it has relatively many features, that its administration is more involved than if you only host a Git Server.

    Yeah that’s what I’m afraid of… The maintenance seems a bit complex and it seems to be solved with a hosted git server :) Seems promising I will give it a try !

    Thank you !!