Caleb
127 subscribers
49 photos
2 videos
49 links
Caleb here ... a living proof that anyone can code. come see what I'm building and maybe learn something (or at least laugh at my struggles)

kalebalebachew.com
Download Telegram
This is the craziest thing i've seen in a while 🙌🏽
Forwarded from SEMER NUR
🇬🇧
Please open Telegram to view this post
VIEW IN TELEGRAM
Thoughts ? 😭😂
Forwarded from Frectonz
The JS Execution Model

[bsky]
Forwarded from Genene T. ☕️
The lion does not concern himself with edge cases.😂
😁2
Average vibe coder’s prompt 😭
😁3🤣2
Just sent my first-ever PR to the Laravel framework

added except() method to JsonResource class so you can easily exclude fields like:

(new UserResource($user))->except(['email', 'profile.ssn']);


Taylor Otwell reviewed it (yeah, that Taylor 👀) and said they’ll consider it for Laravel 13.

Didn’t get merged, but still feels awesome seeing my name in a Laravel PR thread 😎

Here's the link - https://github.com/laravel/framework/pull/57426
🔥8
Ever wondered why we hash JWTs with a secret key if anyone can decode them anyway?

A JWT has three parts:
header.payload.signature

The header and payload are just Base64URL-encoded, not encrypted so yes, anyone can decode and read them. That’s intentional.

When a server receives a JWT, it recomputes the signature using its secret key and compares it to the token’s signature.
If someone changed even one letter in the payload like switching
"role":"user"

to
"role":"admin"

the signatures wouldn’t match and the token would be rejected. so hashing a JWT with a key isn’t about secrecy it’s about authenticity.
It proves the data is real, untampered, and issued by someone who holds the secret.
🔥5
damn😭
😁1
Distributed Locks in microservices

lets say multiple microservices share one cache, things can get messy fast two services might try to refresh the same token or update the same record.

A distributed lock makes sure only one process touches a shared resource at a time.

Laravel example
$lock = Cache::lock('cache-key', 10); // 10 seconds

if ($lock->get()) {
try {
// Only one process gets here
$this->refreshToken();
} finally {
$lock->release();
}
} else {
// 🚫 Another process is refreshing already
}


That’s it.
You can safely run multiple workers or services only one will hold the lock at a time.
👌2
Forwarded from Hossiy Dev
Today I dialed *804# to check my balance…

Then Ethio Telecom sent me a never-ending SMS 😩

Is that only me, or is anyone else frustrated by these giant messages too?

As a programmer 😊, instead of reading all this, I opened my PC and built this mini bot.

👉  Try it here: Tele Package Shortener

❤️ React for more updates!

👉 Join our channel for more powerful resources:
1🔥1
Forwarded from SEMER NUR
If your mindset isn’t evolving from being developer minded to business minded ቆም ብለህ አስብበት :)
Back with another open-source contribution 😎

I wanted to use the Laravel Audit Logger package for a project, Turns out, it didn’t support PostgreSQL which I needed for the setup.

I decided to build and add a Postgres driver myself.

and guess what the PR got merged .

Not bad for my first open-source merged PR 😅

Here’s the PR thread → github.com/iamfarhad/laravel-audit-log/pull/4
🔥72