Skip to content

Instantly share code, notes, and snippets.

View michalsn's full-sized avatar
💭
Always dreaming of things to come

Michal Sniatala michalsn

💭
Always dreaming of things to come
View GitHub Profile
@syahzul
syahzul / how-to-install-php-oci8-for-macos-ventura-sonoma-and-above-on-apple-silicon-macs-arm64-version.md
Last active December 22, 2024 19:50
How to install PHP OCI8 for macOS Ventura/Sonoma on Apple Silicon Macs (arm64 version)

How to install PHP OCI8 for macOS Ventura/Sonoma on Apple Silicon Macs (arm64 version)

This tutorial will guide you on how to install OCI8 for PHP8.3 using Oracle Instant Client arm64.

1. Install Command Line Tools for Xcode

Run the command below if you haven't installed it on your machine.

xcode-select --install
@lysender
lysender / htmx-allow-400-errors-swap-for-validation-errors.md
Created August 19, 2023 13:49
HTMX - Allow HTTP error 400 and 422 swap content to enable showing validation errors

Still a newbie to HTMX.

I was writing some form submit interaction and realized that HTMX won't swap/render if the HTTP status code is not 2xx.

For 404, 500 or 503 errors, I think it's fair enough.

For my use case, I'm returning error 400 or 422 for validation errors. I'm returning the form back with some error decorations for example.

According to the docs, I can change that behavior.

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@joepie91
joepie91 / vpn.md
Last active December 19, 2024 02:57
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.