Posts

Who Owns It vs. What You Can Do: Demystifying chown and chmod

Image
Every developer who has ever run a command only to be greeted by Permission denied has faced the sudden urge to type sudo chmod -R 777 and walk away. It’s an impulse as old as Unix itself, but sledgehammering file permissions usually causes more problems than it solves. Most permission bugs don't require breaking the locks; they just require knowing whether you need a different key or a different owner. In Unix-like systems, security boils down to two distinct questions: Who is this file tied to? and What are people allowed to do with it? That is the entire divide between chown and chmod . 1. The Core Meaning: Identity vs. Action The names themselves are straightforward abbreviations of their original functions: chown (Change Owner): Governs identity . It determines which user and group legally own a file or directory. chmod (Change Mode): Governs capability . It determines the permissions—read, write...

How to prevent Docker bloat

If you use Docker long enough, you will eventually run out of disk space. Docker rarely deletes anything on its own, so old files pile up quietly until your computer starts slowing down or running out of room. Docker makes running apps simple, but it can quickly fill up your drive. Here is how to see what is taking up space and how to clean it up safely without breaking your daily work. Why Docker Eats Your Storage Every time you build or run apps, Docker leaves behind files: Dangling Images: Old image layers that are no longer used or labeled. Stopped Containers: Old test runs that are shut down but still saved on disk. Build Cache: Temporary files Docker keeps to make future builds faster. Unused Volumes: Storage folders left behind after containers are deleted. Step 1: Check Your Disk Usage First Before deleting anything, see where your space is actu...

Links for Remote Jobs

Image
Refer These Links that can be applied for remote jobs.  මෙන්න remote work වෙනුවෙන් USD වලින් pay කරන websites 15ක්: 1. We Work Remotely 4.5M+ visitors ලා ඉන්න විශාලතම remote work community එක. Wide range එකක remote job opportunities ලබා දෙනවා. Link: https://weworkremotely.com 2. Hubstaff Talent Remote talent සොයන companies වෙනුවෙන් තියෙන free resource එකක්. ලෝකය පුරා ඉන්න freelancers ලාව සහ agencies ලාව businesses එක්ක connect කරනවා. Link: https://hubstafftalent.net 3. Wellfound Job seekers ලාව startups එක්ක connect කරනවා. Companies 27K කින් 130K+ tech jobs තියෙනවා. Link: https://wellfound.com/ 4. Remotive Active, fully remote tech jobs විතරක් curate කරලා දෙනවා. Top global tech companies වල විශ්වාසය දිනාගත්ත තැනක්. Link: https://remotive.io/ 5. WorkWave විවිධ industries සඳහා වන remote job listings තියෙනවා. Flexible work opportunities සඳහා ගොඩක් ප්‍රසිද්ධයි. Link: https://www.workwave.com/ 6. AI Jobs AI-related remote job listings ගැන විතරක්ම focus කරනවා. Top 1% AI companies වල...

Callback Function Simple Explaination

Image
Callback Function A callback function is a function that you pass into another function , so it can be called later when something happens. Human example: You order food at a restaurant. You tell the waiter: “When my food is ready, call me.” Here, calling you later is like a callback. In programming: function cookFood(callback) { console.log("Cooking food..."); callback(); } function tellCustomer() { console.log("Your food is ready!"); } cookFood(tellCustomer); Output: Cooking food... Your food is ready! Here, tellCustomer is the callback function. Because we pass it into cookFood(tellCustomer) . Then cookFood runs it later using callback(); Another common example: setTimeout(function () { console.log("This runs after 2 seconds"); }, 2000); Here, the function inside set...