black3r 4 years ago

slightly related: docker clone in 120 lines of bash - https://github.com/p8952/bocker/blob/master/bocker

  • tenuousemphasis 4 years ago

    This is so clever. I love the use of comments and parsing the source file for those comments as a way of displaying help.

    • LanternLight83 4 years ago

      I think they're going for the minimal line count by in lining the docstrings. In some of my own scripts, I've lifted an idea that I saw in the wild where your Usage header and function docstrings are just prefixed with '#/', a more aesthetic and equally unlikely string (which also looks good in blocks, so it could even be restricted to newlines that just are comments, letting the line count breath a but and removing any worry of accidentally using that sequence in code). Our help function would then just 'grep w/e $BASH_SOURCE | cut w/e'.

  • cle 4 years ago

    It's not really a clone, it's a tiny subset of Docker daemon functionality. It's missing huge things like building images from Dockerfiles, pushing to registries, networks, volumes, port forwarding, integration w/ containerd, health checking, event bus, and on and on.

    • sillysaurusx 4 years ago

      My dreams of one day reading a full clone of docker in 120 lines or less are shattered. Maybe next time.

      • petepete 4 years ago

        How does three lines of Perl sound?

        • salawat 4 years ago

          Like a piano falling down the stairs.

est 4 years ago

Cool, can we support Container Runtime Interface (CRI) with few more lines of code?

jzer0cool 4 years ago

I have to freshen up my C skills. I found this interesting to upvoting so I can pick your brain later :)

  • danuker 4 years ago

    You can "favorite" posts also.

tetris11 4 years ago

I love org mode documents as much as the next guy, but they really need better css for mobile on html export

  • sethgrisham 4 years ago

    Honestly thats something that I feel like is both lacking documentation and good, ready to use css templates. Had a bit of a pain a while ago making a stylesheet for my org exports

    • cpach 4 years ago

      Have you tried water.css? It’s very nice https://watercss.kognise.dev/

      • gjvc 4 years ago

        I wish the web had more simple CSS like this.

        • cpach 4 years ago

          I use it for some of my personal sites. Partly because I’m not incredibly good at typography/layout and partly to save time.

      • lelandfe 4 years ago

        Makes me feel like there’s a potential for a CSS Zen Garden spin off: a collection of small CSS files that make basic HTML look nice. No classes, just styling on raw elements.

  • ricardobeat 4 years ago

    Would actually look better with no CSS at all