scy

scy's avatar
scy
npub15pc5...hvce
Nerd. Freelance Software Dev. Relationship Anarchist. Sometimes lives in a van. Queer white cis dude, promotes anti-capitalism, anti-fascism, intersectional feminism, the fight against climate change, and thoughtful, ethical behavior in general. Toots in English or German about software development (mainly Python, JavaScript, Shell), Linux, Vim, electronics/µCs, van life, politics, sex, (inter)personal & emotional things, music, Star Trek, beverages. May contain awful puns.
TIL: Instead of the standard pattern of if k not in mydict: mydict[k] = [] mydict[k].append(foo) Python comes with a subclass of dict that will automatically create missing elements from a factory function as soon as you try to access them: from collections import defaultdict mydict = defaultdict(list) mydict[k].append(foo) #Python
Öh, Crypto-Nerds, wie genau funktionieren eigentlich PINs für Girocards und Kreditkarten? Insbesondere frage ich für die "Wunsch-PIN"-Funktion, mit der ich online(!) die PIN für meine Kreditkarte ändern kann. Ich ging bislang davon aus, dass die PIN den Hardware-Crypto-Teil der Karte entsperrt und nicht bis zur Bank wandert. Bei Girocards scheint das auch so zu sein, denn da kann ich die PIN nur am Automaten ändern. Bei Kreditkarten kann ich aber online eine neue vergeben? Wie geht das?
TIL: You can create popup menus that open and close based on a button in plain HTML, no JavaScript needed. You can also position elements to be adjacent to other elements in plain CSS, no JavaScript needed. And you can have the browser make sure that these things are positioned inside the viewport and automatically move to a fallback position, for example to have a dropdown open _over_ its associated button if that button is at the bottom of the screen. In plain CSS.
The upcoming "quote post" feature in Mastodon and other Fedi software can lead to DM leaks. "DMs" were always "everyone that's mentioned via @ can read the message". However, with the quoting feature, _linking_ to someone's post from a DM, even without mentioning them, may be interpreted as "quoting" their post by Mastodon. And if that user allows quotes, they will be notified of your (DM) post _and_ be able to read its content.