Skip to content

Instantly share code, notes, and snippets.

@kwilczynski
kwilczynski / buckets.txt
Last active August 28, 2023 14:38
Parse S3 URL into bucket, key, region, version ID, etc. Useful when using AWS SDK for Go.
http://s3.amazonaws.com/bucket/key (for a bucket created in the US East (N. Virginia) region)
https://s3.amazonaws.com/bucket/key
http://s3-region.amazonaws.com/bucket/key
https://s3-region.amazonaws.com/bucket/key
http://s3.region.amazonaws.com/bucket/key
https://s3.region.amazonaws.com/bucket/key
http://s3.dualstack.region.amazonaws.com/bucket/key (for requests using IPv4 or IPv6)
@jreviews
jreviews / htmx-loading-states-extension.md
Last active April 1, 2024 22:22
htmx loading states extension

htmx loading states extension

The loading-states extension allows you to easily manage loading states while a request is in flight, including disabling elements, and adding and removing CSS classes.

Using the extension

Add the hx-ext="loading-states" attribute to the body tag or to any parent element containing your htmx attributes.

Add the following class to your stylesheet to make sure elements are hidden by default: