HuuDuoc retweeted
why did we make pdfs this powerful lmao
Here's a working game of Tetris inside a PDF. Even has keyboard controls (by typing WASD in an input box). Plus, upon game-over you can "save" your score by printing the page ;)
th0mas.nl/downloads/pdftris.…
Should work in most browsers (built for pdfium/PDF.js).
HuuDuoc retweeted
Aiden series of posts just confirms 1 thing: JUST ship! Performance and RSC are big mental constructs made by the industry to charge you money. If Github, Uber Eats and Pinterest have these painful re renders in production it means it doesn't matter 'that much'.
HuuDuoc retweeted
OK the new @vercel AI SDK Generative UI demo is wild 🤯
...especially the last part where I highlighted a section of the chart and asked "why did it dip here?"
Live demo → sdk.vercel.ai/demo
HuuDuoc retweeted
One step closer to the holodeck!
Introducing: Holotile
AR/VR walking is now possible!
HuuDuoc retweeted
Authentication in REST APIs acts as the crucial gateway, ensuring that solely authorized users or applications gain access to the API's resources.
Some popular authentication methods for REST APIs include:
1. Basic Authentication:
Involves sending a username and password with each request, but can be less secure without encryption.
When to use:
Suitable for simple applications where security and encryption aren’t the primary concern or when used over secured connections.
2. Token Authentication:
Uses generated tokens, like JSON Web Tokens (JWT), exchanged between client and server, offering enhanced security without sending login credentials with each request.
When to use:
Ideal for more secure and scalable systems, especially when avoiding sending login credentials with each request is a priority.
3. OAuth Authentication:
Enables third-party limited access to user resources without revealing credentials by issuing access tokens after user authentication.
When to use:
Ideal for scenarios requiring controlled access to user resources by third-party applications or services.
4. API Key Authentication:
Assigns unique keys to users or applications, sent in headers or parameters; while simple, it might lack the security features of token-based or OAuth methods.
When to use:
Convenient for straightforward access control in less sensitive environments or for granting access to certain functionalities without the need for user-specific permissions.
Over to you:
Which REST API authentication method do you find most effective in ensuring both security and usability for your applications?
--
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
HuuDuoc retweeted
My favorite Charlie Munger story:
In 1953, Munger was 29 years old.
Recently divorced. Lost the house. Huge social stigma of divorce back then.
His 8-year-old son, Teddy, was diagnosed with cancer.
The leukemia was incurable.
No medical insurance - Munger paid for all his medical care.
Charlie would visit Teddy in the hospital every day -- and then walk the streets crying.
Teddy died at the age of 9.
Charlie was broke, divorced and just lost his child.
99.9% of people would've turned to alcohol, drugs, or suicide. (And you'd understand why)
Munger never did.
Fast forward to 52 years old, a failed surgery left him blind in one eye with the potential of going fully blind one day.
Charlie was an obsessive learner who read every book he could get his hands on.
When confronted with the possibility of going blind and no longer being able to read he said:
"It's time for me to learn braille!"
The only thing that might be more impressive than his intellect was his actions.
RIP.
---------
Munger on Self-Pity:
"Generally speaking, envy, resentment, revenge, and self-pity are disastrous modes of thought.
Self-pity gets pretty close to paranoia…
Every time you find your drifting into self-pity, I don’t care what the cause, your child could be dying from cancer, self-pity is not going to improve the situation. It’s a ridiculous way to behave.
Life will have terrible blows, horrible blows, unfair blows, it doesn’t matter. Some people recover and others don’t.
There I think the attitude of Epictetus is the best. He thought that every mischance in life was an opportunity to behave well. Every mischance in life was an opportunity to learn something and that your duty was not to be immersed in self-pity, but to utilize the terrible blow in a constructive fashion. That is a very good idea."
HuuDuoc retweeted
✨ AWS Roadmap ✨
We just published a new interactive guide for learning AWS. We are also planning on running an experiment with a task based roadmap for this one, so stay tuned for that as well.
Check it out 👇
roadmap.sh/aws
HuuDuoc retweeted
They say I make $45K/month just by pure luck and just by posting my MRR on Twitter 🙃
I'll ignore them and have my 8 years of GitHub graph printed on my wall as a self-reminder ✅
HuuDuoc retweeted
My mom knows nothing about programming
But watches every video I make
That’s why I say “hi mom!” instead of “hello, world!” in every video.
I even leave easter eggs just for her that nobody else would understand.
She’s pretty funny and sends me text messages after every video.
But those messages stopped coming recently.
She got sick
Then really sick
Then passed away at 60
So don’t forget to say hi to your mom today
It really sucks when you can’t anymore
Bye mom
HuuDuoc retweeted
Tip: @ChromeDevTools can now override the content of Fetch/XHR requests! Great for mocking APIs without waiting on backend changes!
This and lots more in Chrome 117: bit.ly/wnd117




























