1. 3

        Also https://matomo.org/ and https://usefathom.com/ are popular alternatives

      1. 2

        As a company with a lot of Java, we use Gatling as it’s Scala, so as a JVM language there’s a rough level of familiarity.

        It does what we need it to, but it’s not a language we know very well so makes a fair few things more awkward, eespecially where we have more complex projects

        1. 1

          Is your service behind an api gateway of some sort? I’d expect the gateway to be able to give you some good stats, especially if you’re requiring authentication

          1. 1

            You mean a service from AWS or the like? It is not unfortunately. Just a VPS with nginx & unicorn.

          1. 9

            git features I started using, but only after a while:

            • git pull --rebase
            • git commit --fixup <hash>
            • git rebase -i --exec=<run the testsuite>
            • git rebase --onto <ref> <hash> <ref>
            • git stash --include-untracked
            • git rebase -i --root
            1. 4

              I was really hoping git commit --fixup would be in the original post - that’s the number 1 git command I recommend to new users

              1. 3

                What does it do?

                1. 9

                  I usually market it as “the easy way to git commit --amend something other than the most recent commit”.

                  In more detail, git commit --fixup <ref> creates a new commit annotated to be a “fixup” commit of the given commit ref. A subsequent git rebase -i --autostach <some commit before ref> will automatically move that commit to directly after <ref> and turn it into a fixup rather than a pick, meaning it will be merged into that commit and its message will be discarded.

                  Emacs+magit users can get the whole “fixup-and-autosquash” dance in a single step with c F (magit-commit-autofixup), which gives you a git log to choose the target commit from and runs the autosquash in one go, which is one of those user experiences which genuinely feels magical the first time you try it (magit is full of them!)

                  1. 2

                    Thank you for explaining!

                  2. 1

                    I’ve written about this at https://www.jvt.me/posts/2019/01/10/git-commit-fixup/ if you fancy a bit more of a read

                  3. 2

                    also git rebase --autosquash

                1. 1

                  I practice something I call Blogumentation - blog posts as a form of documentation which means I’ll post a blog post for a lot of new learnings, or non-trivial things I’ve done. It’s working pretty well, cause others get to use the resources too, as they’re tagged blogumentation on my site

                  1. 1

                    As someone involved in the IndieWeb Movement I use Aperture which supports many types of feeds (RSS, JSON Feed, Microformats) which provides a backend that I can then use with a whole host of clients to actually read the content, which is primarily Indigenous for Android or Monocle

                    1. 1

                      As I’ve written about in my own post about this there are caveats to be careful about - you need to add an =$ref to actually prevent overwriting, if you git fetch often

                      1. 10

                        My usual thought when I see “XXX in only YY LoC” is to ask what packages are imported and just how large are those? But after reading this I didn’t care there’s another 180 lines of magic imported from hmac because of how great the documentation is.

                        This is seriously worth a read, whether or not you are writing in python (I generally don’t) or care to play code golf (occasional pasttime). The README.md is 700 lines to explain everything about the 20 LoC in the implementation, and the tests are a further 80 LoC. That means you’ll learn a lot from this about TOTP in general and, if you’re a Python user, all the ways you can make use of this for your own code.

                        Thanks for sharing!

                        1. 2

                          Thanks for posting this reply, because I was going to potentially skip it for the same reason - I’m glad I didn’t!

                          1. 1

                            Thank you for the kind words and appreciating the documentation.

                          1. 5

                            Jq can parse the jwt payload for you if you just need to look inside. No need to reach for jwt.io or anything else, in that case

                            1. 3

                              Yes that’s true. A few of my colleagues use that, but as mentioned in a linked post, I use python -mjson.tool as it doesn’t need jq installed

                            1. 11

                              What’s with this assumption of being a worldwide authority or known entity that’s so popular in blog posts or internet comments?

                              My thoughts on…

                              I’ve always maintained that…

                              Like many people know…

                              People who know me know that…

                              I’m infamous for…

                              Nobody knows who you are - just write your content without the preamble.

                              1. 60

                                I don’t think a blogger owes anyone being overly modest on their own blog. They can write however they like. I’m going to read it as long as it’s useful and/or entertaining.

                                1. 29

                                  I thought it was perfectly fine? They have discouraged and discussed this kind of online tooling, and eventually decided to write it up as a blog post. It’s perfectly reasonable to frame this article as the author’s reasoning behind doing what they’re doing.

                                  In fact, I’d argue it’s more modest than something like “why online tooling is bad”. With the author’s framing as it is, they’re not pretending to have the objectively correct view; they’re upfront about how this is their opinion on the matter.

                                  1. 2

                                    That’s true as well. “JWT.io considered harmful” would be a worse post, and the personalisms clearly draw the line between “this is my opinion” and “I speak for everybody”.

                                    My original post probably crossed wires between “authority” vs. “familiarity”

                                  2. 16

                                    You seem like you must be a worldwide authority on how to write preambles for blogs. ;)

                                    1. 1

                                      Why would he need to be?

                                      1. 4

                                        He wouldn’t, but as others have cited, being overly critical of someone’s writing because of their particular language choices and not commenting at all on the content being presented is A) Of questionable constructive value and B) Potentially not in the spirit of this very technology oriented forum.

                                    2. 14

                                      I’m sorry that you read it like so - would you mind explaining what wording made me sound like I think I’m a worldwide authority on the matter?

                                      1. 9

                                        You’re all good, you have your own voice. It’s some BS that this is the feedback you’re getting unsolicited instead of talking about the actual topic.

                                        1. 4

                                          Given the reaction, I’m probably in the wrong here. It’s a minor nit that I magnified into a big deal.

                                          Buuut, to explain my rationale, it’s specifically your first paragraph. The content was fine (and I use jwt.io often).

                                          Something my colleagues know well is how little I trust online tools like jwt.io, online JSON validators or online tooling in general, but it also bleeds into comments I make online and in my blog posts, too, and I thought I’d share a little bit of a reason as to why.

                                          I’m not familiar with your coworkers, your online comments, or your blog posts. And I don’t mean that offensively, like “you’re a nobody” - it’s just that in this case I would rather tailor the article for what’s probably the larger group (people who don’t know you) vs. the smaller group (people who know you).

                                          My reaction was overblown, and contained more of a general rant towards every instance of this I’ve seen, not your specific violation.

                                          To be frank I’m surprised that others disagree (although it’s probably more about me sounding like a dick than my opinion). I genuinely find it strange to read public content that’s written as if I’m this person’s best friend and remember the thing they said in the kitchen last Tuesday.

                                        2. 5

                                          On the other hand, I dislike when people speak for me on my behalf with phrases like “the python community agrees that” or “all java developers think that”.

                                          I also think it’s important to separate things that are factual from opinions. It’s not that my opinion is important but that it’s just an opinion, and everyone can have one. Disagreeing does not necessarily make you wrong when it comes to opinions, but more so when it comes to facts.

                                          1. 1

                                            “Or, as I’ve lately taken to calling it, …”

                                            It’s weird though — these phrases didn’t start out as imitation of people with actual authority, as far as I can tell. A lot of fake authority starts as imitatiion (e.g. dressing like the king/CEO/next-rung manager), but I can’t recall widely respected people like DHH (recently) or JKH (decades ago) ever using phrases like “Like many people know”. These phrases were always fake.

                                          1. 2

                                            I’m not familiar with the Netlify CLI, but isn’t this deploying to a “branch” (separate URL) rather than a branch, which I initially interpreted as a Git branch? In any case, this sounds like a tremendously useful feature for CI.

                                            (Edited to mention my comment is probably a nitpick :P)

                                            1. 2

                                              Good point - this is exactly that. Allowing you to deploy to a separate URL, for instance if you were building a branch on CI.

                                              1. 15

                                                It’s worth reading Aaron Parecki’s detailed writeup about this as there’s a bit more info about what actually went wrong

                                                1. 2

                                                  That was a good read. The only issue was lack of server-side validation.

                                                  1. 1

                                                    An amazingly big issue for such an important feature.

                                                1. 2

                                                  Is there an RSS feed by default? It’d be good to subscribe, but I can’t find it automagically with my feed reader - it may be its missing rel=alternate?

                                                  1. 6

                                                    I’m quite heavily into the IndieWeb movement, in which we’ve designed a new standard Microsub which allows for a slightly better API than “regular” RSS/Atom readers, as it allows for you to use different feed formats on the backend. It also splits between the client and the server quite nicely, so I can use Indigenous for Android when on the move, and Monocle when I’m on the desktop. The best thing about the standard, aside from allowing extensible feed parsing, is that I can use different clients to read it, instead of relying on a single provider - which I believe we’ve seen with some of the RSS/Atom readers around currently.

                                                    The server I use is Aperture, built and run by Aaron Parecki, and I subscribe to a mix of RSS/Atom, JSON Feed and Microformats2 feeds

                                                    1. 1

                                                      For those wanting a bit more info on the IndieWeb, see the discussion and post on https://lobste.rs/s/zg6iok/indieweb_movement_owning_your_data_being where I shared a transcript of a conference talk I did on the subject

                                                      1. 1

                                                        Never heard of it before, but looks promising. I will give it a try!

                                                        Is it possible to have webmentions as a comment seciton on a static website?

                                                        1. 1

                                                          You can, but like anything dynamic, you’d either need to implement the comments section in client-side JavaScript or else have some way of triggering your site to rebuild and redeploy whenever a new Webmention is posted.

                                                          1. 1

                                                            I’m doing that. My site is SSG that is built on my desktop and uploaded via good old rsync.

                                                            I use this webmentions SaaS to collect my mentions and a client-side JS to fetch and display them. My design skills are limited, so you can have it looking much better than I did. This post has a lot of mentions at the end. The JS used is not minified and is at the end of the post, near line 152 if you want to check.

                                                            Another cool service is bridgy which will send and collect mentions from silos and forward to your web site. I have it configured with my twitter and mastodon account. This way, I can have it send automatic tweets or toots when I post and also deliver replies and comments back to the original post.

                                                            1. 1

                                                              Yes, it’s possible with a dynamic webmention endpoint that somehow saves webmentions. I have such a dynamic endpoint that creates a file in a git repo, commits and pushes it. That triggers a pipeline to rebuild my blog with Hugo and then a link is displayed below the page which received the webmention.

                                                              1. 1

                                                                I have done it on my static website using webmention.io. I just pull on my personal computer regularly the updates from webmention.io and then I generates the comment section using some Hugo features. Shameless plug to my blog post explaining this

                                                                1. 1

                                                                  There’s https://webmention.io/ or you can have a self-hosted service somewhere.

                                                                  1. 1

                                                                    I believe so. I know a couple of people who are running Hugo and have this. However, I would assume that that the comments are updated only when the site is regenerates, rather than on-the-fly like WP.

                                                                    1. 1

                                                                      I use https://github.com/PlaidWeb/webmention.js to render my webmentions client-side so they’re always up to date, instead of needing to rebuild the site - I’ve written a bit more about it at https://www.jvt.me/posts/2019/06/30/client-side-webmentions/

                                                                  1. 1

                                                                    I have a script git-wipu that does a git commit --ammend without changing the commit message and then force pushes it. I use it all the time when I’m on my own work-in-progress branch and I want to “accumulate” a single commit in small chunks. It’s like my git equivalent of instinctively saving a file every ten seconds.

                                                                    I also use the following aliases:

                                                                    alias shelve='git stash'
                                                                    alias unshelve='git stash apply'
                                                                    

                                                                    because I can never remember git stash on the few occasions that I need it.

                                                                    1. 2

                                                                      I did something similar with lots of sq! {SHA} commits until I found out about git commit --fixup which let’s you do similar, and then git rebase -i --autosquash it afterwards, which is a bit safer with repos others are working on - there’s some more detail on https://www.jvt.me/posts/2019/01/10/git-commit-fixup/ if that helps!

                                                                      (Originally posted at https://www.jvt.me/mf2/2020/02/s9zg3/ and hand syndicated)

                                                                      1. 2

                                                                        I didn’t even know that the --fixup & --autosquash flags existed.

                                                                        Thanks for the link; I’ll definitely look at incorporating these into my workflow!

                                                                        :-)

                                                                    1. 1

                                                                      I’d thoroughly recommend https://gatling.io/ as we’re using it across both Java-based and non-Java-based APIs, and have found it pretty great.

                                                                      I know we’re not using nearly the power it affords, but it’s very good!

                                                                      You don’t need to know that much Scala too, it has a straightforward DSL before you get there

                                                                      (originally posted at https://www.jvt.me/mf2/2020/01/utfz2/ and hand syndicated)

                                                                      1. 1

                                                                        I’ve also used Gatling, and it should do what you need.

                                                                        I’m not as thrilled about it: parts of the API are a little hard to make work the way you want, but it has all the major capabilities I’ve needed.

                                                                        I also agree about Scala not being a huge obstacle if you work in Java, though when I’ve had to dig into the Gatling code to understand things, it has slowed me down a bit.

                                                                      1. 7

                                                                        I remember all the semantic web hype from when I was a baby programmer new at a professional job. I rolled my eyes then, and I was mostly right. Mostly.

                                                                        Stuff like knowledge graphs, hashtags, etc. that are used a lot today did come out of that though, so it wasn’t a total loss of good people’s time.

                                                                        1. 12

                                                                          I think that the semweb stuff is the poster child for what happens when you come up with a good idea, make it too complicated, and then freak out when simpler approaches come along and in so doing doom yourself to irrelevance.

                                                                          1. 3

                                                                            come up with a good idea, make it too complicated

                                                                            I was just looking at some IndieWeb stuff, Falcon to be specific, and the learning curve is huge for what are relatively simple things in practice. That page and some others I found require a lot more effort than they should probably require. It’s a noble effort, but it’s very hard to get people onboard if they don’t have a lot of energy to apply.

                                                                            1. 2

                                                                              Agree that some users won’t want to get stuck into it - they’re likely also the users who won’t be writing raw HTML for their sites.

                                                                              So what we’re doing for them is getting Microformats2 support directly into the themes for WordPress, Jekyll, Hugo, etc, so anyone using it can benefit without necessarily doing any work!

                                                                              (originally posted at https://www.jvt.me/mf2/2020/01/an68d/ and hand syndicated)

                                                                            2. 2

                                                                              What simpler approaches came along?

                                                                              1. 3

                                                                                knowledge graphs, hashtags, etc

                                                                                1. 1

                                                                                  Oh, I thought there was some other standard I wasn’t aware of.

                                                                                  1. 2

                                                                                    http://microformats.org/ — embed structured data in normal HTML with minimal fuss.

                                                                                2. 1

                                                                                  In some way html is the simpler sgml.

                                                                                  RSS is a way simpler RDF.

                                                                                3. 1

                                                                                  As shared in a separate comment in the thread, there’s the Microformats2 specification (see https://microformats.io) which reduces duplication seen with some of the other Semantic Web formats.

                                                                                  You can see an example of a parsing result at http://php.microformats.io/?url=https%3A%2F%2Fwww.jvt.me%2Fmf2%2F2020%2F01%2F2mylg%2F which produces a standardised structure for the resulting JSON, which makes interconnectivity much simpler.

                                                                                  Us folks in the IndieWeb (https://indieweb.org) have been using it for some time with great benefit, but it’s always great to hear others reactions too!

                                                                                  (originally posted at https://www.jvt.me/mf2/2020/01/tw4ug/ and hand syndicated)

                                                                                  1. 1

                                                                                    Yeah that checks out.