Skip to content

43rd Week of 2021

Life Management

Book Management

  • Improvement: Add link to the calibre-web kobo integration project.

Coding

Python

Full screen applications

Pytest

Python Snippets

  • New: Locate element in list.

    a = ['a', 'b']
    
    index = a.index('b')
    
  • New: Transpose a list of lists.

    >>> l=[[1,2,3],[4,5,6],[7,8,9]]
    >>> [list(i) for i in zip(*l)]
    ... [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
    
  • New: Check the type of a list of strings.

    def _is_list_of_lists(data: Any) -> bool:
        """Check if data is a list of strings."""
        if data and isinstance(data, list):
            return all(isinstance(elem, list) for elem in data)
        else:
            return False
    

Prompt Toolkit

DevOps

Infrastructure as Code

Helmfile

  • Correction: Use environment name instead of get values.

    Instead of .Environment.Name, in theory you could have used .Vars | get "environment", which could have prevented the variables and secrets of the default environment will need to be called default_values.yaml, and default_secrets.yaml, which is misleading. But you can't use .Values in the helmfile.yaml as it's not loaded when the file is parsed, and you get an error. A solution would be to layer the helmfile state files but I wasn't able to make it work.

  • New: How to install a chart only in one environment.

    environments:
      default:
      production:
    
    ---
    
    releases:
    - name: newrelic-agent
      installed: {{ eq .Environment.Name "production" | toYaml }}
      # snip
    
  • New: Add note that templates can't be used inside the secrets.

    See this issue

Helm Secrets

  • Correction: Update the repository url.

    The last fork is dead, long live the fork

  • New: How to install the plugin.

Operative Systems

Linux

Kitty

  • New: Enable infinite scrollback history.

    To make the history scrollback infinite add the next lines:

    scrollback_lines -1
    scrollback_pager_history_size 0
    
  • New: Reasons to migrate from urxvt to kitty.

    • It doesn't fuck up your terminal colors.
    • You can use peek to record your screen.
    • Easier to extend.

Peek

  • Correction: Add note that it works with kitty.

Arts

Drawing

  • New: How to draw Ellipses.

    Ellipses are the next basic shape we're going to study (after the lines). They are extremely important and notoriously annoying to draw. Important because we're going to be using ellipses in 2D space to represent circles that exist in 3D space.

    In this section we:

Exercise Pool

  • New: Add the Tables of ellipses drawing exercise.

    This exercise is meant to get you used to drawing ellipses, in a variety of sizes, orientations and degrees. It also sets out a clear space each ellipse is meant to occupy, giving us a means to assess whether or not an ellipse was successful, or if there were visible mistakes (where it went outside of its allotted space, or ended up falling short). Practicing against set criteria, with a way to judge success/failure is an important element of learning. There's nothing wrong with failure - it's an opportunity to learn. Having a clearly defined task allows us to analyze those failures and make the most of them.