Hacker Newsnew | past | comments | ask | show | jobs | submit | lewiscollard's commentslogin

At every step there is human agency involved. People came up with the idea, people wrote the code, people deployed the code, people saw the consequences and were like "this is fine".

This is why people hate us. It's like Schrodinger's Code: we don't want responsibility for the code we write, except we very much do want to make a pile of money from it as if we were responsible for it, and which of those you get depends on whether the observer is one who notices that code has bad consequences or whether it's our bank account.

This is more like building an autonomous vehicle "MEGA MASHERBOT 5000" with a dozen twenty-feet-wide spinning razor-sharp blades weighing fifty tons each, setting it down a city street, watching it obliterate people into bloody chunks and houses into rubble and being like "well, nobody could have seen that coming" - two seconds before we go collect piles of notes from the smashed ATMs.


> What about the alternating green bars?

    body {
        background-image: linear-gradient(to bottom, white 0%, white 1em, #7cb8a6 1em, #7cb8a6 calc(1em + 1px), #dbfcf5 calc(1em + 1px), #dbfcf5 calc(2em + 1px), #7cb8a6 calc(2em + 1px), #7cb8a6 calc(2em + 2px));
        background-size: 100% calc(2em + 2px);
    }
adjust colours to taste :) extra credit if you implement dark mode!


Depending on the web server's configuration, you very much _can_ find the domain which is configured on an IP address, by attempting to connect to that IP address via HTTPS and seeing what certificate gets served. Here's an example:

https://138.68.161.203/

> Web sites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for 138.68.161.203. The certificate is only valid for the following names: exhaust.lewiscollard.com, www.exhaust.lewiscollard.com


I don't think that does you any good for Cloudflare, though. They will definitely be using SNI.


That doesn't really matter, though. While OP is using Cloudflare, the actual server behind it is still a publicly-accessible IP address that an IPv4 space scanner can easily stumble upon.


I misunderstood, I thought the subdomain was an R2 bucket. If it's just normal Cloudflare proxying to some backend this is probably the most likely answer.

That said, while I think it's not the case here, using Cloudflare doesn't mean the underlying host is accessible, as even on the free tier you can use Cloudflare Tunnels, which I often do.


they only state they are using cloudflare for DNS, they didn't say if they were proxying the connection


Also a valid point. I guess without more details all we can really do is speculate about the exact setup. That said, I do now agree that the most likely answer is "the underlying host was accessible and caught by an IPv4 scanner" since well, that's pretty much what it says anyway.


The push-to-left doesn't matter. Most people will read one thing on the site so they're not navigating between pages anyway, most of the remainder aren't clicking through pages fast enough to even notice the jump, most of those that do notice it know how scrollbars work, and the remainder is you :)

I guarantee nobody will complain about the jump, but they will (did) complain about disabling basic browser functionality.

If the jump really bothers you, you can replace your rule with

    html {
        overflow-y: scroll
    }
which should force scrollbars to appear on every page whether they're needed or not. But you don't need it.


> so I wound up putting some JS in my index page template that checks for that kind of thing.

If we are going to use JS, then you might as well put the redirects themselves in JS. Have a tiny stub of JS that detects the "/?p=xxx" case, which can then load the (presumably very large) list of redirects from a separate file and do the redirecting. That'll save you maintaining the extra service.

As for me, I moved from a Django app I made to a Hugo site, but it's pretty much the same deal. Because my Hugo site is on a "real" server (rather than e.g. GitHub Pages) I just have a giant pile of 500+ redirects in the nginx config file for the site (which is checked into the same repo as my Hugo site). It works for me.


That's a nifty idea! I need the extra Flask for some other unrelated stuff, so it's OK as it is, but if it was on GH pages (like you say) that would be super useful.


You copy it into the same directory as the post you want to put it in, and reference it as a resource from your post. I made a shortcode for this for my own Hugo site, adding auto thumbnailing & WebP support:

https://gist.github.com/lewiscollard/c6651648d1c20144ed89e16...

Copy that into your "layouts/shortcodes/image.html" and use it as

    {{< image src="my cat.jpg" alt="add a description here" >}}
If you just want to upload it to _not_ reference it in a post/page, copy it into your `static` directory and it'll be passed through when the site is built.

Hope that helps!


Plain old markdown image syntax also works, although there is no way to preprocess the file or add any additional HTML attributes beyond what you see here:

    ![add a description here](my cat.jpg)


Yep, that works too. I wrote the shortcode because I didn't want to have to manually resize pictures. That's effort and it means if I change my layout to require wider pictures I have to go find the originals.

I think you could do this with a render hook if you want to get fancy (with the benefit that the Markdown for your posts stays as plain Markdown): https://werat.dev/blog/automatic-image-size-attributes-in-hu...


Then un-mess them up :)

  html {
    filter: invert(1);
  }

  img {
    filter: invert(1);
  }
Bookmarklet edition:

    javascript:(function(){var s=document.createElement("style");s.innerText="html{filter: invert(1);}img{filter: invert(1);}";document.head.append(s)})()
(doesn't and can't fix CSS "background-image" but you'll live)


Not author, but lc was posted on HN some years ago and at the time I was like "oh, I should really port over the original man page some day". After which I half did it, then forgot about it. I'm commenting here to commit myself to actually finishing that!



There's also one in this PR now :) Saying I'm going to do something is more likely to get it done than just thinking about it! https://github.com/gdm85/lc/pull/1/files

But, yes, that is the manual page I converted from (actually I grabbed it from the tarballs linked in the README - should be the same thing). My entire experience of troff would fit on the inside of a Rizla packet with some space to spare, but looking at the original I think it was using some special macro package that doesn't exist on modern systems. So I re-wrote it to use `-man` macros as best I could, but also included the original man page source for anyone that thinks they can do a better job in future.


Thank you for the PR!


<3


Yes, I find it difficult to understand why anyone old enough to remember what British Rail actually was (or capable of e.g. reading Wikipedia, to find out what it was), would like British Rail to be resurrected in anything like the form it had. It feels like pointless nostalgia most of the time; double arrows, rail blue, and jumpers for goalposts.

And like, if one's model for maintaining a system depends on having a sensible government in power, _regardless of which particular political party you think is least competent_ you are going to have a rail system being run incompetently at least half the time. That's also what we got with "privatisation", of course; why would we expect any different?


If I may hijack your reply for a recommendation thread, I'd recommend "The Sense of Style" by Steven Pinker, too. It's worth it just for the section on metaconcepts. I loved how much simpler my writing became when I removed them.

Also, read anything by Robert Graves. He did write a style guide called "The Reader Over Your Shoulder", but that's optional; I learned far more about good writing from "I, Claudius" and "Good-Bye to All That".


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: