Have you ever seen an one time password link in a regular <a> tag?
Here is an example TOTP link from Google Authenticator repo:
The most familiar form for them is QR codes:
Which is a problem if you're alterady on your mobile device and you can't scan it. For this case there is usually a text like "Please manually add the key
JBSW Y3DP EHPK 3PXPto your Authenticator app". But what about the link itself? Well, just try it on your phone: click me.
I'm really shocked that it works perfectly and that I have never seen this simple and very web style solution in action.
A discovery of the day. Many people know that you can define and read an object property with an arbitrary name:
Kernel#sendshould be deprecated and removed from future rubies.
sendalways felt weird when I was an active ruby developer but I have never seen any strong criticisms on it. It's either an attack on all family of send-like calls or a fierce defence that "using
sendis not a bad practice". Only some style guides argue against
sendbecause it may overlap with existing methods. This post was written after reading one of defences.
At least among the libraries listed on the Packagist. On this Tuesday sandfoxme/bencode was updated to 2.0 that requires PHP 8 as a minimum. While it was meant mostly as an experiment and a joke, it allowed me to try some new features like
Stringableinterface and remove some old compatibility handling thanks to
mbstring.func_overloadbeing finally removed.
Short answer: NO. If you know what I mean.
While I'm still delaying my position on TOML vs YAML holy war let's look at the StrictYAML.
StrictYAML is a type-safe YAML parser that parses and validates a restricted subset of the YAML specification.
Seems great but let's look at the removed features list, Implicit Typing to be precise:
Just created a list of free domain name zones that still work if you need one for whatever reason.
You can find it here: freedomainzones.netlify.app.
Here is a small snippet adapted from the official instruction:
RUN wget -q -O /tmp/composer.sig https://composer.github.io/installer.sig && \ php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" && \ php -r '$expected = file_get_contents("/tmp/composer.sig"); $actual = hash_file("sha384", "/tmp/composer-setup.php"); exit(intval(!hash_equals($expected, $actual)));' && \ php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer && \ chmod +x /usr/local/bin/composer && \ rm /tmp/composer-setup.php /tmp/composer.sig
It doesn't require a script file, doesn't deal with environment variables, and doesn't depend on the shell.
When you created a cool tool in a language you don't like.