TLDR: Use for...of
instead of forEach()
in asynchronous code.
For legacy browsers, use for...i
or [].reduce()
To execute the promises in parallel, use Promise.all([].map(...))
/* | |
Mermaid + DuckDB for generating customer hierarchy diagrams | |
DuckDB version: 0.10.2 | |
Bill Wallis, 2024-05-09 | |
*/ | |
select version(); |
body { | |
border-top: solid 10px; | |
border-image: repeating-linear-gradient( -75deg, yellow, yellow 10px, black 10px, black 20px) 20; | |
} |
*update: TBC, but this new might affect how easy it is to use this technique past August 2024: Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August
This gist, based in part on a gist by Brian Hartvigsen, allows you to export from Authy your TOTP tokens you have stored there.
Those can be "standard" 6-digits / 30 secs tokens, or Authy's own version, the 7-digits / 10 secs tokens.
// This code can convert the number values to Hours, and minutes. | |
// Example, your meta store: "125" this calc can output to: 2h5m so 2 hours, and 5 minutes | |
// copy this code in the child theme functions.php or a specific code plugin like FluentSnippets | |
// For the code to work, you need to install the Calculated Callback Add-on addons | |
// Plugin: https://github.com/MjHead/jet-engine-calculated-callback | |
// Plugin desc: https://crocoblock.com/knowledge-base/jetengine/calculated-callback-add-on/#custom-callback | |
// when you pasted the code, open the Elementor editor, and place the Dynamic Field widget, enable the Filter Field output | |
// in the dropdown, select the Calculated field Callback |
// Matrix PlayGround Shader - UnityCoder.com | |
// References: | |
// Matrices http://www.codinglabs.net/article_world_view_projection_matrix.aspx | |
// Rotation: http://www.gamedev.net/topic/610115-solved-rotation-deforming-mesh-opengl-es-20/#entry4859756 | |
Shader "UnityCoder/MatrixPlayground" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} |
""" | |
caching test/demo | |
first: | |
pip install fastapi aiocache "uvicorn[standard]" | |
""" | |
import asyncio | |
import contextlib | |
import json | |
import logging |