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
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
๐Ÿ”ฅ7โค2
Forwarded from SEMER NUR
Going Big ๐Ÿ”ฅ
๐Ÿ”ฅ2
Forwarded from Shega Media
๐—˜๐˜๐—ต๐—ถ๐—ผ๐—ฝ๐—ถ๐—ฎ๐—ป ๐—”๐—ถ๐—ฟ๐—น๐—ถ๐—ป๐—ฒ๐˜€ ๐—˜๐—ป๐—ฎ๐—ฏ๐—น๐—ฒ๐˜€ ๐——๐—ฒ๐—ฏ๐—ถ๐˜ ๐—–๐—ฎ๐—ฟ๐—ฑ ๐—ฃ๐—ฎ๐˜†๐—บ๐—ฒ๐—ป๐˜๐˜€ ๐—ง๐—ต๐—ฟ๐—ผ๐˜‚๐—ด๐—ต ๐—–๐—ต๐—ฎ๐—ฝ๐—ฎโ€™๐˜€ ๐—ฃ๐—ฎ๐˜†๐—บ๐—ฒ๐—ป๐˜ ๐—š๐—ฎ๐˜๐—ฒ๐˜„๐—ฎ๐˜†

For the first time, travelers can book flights and purchase airline services directly using Ethiopian debit cards, traditionally used for ATM withdrawals.

The move expands the airlineโ€™s digital payment ecosystem without having to establish individual integrations with each local bank.

The partnership also strengthens Chapaโ€™s role in Ethiopiaโ€™s fintech landscape by expanding its payment services across major industries.

๐—™๐˜‚๐—น๐—น ๐˜€๐˜๐—ผ๐—ฟ๐˜†.๐Ÿ‘‡
https://shega.co/news/chapa-partners-with-ethiopian-airlines-to-enable-atm-card-payments-in-local-currency
๐Ÿ‘1
Hey! Weโ€™re hiring a remote frontend intern (Ethiopia-based).
Weโ€™re building something big with Next.js youโ€™ll make clean UIs and need to know how the web works. A bit of UI/UX skill helps.
No overqualified folks we want someone to grow with us.

โ€ข 3K/month
โ€ข Good shot at full-time

Send portfolio/resume to chord.addisvision@gmail.com. Letโ€™s talk.
If you're an arsenal fan and a data engineer this would be a dream job๐Ÿ˜…

Apply here
๐Ÿ˜1
How many of you know about chapagram(@ChapagramBot) btw ?

- it lets you request money from your contacts
- split bills with your buddies.
- and there's a feature called shamo you should try out and many more.
๐Ÿ”ฅ1๐Ÿค”1
even github has 500 server error๐Ÿ˜ญ
๐Ÿ˜1
is it only me or does it bother you when someone says UX/UI instead of UI/UX ๐Ÿ˜ญ
๐Ÿค”1