Daily Shaarli

All links of one day in a single page.

February 16, 2022

What Web Frameworks Solve And How To Do Without Them (Part 1) — Smashing Magazine

Some definitions: declarative programming, data binding, reactivity

47861448c4ffb990.png (PNG Image, 560 × 654 pixels)

TODO: texte à recopier

Why flags do not represent languages – Flags are not languages

Do not use flags to represent languages. Explications are provided in the article.

why GNU grep is fast

Summary:

  • Use Boyer-Moore (and unroll its inner loop a few times).

  • Roll your own unbuffered input using raw system calls. Avoid copying
    the input bytes before searching them. (Do, however, use buffered
    output. The normal grep scenario is that the amount of output is
    small compared to the amount of input, so the overhead of output
    buffer copying is small, while savings due to avoiding many small
    unbuffered writes can be large.)

  • Don't look for newlines in the input until after you've found a match.

  • Try to set things up (page-aligned buffers, page-sized read chunks,
    optionally use mmap) so the kernel can ALSO avoid copying the bytes.

The key to making programs fast is to make them do practically nothing. ;-)

Introduction - Documentation Nextcloud

Une documentation francophone de Nextcloud orientée utilisateurs et réalisé par derivation.fr

How to write idempotent Bash scripts · Fatih Arslan

mkdir -p instead of mkdir

ln -sfn source target instead of ln -s source target

rm -f example.txt instead of rm example.txt

Modifying a file

if ! grep -qF "/mnt/dev" /etc/fstab; then
  echo "/dev/sda1 /mnt/dev ext4 defaults 0 0" | sudo tee -a /etc/fstab
fi

Check if variable, file or dir exists
formatting a device
mounting a device

Note: Accessibility short checklist
  • Sufficient contrast between foreground and background (Colour Palette Checker or Colour Contrast Analyser).
  • Coding of information not exclusively through colours (e.g. icons)
  • Interactive elements easy to identify as such
  • Clear and consistent navigation
  • Input fields are provided with clear meaningful labels
  • The system provides easy-to-perceive feedback?
  • Meaningful grouping of content through spacing and headings
  • Typography works with (browser) scaling of font size?
  • Alternatives for images and multimedia content (e.g. descriptive text) are offered
  • Automatic playback or execution of content and action is avoided
  • Headings and links are meaningful
  • There are clear work instructions and assistance
Someone Asks Women Who Refused To Marry Or Have Kids How Life Has Been, And They Deliver 30 Honest Responses | Bored Panda

They got it right 👍‍

Indicating language choice: flags, text, both, neither? | 456 Berea Street

After looking at the available options I definitely prefer number 2 in the list above: the name of the language as text in the language itself, possibly followed by the name of the language in the language of the current page.

After thinking about it, this is what is the most explicit, even if it is not shiny 👍‍

This Idea Does Not Exist

It gives company or open-source project ideas.