You can specify the minimum and maximum value, the selected range ([min: number, max: number]), and an optional rangeMin
distance between the two.
A playground is available in [Flems](https://flems.io/#0=N4IgzgpgNhDGAuEAmIBcIB0sxhAGhADMBLGXVAbVADsBDAWwjUwAt56p8RYB7axfsxABfPDQZN0GeLgK9+EQegD0ygATF6ABx4AneGvp41wNQDFaCPQE8Awj219F8YwEF48XcQBGAV0RgasJqhLoOagDk9MTwLF5QEQDcADrUqRAAHjr6avDWWhBqALLE1EW0GWoAvGoU0dSoatS+9N4Qusb0FY3Nre0Auilp1JnZBqWIuoSWhQAiPL7eMABKtNQA5hAAylDESO3unoGZAkiBh15+ASapamrKAFQPxaWaLWoAbrRQvoUPyrdDKUei02rohndHs9yhk3vRPt9fmp-oCuhkQX1wYCoWottA4IgkGpdGtNsiAdQ7iSNhAAPyNEplCoQ+5PXGILRqMDEABeEGMAAF9tNfFADABGcmAsAc+lNUHtFk4xlwhE-QpteAAdwgii5+IQyCB1FVayJaLhxggGHWGFyPDUtA+PD2uRYhV8kF0+pgCFK60dxNJhR4hDUAFYALThwXC2iiiVSylBmmMuW9MFKtkAeWosBYwbUBeoSBg3pRyb4+eDcoAFNTNgzSjCAJTVAB8nxdSCGwlS6SyegM8hlanmixWwZ2e3ajQsVl0dgcOhG-AAPOOlhBVjTp-tdBcwJ2arW21VO8BATADA2IABRGCMfiNAASABUigAZLZaNYPiBPvALLXsaO6bAAktQWj+K+H6fpB0HwP+gHARABhomBEAITBajvl+2FIY+zioehpQAGqIlhUE4Xh8HUYRAHEVeaGGBU
Creates a simple donut chart in mithril (v2.2.2) using TypeScript, including a legend and tooltips. A playground is provided in [flems](https://flems.io/#0=N4IgtglgJlA2CmIBcAWAbAOgMwEYA0IAzvAgMYAu8UyIG5hIBAZhAg0gNqgB2AhmIiS0AFuTCxGIUgHtulOTRABfPD36Da9STLnwFQgPQGABBDAAHaQCdyxsHmPBjAMV4VrATwDC0i7L22SsZMVr7GAOSQ5MJWrOEA3AA63MkQulZMbvDGACKyAK7kXsK8NgDKsBCk2cDJxvXGsLwARiRIxoTksdwA5kncDcYAbryw+fDt3PlgrVb9gzKw1u2d3X3JSsmp6ZnVuQVFJTYAguRdhI51DVC85LzteVOHpeQVVfAcALrzDWnc8FYAEq8KAQfKESbTWY-erSQoA4Gg8GQmYA-qbFLcHSdfZPYovdqudxWby+Sz-OQAHkehXxJzOVkIAD5jABeS4DBpDCDwADu7QAFE5budjEoAJRslm1TmDerY2xOG53Bx-BEgsGEBxwyhAjXgsVs4wixn9K5y4xGYxeUakfJNSjGcjSO6wYajcbmuUKp0u0YANQ92XZyt4GCsVHy1QFArcpAchEq1UlrJZceMAGoOkn4BgRmN4A4AAzis2yuVWm2wO0O7K8XpsL2DBC2TovY4N4PGIswuUt4x6KAdnoII09psNH2lUgQxzGKArLppHoOFiwWCLtYOJqtDcdJe9Bz58Yo2YOO1ge23CBDeCBgungFir5Gr69wahjBMawAUTcwgFRN3ilDkLQtKdOyNQCczzINLV9V173GSUACpjCwNBx3LMCB24IdIPZNsTkgrN6xHeAyxwhZZBxIjyGHBBESguiGOyABaYwAE4S2MNCAFlbmEDAAAUAEl4JwAAOLCqMnGjbEHVimPZAVFM
My camera photos on my phone all end up in one big folder. I wanted to sort them by date taken in a simple format year-month format, YYYY-MM. I tried the application PhotoMove, but unfortunately, this simple requirement is only available with the PRO version, so instead, I've asked ChatGPT to create a PowerShell script for me.
- Download the Windows version from exif tool and unzip it into a folder. Make sure that the name is
exiftool.exe
(in my case, it had a weird nameexiftool(-k).exe
so rename it if that's the case). - Save the PowerShell script you can find below in the same folder.
- Open a PowerShell window (WIN+R and enter
powershell
) - Run the script
./sort.ps1
POSTGRESQL_PASSWORD="PASSWORD" | |
POSTGRESQL_POSTGRES_PASSWORD="PASSWORD" | |
KEYCLOAK_ADMIN_PWD="PASSWORD" | |
HOST="LOCALHOST" | |
EMAIL="YOUR.EMAIL" |
--- | |
version: "3.3" | |
networks: | |
icem-net: | |
driver: overlay | |
attachable: true | |
services: | |
reverse-proxy: |
When moving from a local development environment to the cloud, e.g. Docker swarm or Kubernetes, you often need a way to access local files. However, in the cloud your local file system cannot be accessed anymore, so you need a way to copy your local files to a volume and mount that instead. This is the purpose of the script. You supply it with the volume name (e.g. schemas
) and the local folder containing the schemas, e.g. ../../schemas
, and a schemas
volume is created, containing all data that is copied into the container.
./create_volume.sh schemas ../../schemas
const url = "https://www.lancasterguardian.co.uk/read-this/womens-world-cup-2023-groups-england-to-face-denmark-and-china-see-the-full-draw-3890113"; | |
const url1 = "https://www.tudelft.nl"; | |
const url2 = "https://whatsnew2day.com/world-cup-2023-draw-uswnt-face-vietnam-netherlands-playoff-winner-new-zealand-htmlns_mchannelrssns_campaign1490ito1490/"; | |
const url3 = "https://www.news4jax.com/news/politics/2022/10/22/weapons-shortages-could-mean-hard-calls-for-ukraines-allies/"; | |
const extractAgency = (url = '') => { | |
if (url.startsWith('https://t.me/')) return 'TELEGRAM'; | |
let hostname: string; | |
try { | |
const u = new URL(url); |
/** | |
* Use IndexedDB for local storage. | |
* Based on https://github.com/DVLP/localStorageDB, but converted to TypeScript and using async instead of callbacks. | |
* @source: https://github.com/DVLP/localStorageDB/blob/master/localdata.js | |
* | |
* Usage example | |
* | |
* | |
```ts | |
const test = async () => { |
/* A list of useful functions snippets */ | |
/** | |
* Create a GUID | |
* @see https://stackoverflow.com/a/2117523/319711 | |
* | |
* @returns RFC4122 version 4 compliant GUID | |
*/ | |
export const uuid4 = () => { | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { |