Threads for loc

  1. 27

    How messed up would it be if “the year of the Linux desktop” happens on Windows…

    1. 2

      Given that video acceleration is supported on Nvidia too and that this tech uses Wayland, Windows has the best Wayland experience on Nvidia…

      1. 1

        Fedora 34, currently in beta, will support accelerated nvidia GPU + wayland, according to

    1. 1

      Nice write up. While show was mentioned, I feel this is missing git stash show stash@{3} -p to review the changes a patch contains. I’ve also used this to resolve conflicts by dumping the patch to a file that I can easily modify before applying.

      $ git stash show stash@{3} -p > tmp.patch
      $ vim tmp.patch
      $ git apply tmp.patch
      1. 13

        I didn’t write the blog post and I didn’t write the code, but I’m in that same team. Happy to answer (or redirect) any questions you might have :)

        1. 3

          When will this be enabled by default, and when will http: requests be complete denied? I’m asking not because I want to see that, but because I’m afraid of that happening and shutting me out of certain websites entirely.

          1. 9

            I can’t see that happen at all. Too many requests are still HTTP. You are not alone :)

            1. 8

              For the small number of websites that don’t yet support HTTPS, Firefox will display an error message that explains the security risk and asks you whether or not you want to connect to the website using HTTP.

              We can bypass improper HTTPS (expired, self-signed, wrong domain name) errors. Why do you think we would not be able to bypass this new error?

              1. 4

                Based on Mozilla’s history, in a future version, this setting will be enabled by default and only accessible through about:config, like JavaScript.

                1. 3

                  Unfortunately the programmers behind web browsers are known for pulling stuff like this. The last time I tried to use websockets and my webcam over an insecure connection for testing purposes I quickly realized that they really hate their users as disabling some of the security options is just not possible.

                2. 3

                  To confirm, this replaces the need to use HTTPS Everywhere?

                  1. 3

                    It works a bit different. HTTPS Everywhere in default mode is a bit less progressive and just updates for a list of pre defined websites. It’s similar to a stricter mode of HTTPS Everywhere though.

                  2. 1

                    Thank you for adding this mode. I’m not sure whether we can turn it on at work but it’s great to have it available.

                  1. 17

                    Gron! It transforms JSON into greppable lines like[3] = value, and if you like you can edit the result and use gron to transform the edited stuff back to JSON. This brings JSON structures into the line-oriented sed/grep/awk universe – I’m looking at you, Jupyter notebooks. I’ve only had gron for a few months, and it’s already my 13th-most-used command.

                    Example output (gron can read from stdin, files, and even URLs):

                    ▶ gron testdata/two.json 
                    json = {};
           = {};
           = "";
           = "@TomNomNom";
                    json.github = "";
                    json.likes = [];
                    json.likes[0] = "code";
                    json.likes[1] = "cheese";
                    json.likes[2] = "meat";
           = "Tom";```
                    1. 2

                      Thanks for mentioning this! I had no idea this existed, but is definitely in line with how my brain works vs jq. Even though I use jq almost daily, I can never remember some of the syntax.

                      1. 4

                        I created an alias for jq, called jqpath, that leverages fzf to give searchable output similar to gron, but that emits it in jq’s expected format:

                        1. 1

                          Oh wow, I just noticed @mrcruz’s recommendation of xml2, elsewhere on this page, which does something similar for HTML and XML. Although for HTML I had hoped it would include element classes and IDs in the path — .../div/div/... is not useless, but .../div.comment#c_tez5vc/div.details/... would have provided more orientation points. Still, this is going in my toolbox; and I thought you might like it, too.

                          Part of the output of curl | html2:

                          /html/body/div/div/ol/li/ol/li/div/div/div/a/img/@srcset=/avatars/loc-16.png 1x, /avatars/loc-32.png 2x
                          /html/body/div/div/ol/li/ol/li/div/div/div/a/img/@alt=loc avatar
                          /html/body/div/div/ol/li/ol/li/div/div/div/span/@title=2020-10-22 17:16:17 -0500
                          /html/body/div/div/ol/li/ol/li/div/div/div/span=2 days ago
                          /html/body/div/div/ol/li/ol/li/div/div/div= | 
                          /html/body/div/div/ol/li/ol/li/div/div/div/span/@class=flagger flagger_stub
                          /html/body/div/div/ol/li/ol/li/div/div/div/p=Thanks for mentioning this! I had no idea this existed, but is definitely in line with how my brain works vs 
                          /html/body/div/div/ol/li/ol/li/div/div/div/p=. Even though I use 
                          /html/body/div/div/ol/li/ol/li/div/div/div/p= almost daily, I can never remember some of the syntax.