In the middle of the desert you can say anything you want

27 May 2021

Day 877

Docker DEBIAN_FRONTEND=noninteractive

Setting it in Dockerfiles is discouraged (even by the official Docker FAQ 1) because it’s mainly cosmetic & may create unwanted side effects.

For me, tzdata wanted input and waited for it:

[17:01:56][Step 1/3] debconf: falling back to frontend: Readline
[17:01:56][Step 1/3] Configuring tzdata
[17:01:56][Step 1/3] ------------------
[17:01:56][Step 1/3] 
[17:01:56][Step 1/3] Please select the geographic area in which you live. Subsequent configuration
[17:01:56][Step 1/3] questions will narrow this down by presenting a list of cities, representing
[17:01:56][Step 1/3] the time zones in which they are located.
[17:01:56][Step 1/3] 
[17:01:56][Step 1/3]   1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
[17:01:56][Step 1/3]   2. America     5. Arctic     8. Europe    11. SystemV
[17:01:56][Step 1/3]   3. Antarctica  6. Asia       9. Indian    12. US

Fixed this by adding this command specifically before the one requiring it:

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y

vaex - faster panda-like lib

TODO: Vaex: Pandas but 1000x faster - KDnuggets

Looks interesting. Why is it faster?

python subprocess run is the newer version of Can run a string like this:"echo  one two three", shell=True)

Qutebrowser throwaway email and password generatorr userscripts

Generate password, paste it into a textfield, and xclip the output:

import os
import string
import secrets
from subprocess import run
alphabet = string.ascii_letters + string.digits
password = ''.join(secrets.choice(alphabet) for i in range(8))

run(f"echo {password} | xclip -selection c", shell=True)
with open(os.environ['QUTE_FIFO'], 'w') as f:
    f.write(":insert-text {}".format(password))

Generate a throwaway email with email based on domain (so if I were to run it on, it’d generate

import os
import tldextract
import argparse
import sys

argument_parser = argparse.ArgumentParser()
argument_parser.add_argument('--subdomain', '-s', default='t',
                             help='subdomain ("t" would do "")')
argument_parser.add_argument('--email_host', '-d', default='',
                             help='main domain where you\'ll get the emails')
argument_parser.add_argument('--username', '-u', default=None,
                             help='the name used for email username (name@...)')
def main(args):
    my_domain = args.email_host
    subdomain = args.subdomain
    if args.username is not None:
        username = args.username
        url = os.environ['QUTE_URL']
        extract_result = tldextract.extract(url)
        username = extract_result.domain

    address = f"{username}@{subdomain}.{my_domain}"

    with open(os.environ['QUTE_FIFO'], 'w') as f:
        f.write(":insert-text {}".format(address))

if __name__ == '__main__':
    arguments = argument_parser.parse_args()

Use-case for both - quick easy registration in pointless places.

  1. Docker frequently asked questions (FAQ) | Docker Documentation ↩︎

Nel mezzo del deserto posso dire tutto quello che voglio.