I keep this site free of ads and trackers for your privacy. If you would like to support what I’m doing in any of my various projects, you can Buy me a Coffee.

26th

07:06: When the (human) language in an HTML document changes temporarily (ie a paragraph or blockquote in one language while the majority of the page is in another), specify the lang attribute in the lowest level element that wraps the text. This gives browsers and other machines additional context for operations such as translation.1

Lorsque la langue (human) dans un document HTML change temporairement (Quand une paragraphe ou citation en bloque est dans un langue et la page est dans un autre), spécifiez l’attribut lang dans l’élément plus proche qui encapsule le texte. Ce donne à les browsers et d’autres machines le contexte supplémentaire pour les operations comme la traduction.


22nd

11:35 CSS Donut Scoping - to have styling on a parent element that isn’t inherited by specified (or non-specified) child elements.

8th

09:15 Let your git commit messages be brief and instead be as wordy as you please in an associated git note. Do git notes add to create a new note or add to an existing note. If you don’t specify the commit, the note will attach to HEAD.

5th

12:56: When you need to sort a list by a specific key in each list-item’s object, you use a lambda function to drill down to your key.1

example = [
	("event": "A walk in the woods", "date": datetime_object_1),
	("event": "Grocery Shopping", "date": datetime_object_2),
	("event": "Movie Night")
]

example.sort(key=lambda example: example["date"])

1st

14:09: Some choice quotes from ADHD 2.01:

On conforming to social norms & standards:

We don’t choose not to conform. We don’t even notice what the standard we’re not conforming to is! – Chapter 1

On cerebellar fitness:

Basically, it’s been shown that you can take your cerebellum to the cerebellar gym and beef it up. – Chapter 3

Refs:

25th

21:55: For when you develop a Python script on one machine, then place it for running on another, but you didn’t generate a requirements.txt file - pipreqs1 will interrogate the import statements in all python files in the directory you specify and generate a requirements.txt file based on those import statements. Then you can pip install -r requirements.txt to make sure all your script’s requirements are met. Boom.

Refs:

8th

10:30: I’m always needing and never remembering that dict(zip(keys, values)) is a thing. Dict keys in keys, dict values in values, and boom! now both are combined as a single dictionary. Note that keys and values must be equal in length.

2nd

14:47: tired: “I should do [thing].” wired: “If I do [thing], then [other positive thing]”. The first weighs the task down with a moral obligation. The second focuses on the positive benefit or outcome.1


Refs:


  1. Comment in r/ADHD post accessed 5/2/23 ↩︎

11th

19:21: NFC tag on washing machine -> Tasker -> set timer to remind myself to flip the load I’ve just started over to the dryer. And another one on the dryer, same deal.