<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mina Samir on Medium]]></title>
        <description><![CDATA[Stories by Mina Samir on Medium]]></description>
        <link>https://medium.com/@mina.samir93?source=rss-3772d4bbc561------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FtXLXrMyIfvmQpCqdxuOpA.jpeg</url>
            <title>Stories by Mina Samir on Medium</title>
            <link>https://medium.com/@mina.samir93?source=rss-3772d4bbc561------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 04:10:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mina.samir93/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Design File Upload & Download the Right Way in Your Backend System]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@mina.samir93/how-to-design-file-upload-download-the-right-way-in-your-backend-system-556c3c4b3420?source=rss-3772d4bbc561------2"><img src="https://cdn-images-1.medium.com/max/2600/1*j8IPWXMruuqvjnVYVBZBHQ.png" width="2752"></a></p><p class="medium-feed-snippet">No matter what kind of system you&#x2019;re building&#x200A;&#x2014;&#x200A;small, medium, or enterprise, you will almost always need to handle file uploads and&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@mina.samir93/how-to-design-file-upload-download-the-right-way-in-your-backend-system-556c3c4b3420?source=rss-3772d4bbc561------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@mina.samir93/how-to-design-file-upload-download-the-right-way-in-your-backend-system-556c3c4b3420?source=rss-3772d4bbc561------2</link>
            <guid isPermaLink="false">https://medium.com/p/556c3c4b3420</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Mina Samir]]></dc:creator>
            <pubDate>Sun, 23 Nov 2025 12:03:47 GMT</pubDate>
            <atom:updated>2025-11-23T12:03:47.419Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[What Actually Happens When You Run “git clone”? An Inside Look]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@mina.samir93/what-actually-happens-when-you-run-git-clone-an-inside-look-f2c0aac761aa?source=rss-3772d4bbc561------2"><img src="https://cdn-images-1.medium.com/max/1920/1*THRQ-_08WxEGkDvBpn_upw.png" width="1920"></a></p><p class="medium-feed-snippet">When you clone a repository, Git does a lot more than just copy files. This article breaks down exactly what happens when you run git&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@mina.samir93/what-actually-happens-when-you-run-git-clone-an-inside-look-f2c0aac761aa?source=rss-3772d4bbc561------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@mina.samir93/what-actually-happens-when-you-run-git-clone-an-inside-look-f2c0aac761aa?source=rss-3772d4bbc561------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2c0aac761aa</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Mina Samir]]></dc:creator>
            <pubDate>Tue, 24 Sep 2024 18:12:23 GMT</pubDate>
            <atom:updated>2024-09-24T18:12:23.535Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[A Comprehensive Introduction to Git & GitHub — Part 2/4: Leveling Up with Diffing, Stashing, and…]]></title>
            <link>https://medium.com/@mina.samir93/a-comprehensive-introduction-to-git-github-part-2-4-leveling-up-with-diffing-stashing-and-6846d119a621?source=rss-3772d4bbc561------2</link>
            <guid isPermaLink="false">https://medium.com/p/6846d119a621</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Mina Samir]]></dc:creator>
            <pubDate>Fri, 20 Sep 2024 11:26:58 GMT</pubDate>
            <atom:updated>2024-09-20T11:26:58.141Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Comprehensive Introduction to Git &amp; GitHub — Part 2/4: Leveling Up with Diffing, Stashing, and Undoing Changes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xOJv0IUXLovPyp3ktE_laA.jpeg" /><figcaption>Git undoing changes</figcaption></figure><p><strong>Introduction</strong><br>In the previous <a href="https://medium.com/@mina.samir93/a-comprehensive-introduction-to-git-github-part-1-4-core-git-features-0e95a5014e46?source=user_profile---------0----------------------------"><strong>article</strong></a>, we covered the basics of Git, including how to initialize a repository, commit changes, and work with branches. Now that you’ve established a strong foundation, it’s time to move to the next level. In this article, we’ll explore some advanced features that will help you manage your code more efficiently, especially when dealing with changes in your project.</p><p>By the end of this article, you’ll understand:</p><ul><li>How to compare changes between commits and working directories using git diff.</li><li>How to temporarily set changes aside with git stash.</li><li>How to checkout previous commit using git checkout .</li><li>How to undo mistakes with commands like git reset, git restore, and git revert.</li></ul><h3>1. Diffing: Comparing Changes</h3><p>One of the core strengths of Git is its ability to track changes over time. The git diff command allows you to compare different states of your project, making it easier to see what’s been modified, added, or removed between commits, branches, or in your working directory.</p><h4>Comparing Working Directory and Staged Changes</h4><p>If you’ve made changes to your files but haven’t staged them yet, you can compare the current working directory with the last commit using:</p><pre>git diff</pre><p>This will show the differences between the working directory and the last commit.</p><h4>Comparing Staged Changes</h4><p>Once you’ve staged changes, you can compare them to the last commit using:</p><pre>git diff --staged</pre><p>This shows the differences between the staged files and the last committed version, helping you review what you’re about to commit.</p><h4>Comparing Between Commits</h4><p>If you want to compare two specific commits, you can pass their commit hashes to git diff:</p><pre>git diff &lt;commit1&gt;..&lt;commit2&gt;</pre><p>This allows you to see the exact changes between any two points in your project’s history.</p><h4><strong>Diffing Between Branches</strong></h4><p>You can also compare the differences between two branches. This is useful when you want to review the changes that exist in one branch but not in another:</p><pre>git diff &lt;branch1&gt;..&lt;branch2&gt;</pre><p>This command highlights the differences between the specified branches, which is helpful before merging.</p><p>By mastering git diff, you gain better visibility into how your code evolves.</p><h3>2. Stashing: Shelving Changes for Later</h3><p>Sometimes, while working on one feature, you might need to switch tasks or fix an urgent bug. If your work isn’t ready to commit, you can use git stash to temporarily set aside your changes and return to a clean working state.</p><h4>Stashing Your Work</h4><p>To save your uncommitted changes and revert to the last commit, use:</p><pre>git stash</pre><p>This command creates a “stash” of your changes and resets the working directory to the state of the last commit. It allows you to come back to your saved work at a later time without committing half-finished work.</p><h4>Reapplying and Removing Stashed Changes with git stash pop</h4><p>When you’re ready to resume working on your stashed changes, you can retrieve the latest stash and remove it in one go by running:</p><pre>git stash pop</pre><p>This command applies the most recent stash and removes it from the stash list, saving you an extra step. If you have multiple stashes, you can refer to a specific one by its identifier.</p><h4>Managing Multiple Stashes</h4><p>Git allows you to store multiple stashes. You can view all the stashes you’ve created with:</p><pre>git stash list</pre><p>Each stash is assigned an identifier (e.g., stash@{0}, stash@{1}), which you can use to apply or drop specific stashes.</p><h4>Applying Stashes</h4><p>If you don’t want to delete the stash after applying it, you can use:</p><pre>git stash apply</pre><p>This will apply the stash but keep it in the list, so it’s available for future use.</p><h4>Dropping Stashes</h4><p>Once you no longer need a stash, you can delete it with:</p><pre>git stash drop stash@{1}</pre><p>This removes the specific stash from your list.</p><h4>Stashing with Untracked Files</h4><p>By default, git stash only stashes tracked files. If you want to include untracked (new) files in your stash, use:</p><pre>git stash -u</pre><h4>Clearing All Stashes</h4><p>If you want to delete all stashes in one go, you can use:</p><pre>git stash clear</pre><p>This completely removes all stored stashes, freeing up space and preventing clutter in your stash list.</p><p>Stashing is a powerful way to temporarily set aside work without committing half-done code, allowing you to switch between tasks smoothly.</p><h3>3. Time Travelling and Undoing Changes: Checkout, Restore, Reset and Revert</h3><p>One of Git’s most valuable features is its ability to “time travel” through your project’s history. This lets you inspect, test, or revert to previous states of your codebase. Git also offers various ways to undo mistakes, whether you need to reset commits, unstage changes, or restore files.</p><h4>Time Traveling with git checkout and the Detached HEAD</h4><p>Git allows you to move to any commit in your project’s history with git checkout. This is particularly useful for exploring or testing older versions of your code. However, when you checkout a commit that isn’t the tip of a branch, you enter what’s called a <strong>detached HEAD</strong> state.</p><p><strong>Switching to a Previous Commit</strong></p><p>To navigate to a previous commit and explore the state of the project at that point, use:</p><pre>git checkout &lt;commit-hash&gt;</pre><p>This moves your HEAD to a specific commit, allowing you to inspect the code at that moment in time.</p><p>However, since you are not on an active branch, you are now in the detached HEAD state. If you make changes and commit them while in this state, these changes won’t be attached to any branch unless you explicitly create a new branch.</p><p><strong>Detached HEAD Warning</strong></p><p>Git will issue a warning when you are in a detached HEAD state. If you want to save changes made in this state, you should create a new branch:</p><pre>git branch &lt;new-branch-name&gt;</pre><pre>git switch &lt;new-branch-name&gt;</pre><p>This will preserve your changes by attaching them to a new branch.</p><p><strong>Returning to the Main Branch</strong></p><p>Once you’re done exploring or testing previous commits, you can return to the main working state by switching back to your branch:</p><pre>git switch main</pre><p>This moves you back to the latest commit in the main branch and exits the detached HEAD state.</p><h4>Discarding Local Changes with git restore</h4><p>If you’ve made changes to a file but want to discard them and revert it back to the last commit, use:</p><pre>git restore &lt;file-name&gt;</pre><p>This will discard any local modifications, leaving the file in its last committed state.</p><h4>Unstaging Changes with git restore</h4><p>If you’ve staged changes but want to unstage them (i.e., move them back to the working directory), you can use:</p><pre>git restore --staged &lt;file-name&gt;</pre><p>This command will unstage the file, leaving the changes in the working directory for further modifications or discarding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*i4bnruhyt092XjNIJp1RDQ.jpeg" /><figcaption>Reset vs. Revert</figcaption></figure><h4>Resetting to a Previous Commit with git reset</h4><p>Sometimes, you need to undo commits and go back to a previous state. The git reset command allows you to move the HEAD pointer back to a previous commit, adjusting your working directory accordingly.</p><ul><li><strong>Soft Reset</strong>: Moves the HEAD pointer to a previous commit, but keeps changes in the working directory for you to re-stage or modify:</li></ul><pre>git reset --soft &lt;commit-hash&gt;</pre><ul><li><strong>Hard Reset</strong>: Completely resets the working directory and commit history, removing all changes:</li></ul><pre>git reset --hard &lt;commit-hash&gt;</pre><p>Be careful with this command, as it permanently removes changes.</p><h4>Reverting Commits with git revert</h4><p>Unlike git reset, which moves the HEAD pointer and can alter history, git revert creates a new commit that undoes the changes of a previous commit. It’s a safe way to undo changes while preserving the project history.</p><p>To revert a specific commit, use:</p><pre>git revert &lt;commit-hash&gt;</pre><p>This creates a new commit that negates the changes made in the specified commit. It’s useful when you need to undo changes that have already been shared with others, as it maintains a clear history of the project’s evolution.</p><h4>Amending Commits</h4><p>If you’ve already made a commit but want to tweak the commit message or add more changes, you can use:</p><pre>git commit --amend</pre><p>This allows you to edit the last commit without creating a new one.</p><h3>Conclusion</h3><p>In this article, we explored advanced Git features like comparing changes using git diff, shelving work with git stash (including applying, popping, and clearing stashes), and undoing or modifying commits with git reset, git revert, git restore, and git checkout. These tools provide you with more flexibility and control in managing your codebase, especially as your project grows in complexity.</p><p>In the next article, we’ll dive into how GitHub facilitates collaboration in development, covering topics like fetching, pulling, resolving conflicts, and managing workflows. Stay tuned as we continue deepening your Git knowledge!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6846d119a621" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Comprehensive Introduction to Git & GitHub —  Part 1/4: Core git features.]]></title>
            <link>https://medium.com/@mina.samir93/a-comprehensive-introduction-to-git-github-part-1-4-core-git-features-0e95a5014e46?source=rss-3772d4bbc561------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e95a5014e46</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Mina Samir]]></dc:creator>
            <pubDate>Wed, 18 Sep 2024 13:22:32 GMT</pubDate>
            <atom:updated>2024-09-18T13:22:32.742Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Comprehensive Introduction to Git &amp; GitHub — Part 1/4: Core git features.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*JD846dt26_bXC-A1U1bRLQ.png" /><figcaption>Git architecture</figcaption></figure><p><strong>Introduction</strong><br>Git is one of the most powerful tools for managing code changes, offering developers full control over their projects. However, understanding how to use Git effectively requires more than just a quick overview. This article aims to give you a deep understanding of Git’s core features, all of which operate locally on your machine. By mastering these basics, you’ll build a strong foundation to manage code, experiment with new ideas, and track your development history.</p><p>By the end of this article, you’ll understand:</p><ul><li>How Git works and why it’s important.</li><li>How to install Git and set it up on your machine.</li><li>The fundamental Git operations like committing, branching, and merging, all done locally.</li></ul><p>Let’s dive into the core of Git and build your foundation step by step!</p><h3>What is Git?</h3><p>Git is a distributed version control system that helps you track changes in your code. Unlike centralized systems, Git operates entirely on your local machine by default. It allows you to keep a history of your work, create isolated branches for new features, and combine changes in a controlled manner.</p><p>Everything you do with Git can be done locally — there’s no need for an internet connection or external server unless you want to collaborate with others (which will be covered in later articles).</p><h3>The Architecture of Git</h3><p>Before diving into the commands, it’s important to understand the architecture of Git and how it manages your project files. Git has three main areas where it tracks changes:</p><ul><li><strong>Working Directory</strong>: This is where your project files live. Any changes you make to your files happen in the working directory.</li><li><strong>Staging Area (Index)</strong>: Before committing changes, they need to be staged. The staging area holds a snapshot of the changes you intend to commit, allowing you to include only certain modifications.</li><li><strong>Repository (Repo)</strong>: Once changes are staged and committed, they are saved in the local repository. This is where Git stores the history of your project, keeping track of every commit you’ve made.</li></ul><p>Understanding these areas will help you grasp how Git tracks your project files at every stage of development.</p><h3>Installation &amp; Setup</h3><p>Before using Git, you need to install it on your system. Here’s how to get started based on your operating system:</p><h4>Installing Git</h4><ul><li><strong>Windows</strong>: Download Git from the <a href="https://git-scm.com/">official site</a> and follow the installation instructions.</li><li><strong>MacOS</strong>: Use Homebrew by running brew install git.</li><li><strong>Linux</strong>: Install Git using your package manager, e.g., for Ubuntu:</li></ul><pre>sudo apt install git</pre><h4>Initial Setup</h4><p>Once installed, you’ll want to configure Git with your identity, which is used to tag your commits:</p><pre>git config --global user.name &quot;Your Name&quot;<br>git config --global user.email &quot;you@example.com&quot;</pre><p>This step ensures that your commits are linked to your identity.</p><h3>Creating a Repository</h3><p>To begin tracking changes in a project, you need to create a Git repository locally. This is done by running the following command in your project directory:</p><pre>git init</pre><p>This initializes an empty Git repository in the current folder. From now on, Git will start tracking changes made to the files in this directory.</p><h3>Tracking Changes and Committing</h3><p>With Git, you can track the changes in your project, commit those changes, and keep a record of your development history.</p><h4>Checking the Status</h4><p>Before committing any changes, it’s useful to check what has been modified. This is done with:</p><pre>git status</pre><p>Git will show you which files have been modified, which are staged for commit, and which are untracked (new files that aren’t yet being tracked by Git).</p><h4>Staging Changes</h4><p>Before committing, you need to stage changes. This tells Git which modifications should be included in the next commit. To stage a file, use:</p><pre>git add &lt;file-name&gt;</pre><p>To stage all changes in the current directory, use:</p><pre>git add .</pre><h4>Committing Changes</h4><p>After staging your changes, you can commit them. This means recording the changes in the repository’s history. Each commit should include a message describing the change:</p><pre>git commit -m &quot;Your descriptive commit message&quot;</pre><p>This action creates a local snapshot of your project at that moment.</p><h3>Viewing Commit History</h3><p>Git allows you to view the history of all commits, providing insights into what has been changed, when, and by whom. One of the most commonly used commands for this is git log.</p><h4>Basic git log</h4><p>To view the full commit history, you can use:</p><pre>git log</pre><p>This displays a detailed list of commits, showing the author, date, and commit message for each one.</p><h4>Compact View with --oneline</h4><p>If you want a more concise view of the commit history, you can use the --oneline option:</p><pre>git log --oneline</pre><p>This will show each commit in a single line, including the commit hash and the message.</p><h4>View Commits for a Specific File</h4><p>To see the commit history for a specific file, you can specify the file name:</p><pre>git log &lt;file-name&gt;</pre><p>This will filter the log to show only the commits that modified the given file.</p><p>With these options, you can adjust how much detail you want to see when reviewing your commit history.</p><h3>Working with Branches</h3><p>Branches allow you to work on new features or experiments without affecting the main part of your project. Git makes branching easy and flexible.</p><h4>Creating a Branch</h4><p>To create a new branch, run:</p><pre>git branch &lt;branch-name&gt;</pre><p>This creates a separate line of development in your project. You can switch between branches without losing work.</p><h4>Switching Branches</h4><p>To switch to an existing branch, use:</p><pre>git switch &lt;branch-name&gt;</pre><p>This will change your working directory to reflect the files and changes in that branch.</p><h4>Viewing Branches</h4><p>You can list all available branches in your project with:</p><pre>git branch</pre><h3>Merging Branches</h3><p>When you’re done working on a branch, you may want to merge it back into the main branch. Merging allows you to bring changes from one branch into another.</p><h4>Performing a Merge</h4><p>First, switch back to the main branch (often called main or master):</p><pre>git switch  main</pre><p>Then merge your feature branch into it:</p><pre>git merge &lt;branch-name&gt;</pre><p>Git will combine the changes from your branch into the main branch.</p><h4>Handling Merge Conflicts</h4><p>Sometimes, when Git tries to merge branches, it encounters conflicting changes that it can’t resolve automatically. This is called a merge conflict. When this happens, Git will show you the conflicting files, and you’ll need to manually edit them to resolve the conflict.</p><p>After resolving the conflicts, you need to stage the resolved files:</p><pre>git add &lt;file-name&gt;</pre><p>Then commit the merge:</p><pre>git commit -m &quot;Resolved merge conflicts&quot;</pre><h3>Conclusion</h3><p>Git is a powerful tool for version control, and mastering its core features will give you the confidence to manage your projects more effectively. In this article, we explored Git’s foundational concepts: initializing a repository, tracking changes, committing, and working with branches and merges — all performed locally on your machine. By understanding these basics, you’re well on your way to mastering version control.</p><p>In the next article, we’ll dive deeper into Git’s more advanced features, such as diffing, stashing, and undoing changes, to give you even more control over your code and workflow. Stay tuned as we build on this solid foundation!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e95a5014e46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps vs. SRE vs. Platform Engineer: Understanding the Key Differences]]></title>
            <link>https://medium.com/@mina.samir93/devops-vs-sre-vs-platform-engineer-understanding-the-key-differences-9d5307b3872e?source=rss-3772d4bbc561------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d5307b3872e</guid>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Mina Samir]]></dc:creator>
            <pubDate>Mon, 16 Sep 2024 10:24:21 GMT</pubDate>
            <atom:updated>2024-09-16T10:34:36.811Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*T31-i41GSfT07ru1vtzluw.png" /><figcaption>SRE vs. Platform engineer vs. DevOps</figcaption></figure><p>Lately, you may have noticed new roles emerging within DevOps teams, and some are often used interchangeably. This can be confusing, especially for juniors who are trying to navigate their career paths.</p><p>In this article, I will try to distinguish between the three roles in simple terms, providing a clear understanding of each one’s goals, responsibilities, and tools used in the role.</p><h4>DevOps Engineer</h4><p><strong>Responsabilites</strong></p><ul><li>Automate software development, testing, and deployment processes (CI/CD).</li><li>Work with development teams to ensure the code is production-ready.</li><li>Manage infrastructure using Infrastructure as Code (IaC) tools like Terraform or Ansible.</li><li>Monitor and maintain the health of production environments.</li></ul><p><strong>Tools</strong>: CI/CD (Jenkins, GitHub Actions, Circle CI), Docker, Kubernetes, Terraform, Ansible, Git.</p><h3>Platform engineer</h3><p><strong>Goal</strong>: Make it easier for developers to deploy and run applications by creating a <strong>stable, self-service platform</strong>.</p><p><strong>Responsabilities:</strong></p><ul><li>Develop and manage the internal developer platform (cloud infrastructure, automation, CI/CD systems).</li><li>Focus on the design and architecture of the platform to ensure it meets the needs of developers and the business.</li><li>Provide self-service capabilities to developers so they can deploy their code easily.</li><li>Ensure scalability, security, and maintainability of the platform.</li></ul><p><strong>Tools: </strong>Cloud providers (AWS, Azure, GCP), Docker, Kubernetes, observability tools (Prometheus, Grafana).</p><h3>Site Reliability Engineer (SRE)</h3><p><strong>Goal</strong>: Balance service reliability with the speed of delivery, using automation and engineering solutions to minimize human intervention.</p><p><strong>Responsabilites:</strong></p><ul><li>Monitor and improve the reliability and availability of systems.</li><li>Manage incidents and outages, perform root cause analysis, and develop strategies to avoid future incidents.</li><li>Automate operational tasks (such as incident response, scaling).</li><li>Continuously improve performance and stability through automation and engineering.</li></ul><p><strong>Tools: </strong>Promotheus, Grafana, SLO/SLA monitoring tools.</p><p><strong>Conclusion</strong></p><p>All three roles share a similar foundation and may overlap in some tasks. Some companies have only a DevOps team handling all responsibilities, while others may use one of these terms with broader roles.</p><p>My advice: always read the job responsibilities clearly and make sure to understand the job description before applying. Don’t dismiss a job solely based on its title!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d5307b3872e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Multiple GitHub Accounts on the Same Machine]]></title>
            <link>https://medium.com/@mina.samir93/using-multiple-github-accounts-on-the-same-machine-40edc392cb70?source=rss-3772d4bbc561------2</link>
            <guid isPermaLink="false">https://medium.com/p/40edc392cb70</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Mina Samir]]></dc:creator>
            <pubDate>Sat, 07 Sep 2024 12:18:29 GMT</pubDate>
            <atom:updated>2024-09-07T12:18:29.473Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*15qeXbz-5S-cCRA1qawYRw.jpeg" /></figure><p>Many of us encounter situations where we need to use both personal and work GitHub accounts on the same machine. I’ve seen many developers struggle to configure this setup and switch smoothly between accounts.</p><p>In this article, we’ll walk through the steps to configure multiple GitHub accounts using SSH.</p><h4>1- Generate two SSH keys:</h4><ul><li>Open the terminal and generate SSH keys using the following commands:</li></ul><pre>ssh-keygen -C &quot;personal.email@example.com&quot;<br>ssh-keygen -C &quot;work.email@example.com&quot;</pre><ul><li>Make sure to choose meaningful and distinct names for the files. Each command will generate a public and private key pair. At this point, you should have four files that look like this:</li></ul><pre>personal<br>personal.pub<br>work<br>work.pub</pre><h4>2- Add the SSH Keys to Your GitHub Accounts:</h4><ul><li>Open your <strong>personal GitHub account</strong>.</li><li>Go to <strong>Settings</strong> → <strong>SSH and GPG keys</strong> (as shown in the image below).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V-YlLi5pGea9a2uGfwV7DA.png" /></figure><ul><li>Choose <strong>New SSH key</strong>, enter a title, copy the content from personal.pub, and paste it into the key dialog. Then, press <strong>Add SSH key </strong>(as shown in the image below).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PLM77UL4PBxc5RwvUsTsJw.png" /></figure><ul><li>Repeat the same steps for your <strong>work GitHub account</strong> using the work.pub key.</li></ul><h4>3- Create a Config File in the .ssh Folder:</h4><ul><li>Next, create a config file in the .ssh folder and add the following content:</li></ul><pre>Host github.com-personal<br>  HostName github.com<br>  User git<br>  IdentityFile ~/.ssh/github-personal<br>Host github.com-work<br>  HostName github.com<br>  User git<br>  IdentityFile ~/.ssh/github-work</pre><ul><li>Be sure to replace the Host and IdentityFile values with the corresponding SSH keys for your personal and work accounts.</li></ul><h4>4- Clone Repositories:</h4><p>When cloning repositories, use the configured aliases as shown below:</p><pre># Clone a work repository<br>git clone git@github.com-work/work-repo.git<br><br># Clone a personal repository<br>git clone git@github.com-personal/personal-repo.git</pre><p><strong>Conclusion:</strong></p><p>By following these steps, you can manage both personal and work GitHub accounts on the same machine, keeping a clean separation between your projects.</p><p>I hope you found this guide helpful! Follow me for more content like this! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40edc392cb70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering the Power of the ‘find’ Command: The Ultimate Linux Guide]]></title>
            <link>https://medium.com/@mina.samir93/mastering-the-power-of-the-find-command-the-ultimate-linux-guide-48f18edbd595?source=rss-3772d4bbc561------2</link>
            <guid isPermaLink="false">https://medium.com/p/48f18edbd595</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[shell]]></category>
            <dc:creator><![CDATA[Mina Samir]]></dc:creator>
            <pubDate>Wed, 04 Sep 2024 14:14:26 GMT</pubDate>
            <atom:updated>2024-09-04T14:17:18.525Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BCDnevKg-6zNeE6MtSh3lg.png" /></figure><p>No matter why you use Linux, you’ll inevitably need to search for and locate files — whether by name, size, type, or even permissions. This task can be challenging for some Linux users.</p><p>In this guide, we’ll explore the powerful “find” command along with its various options.</p><p>Basic syntax of the find command:</p><pre>find [path] [options] [search_term]</pre><ul><li><strong>path</strong>: The starting directory for the search.</li><li><strong>options</strong>: Additional options to refine the search.</li><li><strong>search_term</strong>: Criteria to filter the search results.</li></ul><p>Example: find /path -name “file.txt”</p><h4>Important options for the find command:</h4><p>The find command offers powerful options to narrow down your search. Let’s take a look at some of the most important ones:</p><pre>-name -&gt; Search for a file with a specific name or pattern.<br>-type -&gt; Search for the type of the file (e.g., f for a regular file, d for a directory, l for a symbolic link).<br>-size -&gt; Search for files based on size (+size finds larger files, and -size finds smaller files).<br>-user -&gt; Search for files that belong to a specific user.<br>-group -&gt; Search for files that belong to a specific group.<br>-perm -&gt; Search for files with specific permissions.<br>-iname -&gt; Search for files, ignoring case sensitivity.<br>-regex -&gt; Search using a regular expression.<br>-mindepth -&gt; Search with a minimum level of depth from the starting path.<br>-maxdepth -&gt; Search with a maximum level of depth from the starting path.<br>-mtime -&gt; Search for files modified within the last n days.<br>-empty -&gt; Search for empty files.<br>-delete -&gt; Delete the matched files.<br>-exec command{} \; -&gt; Execute a command on each file found.<br></pre><p>The find command also supports logical operators to combine different search criteria. For example, to find all .txt files with permission 775 or user owner &quot;student&quot;, you can use this command:</p><pre>find (-perm 775 or -user student) -name &quot;*.txt&quot;</pre><h4>Examples:</h4><ul><li>Find all empty directores:</li></ul><pre>find / -type d -empty</pre><ul><li>Find all files larger than 10MB and delete them:</li></ul><pre>find / -size +10MB -exec rm -f {}\;</pre><ul><li>Find all files modified in the last 7 days:</li></ul><pre>find / -mtime 7</pre><p>In conclusion, the find command is one of the most powerful tools in Linux that you should have in your toolkit. If you enjoyed this content, please follow me and stay tuned for more articles! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48f18edbd595" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS practice lab: Lambda function to create OpenSearch snapshot for a private domain to S3 bucket]]></title>
            <link>https://medium.com/@mina.samir93/aws-practice-lab-lambda-function-to-create-opensearch-snapshot-for-a-private-domain-to-s3-bucket-fdc3c770c485?source=rss-3772d4bbc561------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdc3c770c485</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Mina Samir]]></dc:creator>
            <pubDate>Mon, 02 Sep 2024 13:05:19 GMT</pubDate>
            <atom:updated>2024-09-02T13:44:32.832Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="AWS Lambda fucntion to snapshot private opensearch domain to S3 bucket" src="https://cdn-images-1.medium.com/max/728/1*UGM-mEsE0aAI3Y9Sv6k_-Q.png" /></figure><p>In this lab, We have a private OpenSearch domain (that resides in a VPC). We want to create a lambda function to make a snapshot and stores it in a S3 bucket.</p><p>The tricky part in this lab is the security part. We want to allow the Lambda function to access the VPC, OpenSearch domain, S3.</p><p>We will use IAM role and Lambda VPC configuration to achieve this.</p><p><strong>Prerequisites:</strong></p><p>1- AWS acount: Ensure you have an AWS account with appropriate permissions.</p><p>2- OpenSearch domain: An OpenSearch domain must be set up and configures (inside a VPC to be private).</p><p>3- S3 bucket: An s3 bucket must be created where the snapshots will be stored.</p><h3>Step 1: Set up the IAM role for the OpenSearch.</h3><p>In this step we want to set the role that allows the OpenSearch to access S3.</p><ul><li>Go to the IAM console and create new role.</li><li>Choose Custom trust policy.</li><li>Add these policies:</li></ul><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Action&quot;: [<br>                &quot;s3:ListBucket&quot;<br>            ],<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Resource&quot;: [<br>                &quot;arn:aws:s3:::s3-bucket&quot;<br>            ]<br>        },<br>        {<br>            &quot;Action&quot;: [<br>                &quot;s3:GetObject&quot;,<br>                &quot;s3:PutObject&quot;,<br>                &quot;s3:DeleteObject&quot;<br>            ],<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Resource&quot;: [<br>                &quot;arn:aws:s3:::s3-bucket&quot;<br>            ]<br>        }<br>    ]<br>}</pre><h3>Step 2: Set up the IAM role for the Lambda.</h3><p>In this step we want to allow the lambda function to access OpenSearch, its VPC and give it passRole action.</p><ul><li>Go to the IAM console and create new role.</li><li>Choose Lambda as the service that will use this role.</li><li>Attach the following policies to the role:</li></ul><blockquote><strong>AmazonOpenSearchServiceFullAccess</strong>: Allows the Lambda function to interact with OpenSearch.</blockquote><blockquote><strong>AWSLambdaVPCAccessExecutionRole</strong>: Allows Lambda to access resources within a VPC.</blockquote><p>And add this inline policy:</p><pre>{<br> &quot;Sid&quot;: &quot;&quot;,<br> &quot;Effect&quot;: &quot;Allow&quot;,<br> &quot;Action&quot;: [<br> &quot;iam:PassRole&quot;<br> ],<br> &quot;Resource&quot;: &quot;arn:aws:iam::created-role-in-step1&quot;<br> }</pre><ul><li>Ensure the trust relationship in the role allows Lambda to assume this role.</li></ul><h3>Step 3: Create a lambda function</h3><ul><li>Go to Lambda function console and create new function.</li><li>Choose “Author from Scratch”.</li><li>Enter the function name, choose runtime Node.js 20.x .</li><li>In permissions, choose use an existing role and choose the created role in step 2.</li><li>Enter the below code and make sure to add all dependencies (won’t go into details for this step).</li></ul><pre>const { defaultProvider } = require(&#39;@aws-sdk/credential-provider-node&#39;); // V3 SDK.<br>const { Client } = require(&#39;@opensearch-project/opensearch&#39;);<br>const { AwsSigv4Signer } = require(&#39;@opensearch-project/opensearch/aws&#39;);<br><br>const client = new Client({<br>    ...AwsSigv4Signer({<br>      region: &#39;us-east-1&#39;,<br>      service: &#39;es&#39;,  // &#39;aoss&#39; for OpenSearch Serverless<br>  <br>      // Example with AWS SDK V3:<br>      getCredentials: () =&gt; {<br>        // Any other method to acquire a new Credentials object can be used.<br>        const credentialsProvider = defaultProvider();<br>        return credentialsProvider();<br>      },<br>    }),<br>    node: &#39;domain_url&#39;, // OpenSearch domain URL<br>  });<br><br><br>exports.handler = async event =&gt; {<br>    const region = process.env.REGION;<br>    const bucket = process.env.BUCKET;<br>    const role = process.env.ROLE;<br>    console.log(&quot;Region&quot;, region);<br>    console.log(&quot;Bucket&quot;, bucket);<br>    console.log(&quot;Role&quot;, role);<br><br>    const settings = {bucket, role_arn: role}<br>    console.log(&#39;START: Ensuring S3 Repository&#39;, settings);<br>    const repositoryResponse = await client.snapshot.createRepository({repository: bucket, body: {settings, type: &quot;s3&quot;}})<br>    console.log(&#39;SUCCESS: Ensuring S3 Repository&#39;, repositoryResponse);<br>   <br>    const indices = event.indices;<br>    const snapshotSettings = {body:{indices}, repository: bucket, snapshot: &quot;snapshot4&quot;};<br>    console.log(&#39;START: Snapshot&#39;, snapshotSettings);<br>    const snapshotRepsonse = await client.snapshot.create(snapshotSettings);<br>    console.log(&#39;SUCCESS: Snapshot&#39;, snapshotRepsonse);<br>};</pre><h3><strong>Step 4: Create VPC configuration and security group for the lambda function.</strong></h3><p>We should allow the lambda function to access the VPC of the OpenSearch domain.</p><p>1- Create security group:</p><ul><li>create a security group for the lambda function (ex: lambda-opensearch-sg).</li><li>Allow outbound traffic to the OpenSearch domain on port 443 (HTTPS).</li><li>Ensure the OpenSearch security group allow inbound traffic for the lambda function security group.</li></ul><p>2- Configure the VPC conenction:</p><ul><li>In the lambda function console, choose configuration then form the side menu choose VPC and choose the OpenSearch VPC, subnets and the created security group as shown in the image below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MDvL97ucDOaa9KkmFgVxWA.png" /></figure><h3>Step 5: Test the function</h3><p><strong>1- Create a Test Event:</strong></p><ul><li>In the Lambda console, create a test event with a basic JSON payload containing the required indices.</li><li>Execute the Lambda function.</li></ul><p><strong>2- Verify Snapshot Creation:</strong></p><ul><li>Check the OpenSearch domain to ensure the snapshot was created.</li><li>Verify that the snapshot is stored in the specified S3 bucket.</li></ul><p><strong>Check the github repository for the lambda function code here: </strong><a href="https://github.com/Minasam/lambda-snapshot-private-opensearch-domain/tree/main">https://github.com/Minasam/lambda-snapshot-private-opensearch-domain/tree/main</a></p><h4>Follow me for more AWS and cloud labs and projects.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdc3c770c485" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>