Advertisement · 728 × 90

Posts by Kenton Vizdos

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

this is so cool
haptics.lochie.me

1 month ago 228 47 13 14

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

1 month ago 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.

1 month ago 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.

1 month ago 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.

1 month ago 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.

1 month ago 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.

1 month ago 0 0 1 0
Advertisement

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.

1 month ago 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.

1 month ago 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.

1 month ago 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.

1 month ago 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"
```

1 month ago 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.

1 month ago 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"`.

1 month ago 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.

1 month ago 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

1 month ago 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...

3 months ago 20 3 1 1
Advertisement

🔥🔥🔥

3 months ago 0 0 0 0

%q is game changer in very unique situations

4 months ago 1 0 1 0
Post image

real

4 months ago 2 0 1 0

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

5 months ago 1 0 0 0

oh HECK YEAH

5 months ago 1 0 1 0

welcome to the dark side 😇

5 months ago 1 0 0 0

I’d guess it’s people asking “what’s Bruno?” when they see it 😅

6 months ago 0 0 0 0

0 OpenAPI and a few comments 🫡

6 months ago 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

7 months ago 42 6 2 1
Advertisement

linecon was an experience 😆

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

7 months ago 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

8 months ago 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

8 months ago 20 5 1 1

Charge for an API Key.

Devs can scrape, at least an API key you can track usage and charge appropriately 😉

8 months ago 1 0 0 0