Trending
Kenton Vizdos's Avatar

Kenton Vizdos

@kv.codes

Go & Lit (web components) Developer making cool things Technical Blog @ https://go.kv.codes/blog

63
Followers
234
Following
306
Posts
24.11.2024
Joined
Posts Following

Latest posts by Kenton Vizdos @kv.codes

Preview
WebHaptics – Haptic feedback for the mobile web. Haptic feedback for the mobile web.

this is so cool
haptics.lochie.me

02.03.2026 19:40 πŸ‘ 227 πŸ” 47 πŸ’¬ 13 πŸ“Œ 14

Instead, create a browser extension that’ll show OTP codes sent to emails :-)

26.02.2026 13:29 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Takeaway: when you want a targeted update, treat it like a file-level import. Use git restore, keep main clean, and keep the change set small and auditable.

14.02.2026 01:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

After running it, you still control what lands in main. Review the diff, run tests, then commit just that file change.

14.02.2026 01:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Command:

git restore --source branch_name -- file_path

This replaces the file in your current branch with the version from the specified branch.

14.02.2026 01:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Git can restore a file from another branch directly into your working tree. No cherry-pick, no merge commit, no rebasing gymnastics.

14.02.2026 01:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Scenario: you updated a file in a branch, but main only needs to update that one file. Merging the branch would pull unrelated commits, risk conflicts, and expand the review surface.

14.02.2026 01:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Needed one change from a feature branch, without dragging the whole branch into main? There is a clean Git move for that. Quick thread on copying a single file across branches, no merge required.

14.02.2026 01:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Takeaway: avoid shadowing predeclared identifiers (`nil`, `len`, `new`, `make`). Go allows it, but it creates code that is correct and deeply misleading at the same time.

13.02.2026 14:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Finally:

```go
fmt.Println(x, nil)
```

prints something like:

`<nil> a`

`x` is still the real nil interface value. `nil` is your local string variable. Same token, different binding.

13.02.2026 14:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

That comparison is false. `x` is a nil interface value, not a string. So the `panic(nil)` never runs, even though it reads like it should. If it did run, it would panic with `"a"`, because `nil` is your string.

13.02.2026 14:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

So this line:

```go
if x == nil
```

is no longer β€œis x nil?”. It is β€œis x equal to the string `a`?”. In other words, it becomes:

```go
if x == "a"
```

13.02.2026 14:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

After `nil := "a"`, every `nil` in that scope refers to your string variable, not the built-in `nil`. You did not change the language, you just hid the predeclared identifier behind a local name.

13.02.2026 14:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

In this program:

```go
var x any
nil := "a"
```

`x` is the zero value for `any`, which is a nil interface value. Then you create a new variable literally named `nil`, holding `"a"`.

13.02.2026 14:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Go lets you do something that feels illegal: shadow `nil`. Yes, `nil` is not a keyword. It is a predeclared identifier, so you can redefine it in a scope, and the compiler will accept it.

13.02.2026 14:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Web Share API A quick dive into the Web Share API: how it works, when to use it, and why it's surprisingly useful for modern web apps (especially on mobile). Includes code, fallbacks, and a few UX tips.

Web Share API enables native sharing from the browser, via `navigator.share({ title, text, url, files })`. It returns a promise, so you can log success vs cancel. Implement feature detection and fall back to copy-to-clipboard for unsupported browsers
kv.codes/post/Web-Share-API

13.02.2026 01:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Masonry Layout is Now grid-lanes | CSS-Tricks It's settled! A new CSS display property keyword called grid-lanes will trigger a masonry layout mode.

Masonry Layout is now grid-lanes css-tricks.com/masonry-layo...

22.12.2025 08:52 πŸ‘ 20 πŸ” 3 πŸ’¬ 1 πŸ“Œ 1

πŸ”₯πŸ”₯πŸ”₯

09.12.2025 13:51 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

%q is game changer in very unique situations

11.11.2025 02:24 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

real

06.11.2025 14:41 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I saw you’re post on self hosting Reddit, seems to have done well!! Congrats!

31.10.2025 14:53 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

oh HECK YEAH

28.10.2025 13:38 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

welcome to the dark side πŸ˜‡

18.10.2025 22:16 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I’d guess it’s people asking β€œwhat’s Bruno?” when they see it πŸ˜…

26.09.2025 13:40 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

0 OpenAPI and a few comments 🫑

07.09.2025 18:52 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Just refreshed the whoami.filippo.io database.

If you are one of the β€œlucky 10,000” who’s never heard of it, try

$ ssh whoami.filippo.io

13.08.2025 23:35 πŸ‘ 42 πŸ” 6 πŸ’¬ 2 πŸ“Œ 1

linecon was an experience πŸ˜†

8pm-8am eeesh. I’ll probably go in a tad later next year ;)

07.08.2025 18:42 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

try out just files next!

make has a ton of useful stuff for detecting build changes, but with go, it’s not *as* big of a concern, so more simplistic justfiles work really well imo

02.08.2025 15:33 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

Base64 encoding is everywhere on the web: in HTTP headers, JWTs, even in HTML. But what is it and how does it actually work?

I break it down in my latest video!

Watch now: youtu.be/8v4moossLXo

30.07.2025 14:00 πŸ‘ 20 πŸ” 5 πŸ’¬ 1 πŸ“Œ 1

Charge for an API Key.

Devs can scrape, at least an API key you can track usage and charge appropriately πŸ˜‰

24.07.2025 22:39 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0