<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ankur Sheel</title>
    <description>The latest articles on DEV Community by Ankur Sheel (@ankursheel).</description>
    <link>https://dev.to/ankursheel</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F14556%2Fcba88eb0-0671-44f9-a5ee-a7d52b212400.jpg</url>
      <title>DEV Community: Ankur Sheel</title>
      <link>https://dev.to/ankursheel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ankursheel"/>
    <language>en</language>
    <item>
      <title>Unity CI/CD Demystified: Part 1: One-Time Setup</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Mon, 25 Sep 2023 00:00:00 +0000</pubDate>
      <link>https://dev.to/ankursheel/unity-cicd-demystified-part-1-one-time-setup-47j</link>
      <guid>https://dev.to/ankursheel/unity-cicd-demystified-part-1-one-time-setup-47j</guid>
      <description>&lt;p&gt;Adding CI/CD to Unity projects is a game-changer, even if you're not a CI/CD enthusiast.&lt;/p&gt;

&lt;p&gt;In this series, I'll guide you through setting up a robust CI/CD pipeline for Unity projects using &lt;a href="https://github.com/features/actions"&gt;GitHub Actions&lt;/a&gt; and &lt;a href="https://game.ci/"&gt;GameCI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Part 1 of this series covers the essential one-time setup for a successful CI/CD pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preparing the Project
&lt;/h2&gt;

&lt;p&gt;To begin, let's ensure our project is ready for CI/CD. Follow these steps:&lt;/p&gt;

&lt;h3&gt;
  
  
  Update .gitignore
&lt;/h3&gt;

&lt;p&gt;Start by ignoring files generated by GameCI. Update the &lt;code&gt;.gitignore&lt;/code&gt; file with these lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/[Aa]rtifacts/  
/[Cc]odeCoverage/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Verify Packages
&lt;/h3&gt;

&lt;p&gt;Ensure that these entries are present in &lt;code&gt;packages/manifest.json&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;com.unity.2d.sprite&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;com.unity.inputsystem&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;com.unity.test-framework&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;com.unity.textmeshpro&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If any of these packages are missing, add them using the Unity Package Manager. Remember to commit the changes in &lt;code&gt;packages/manifest.json&lt;/code&gt; and &lt;code&gt;packages/package-lock.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is important because things might work in the editor but the build might fail because of missing packages.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Acquire an Activation File for GitHub Runners
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Note 1: This step can be skipped if you already have a generated .ulf file from a previous project.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note 2: The activation file uses machine identifiers, so we need to generate a license for GitHub runners.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a file named &lt;code&gt;.github/workflows/activation.yml&lt;/code&gt; and add the following workflow definition:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Acquire activation file  
on:  
  workflow_dispatch: {}  
jobs:  
  activation:  
    name: Request manual activation file 🔑  
    runs-on: ubuntu-latest  
    steps:  
      # Request manual activation file  
      - name: Unity - Request Activation File  
        id: getManualLicenseFile  
        uses: game-ci/unity-request-activation-file@v2.0.0  
      # Upload artifact (Unity_v20XX.X.XXXX.alf)  
      - name: Expose as artifact  
        uses: actions/upload-artifact@v3
        with:  
          name: ${{ steps.getManualLicenseFile.outputs.filePath }}  
          path: ${{ steps.getManualLicenseFile.outputs.filePath }}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this workflow, we use GameCI to request the activation file and then upload it as an artifact. The workflow_dispatch event enables manual triggering of this workflow.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Manually run the above workflow &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TL4M0Css--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.ankursheel.com/assets/images/posts/unity-cicd-one-time-setup/run-workflow.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TL4M0Css--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.ankursheel.com/assets/images/posts/unity-cicd-one-time-setup/run-workflow.png" alt="Run workflow manually" width="800" height="225"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download the manual activation file that appears as an artifact and extract the .alf file from the zip &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KhspBXNF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.ankursheel.com/assets/images/posts/unity-cicd-one-time-setup/download-artifact.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KhspBXNF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.ankursheel.com/assets/images/posts/unity-cicd-one-time-setup/download-artifact.png" alt="Download Artifact" width="800" height="171"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Visit &lt;a href="https://license.unity3d.com/manual"&gt;license.unity3d.com&lt;/a&gt; and upload the &lt;em&gt;alf&lt;/em&gt; file. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VOAL6OKb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.ankursheel.com/assets/images/posts/unity-cicd-one-time-setup/upload-alf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VOAL6OKb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.ankursheel.com/assets/images/posts/unity-cicd-one-time-setup/upload-alf.png" alt="Upload Alf file.png" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Note: If you do not see the option for activating a "Unity Personal"license, follow the steps at &lt;a href="https://www.ankursheel.com/unity-personal-license-manual-activation-workaround"&gt;Workaround for Unity Personal License Manual Activation Not Supported&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download the &lt;em&gt;ulf&lt;/em&gt; file. &lt;em&gt;The numbers don't have to match the Unity version exactly.&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Setting up Secrets for Github Actions
&lt;/h2&gt;

&lt;p&gt;In the repository on Github, navigate to &lt;em&gt;Settings&lt;/em&gt; -&amp;gt; &lt;em&gt;Secrets and Variables&lt;/em&gt; -&amp;gt; &lt;em&gt;Actions&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ICxsZ9B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.ankursheel.com/assets/images/posts/unity-cicd-one-time-setup/repository-settings.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ICxsZ9B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.ankursheel.com/assets/images/posts/unity-cicd-one-time-setup/repository-settings.png" alt="Repository Settings" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create the following secrets&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;UNITY_EMAIL&lt;/strong&gt; : The email address used to log in to Unity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UNITY_LICENSE&lt;/strong&gt; : Paste the contents of the .ulf file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UNITY_PASSWORD&lt;/strong&gt; : The password used to log in to Unity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I prefer to add them as organization secrets because I want to reuse these across all the projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This one-time setup paves the way for a streamlined Unity CI/CD pipeline. Stay tuned for the next steps in our journey. Happy coding!!&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions"&gt;Workflow syntax&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch"&gt;Workflow dispatch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions"&gt;Using secrets in GitHub Actions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>unity3d</category>
      <category>programming</category>
      <category>githubactions</category>
    </item>
    <item>
      <title>Unlock your career's potential with effective 1:1 meetings</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Wed, 13 Sep 2023 00:00:00 +0000</pubDate>
      <link>https://dev.to/ankursheel/unlock-your-careers-potential-with-effective-11-meetings-49cd</link>
      <guid>https://dev.to/ankursheel/unlock-your-careers-potential-with-effective-11-meetings-49cd</guid>
      <description>&lt;p&gt;When it comes to professional growth, one question often looms large&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What should I discuss in my 1:1 meetings? I often have nothing beyond project updates.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is a common concern, and it's crucial to recognise that a 1:1 meeting is more than just a status update session. It's an opportunity to connect with your supervisor, discuss your progress, and express your thoughts and concerns.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Effectively Prepare for a 1:1
&lt;/h2&gt;

&lt;p&gt;Preparation is key to making the most of your 1:1 meetings. Not only does it demonstrate professionalism, but it also maximises the value of your time.&lt;/p&gt;

&lt;p&gt;Taking notes during(or just after) the 1:1 is pivotal for several reasons. It demonstrates active engagement, aids in retaining essential points, and serves as a reference for future discussions. You can easily look at your notes and if for example, you havent spoken about professional growth for a while, you can focus on those questions in the next 1:1.&lt;/p&gt;

&lt;p&gt;I like to have at least 3-5 prepared topics using the questions below as prompts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Review Previous Meeting
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Have I made any progress on the action items from the last 1:1?&lt;/li&gt;
&lt;li&gt;Are there any action items from the last 1:1 that I need to follow up with my supervisor?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Brief Project Updates
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Limit project updates to 1 or 2 minutes unless it's the primary focus. Remember, 1:1s aren't project status meetings.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is the project status on or off track?&lt;/li&gt;
&lt;li&gt;Are there any noteworthy highlights or progress updates (that were not already covered in standups or elsewhere)?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Share Wins
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;What were my key achievements since the last 1:1? &lt;em&gt;Highlight accomplishments that have moved me or the team forward.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;What went exceptionally well?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Identify Challenges
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Are there any decisions I can't make independently and require input?&lt;/li&gt;
&lt;li&gt;Are there current issues I want to see resolved in the coming months?&lt;/li&gt;
&lt;li&gt;Are there any interpersonal tensions with colleagues that I would like to address proactively?&lt;/li&gt;
&lt;li&gt;Are there aspects of team dynamics that concern me?&lt;/li&gt;
&lt;li&gt;What could have gone better?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Discuss Career Growth and Professional Development
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Share any feedback I have received from colleagues or clients.&lt;/li&gt;
&lt;li&gt;Are there any opportunities I am interested in?&lt;/li&gt;
&lt;li&gt;Am I happy with my current project?&lt;/li&gt;
&lt;li&gt;Do I feel like I’m learning? Are there things I feel like I’m not learning that I would like to?&lt;/li&gt;
&lt;li&gt;Request feedback on recent projects or tasks and inquire about areas for improvement. (&lt;em&gt;Note: It's often better to ask for feedback immediately after an event, as waiting until the 1:1 might be too late.)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Explore which skills I should focus on developing for my current role and future roles.&lt;/li&gt;
&lt;li&gt;Ask what I could do differently or what behaviours my supervisor doesn't appreciate.&lt;/li&gt;
&lt;li&gt;Inquire about anything I should start doing or stop doing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Flip the Conversation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Find out my supervisor's top priorities.&lt;/li&gt;
&lt;li&gt;Ask about any concerns or worries regarding the team.&lt;/li&gt;
&lt;li&gt;Explore how I can better support my supervisor.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Backup Questions
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Use this section only when there's nothing else to discuss, and there's time.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Share any interesting updates, lessons, or personal achievements.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Share Your 1:1 Experiences and Tips
&lt;/h2&gt;

&lt;p&gt;Navigating 1:1 meetings might seem daunting initially, but you'll soon become a pro with effective preparation, thoughtful questions, and diligent follow-ups. Remember, there's no such thing as a perfect 1:1 meeting.&lt;/p&gt;

&lt;p&gt;We're all on a learning journey, and your experiences and tips are invaluable. Have you discovered other effective ways to prepare for 1:1s? Are there additional questions that have proven helpful for you? How do you ensure you follow up on action items?&lt;/p&gt;

&lt;p&gt;Share your experiences and insights in the comments below. Your wisdom could be just what I or another reader needs to excel in their 1:1 meetings!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Cleaning Up Unnecessary Remote-Tracking References</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Fri, 01 Sep 2023 00:00:00 +0000</pubDate>
      <link>https://dev.to/ankursheel/cleaning-up-unnecessary-remote-tracking-references-26b1</link>
      <guid>https://dev.to/ankursheel/cleaning-up-unnecessary-remote-tracking-references-26b1</guid>
      <description>&lt;p&gt;If your work involves collaborating on a monolithic project with multiple teams, you might find yourself in a situation where you're tracking numerous branches. However, you might soon realise that most of these branches are unnecessary for your specific work. This situation can lead to an avoidable increase in the time you spend updating your project, especially if you're habitually using &lt;code&gt;git pull&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To streamline our Git workflow and save those precious seconds(or minutes), we should clean up those remote-tracking references.&lt;/p&gt;

&lt;h2&gt;
  
  
  Identifying the Branches to Keep
&lt;/h2&gt;

&lt;p&gt;Before we start removing stuff, we should identify the branches that we want to keep. Typically, these would include the_main (or master)_ branch and a few select branches we actively work on.&lt;/p&gt;

&lt;p&gt;To get their unique commit hashes, execute the following command, ensuring to replace &lt;strong&gt;&lt;em&gt;origin/main&lt;/em&gt;&lt;/strong&gt; , * *&lt;em&gt;origin/my-branch-1&lt;/em&gt;**, and &lt;strong&gt;&lt;em&gt;origin/my-branch-2&lt;/em&gt;&lt;/strong&gt; with the actual branch names.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git rev-parse &lt;span class="nt"&gt;--quiet&lt;/span&gt; origin/main origin/my-branch-1 origin/my-branch-2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: I’m assuming the &lt;strong&gt;origin&lt;/strong&gt; is the name of the upstream&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;git rev-parse&lt;/code&gt; command translates human-readable branch names into cryptic yet significant SHA-1 hashes, which are essentially commit identifiers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;--quiet&lt;/em&gt;&lt;/strong&gt; : Silence is golden, as this flag suppresses output unless there is an error.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When executed, the command will produce an output similar to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;3896d7ba4b5549e8a362bc5e300a0dd8082f9e94
3896d7ba4b5549e8a362bc5e300a0dd8082f9e94
64abe6831bf1cb04396d1df02dd7c2ad6d999ab3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are the commit hashes associated with the branches we wish to retain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cleaning Up Unnecessary Local References
&lt;/h2&gt;

&lt;p&gt;Now that we have the commit hashes, we can tidy up our local references to remote branches.&lt;/p&gt;

&lt;p&gt;This can be done by using a combination of 2 commands - &lt;code&gt;git branch&lt;/code&gt; and &lt;code&gt;xargs&lt;/code&gt;. &lt;code&gt;xargs&lt;/code&gt; is a command-line tool that helps build argument lists for other commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch -r \ 
--no-contains 3896d7ba4b5549e8a362bc5e300a0dd8082f9e94 \
--no-contains 3896d7ba4b5549e8a362bc5e300a0dd8082f9e94 \
--no-contains 64abe6831bf1cb04396d1df02dd7c2ad6d999ab3 \
| xargs -I{} git branch -rd "{}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's look at the options for the &lt;code&gt;git branch&lt;/code&gt; command&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;-r&lt;/em&gt;&lt;/strong&gt; : Lists the remote-tracking branches.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;--no-contains&lt;/em&gt;&lt;/strong&gt; : Filters the list of remote branches to include only branches that don't contain the specified commits (our identified hashes).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The output of this filtered list is then passed to &lt;strong&gt;&lt;em&gt;xargs&lt;/em&gt;&lt;/strong&gt;. &lt;strong&gt;&lt;em&gt;xargs&lt;/em&gt;&lt;/strong&gt; is a command that allows us to construct argument lists for other commands using input from standard input (stdin).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;-I{}&lt;/em&gt;&lt;/strong&gt; : This option tells &lt;code&gt;xargs&lt;/code&gt; to replace every occurrence of &lt;code&gt;{}&lt;/code&gt; with the input elements pulled from standard input (stdin).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;git branch -rd&lt;/em&gt;&lt;/strong&gt; : Deletes a remote branch.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;"{}"&lt;/em&gt;&lt;/strong&gt; : This is the placeholder, which gets replaced by the specific input item read from stdin.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Preventing this buildup in the future
&lt;/h2&gt;

&lt;p&gt;Instead of calling &lt;code&gt;git pull&lt;/code&gt;, use &lt;code&gt;git fetch&lt;/code&gt; and &lt;code&gt;git rebase&lt;/code&gt; instead.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git fetch origin main &lt;span class="nt"&gt;--prune&lt;/span&gt; &lt;span class="nt"&gt;--prune-tags&lt;/span&gt;
git rebase origin/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;--prune&lt;/em&gt;&lt;/strong&gt; : Before fetching, remove any remote-tracking references that no longer exist on the remote.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;--prune-tags&lt;/em&gt;&lt;/strong&gt; : Before fetching, remove any local tags that no longer exist on the remote if --prune is enabled.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Following these steps, we can declutter our Git workflow and keep only the relevant references.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/docs/git-branch"&gt;git branch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://man7.org/linux/man-pages/man1/xargs.1.html"&gt;xargs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/docs/git-fetch"&gt;git fetch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/docs/git-rebase"&gt;git rebase&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>Workaround for Unity Personal License Manual Activation Not Supported</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Sun, 20 Aug 2023 00:00:00 +0000</pubDate>
      <link>https://dev.to/ankursheel/workaround-for-unity-personal-license-manual-activation-not-supported-49j2</link>
      <guid>https://dev.to/ankursheel/workaround-for-unity-personal-license-manual-activation-not-supported-49j2</guid>
      <description>&lt;p&gt;You decided to add a CI/CD pipeline to your Unity Project using &lt;a href="https://game.ci/" rel="noopener noreferrer"&gt;GameCI&lt;/a&gt;. You are all pumped up and ready to start.&lt;/p&gt;

&lt;p&gt;What's the 1st step? Activating Unity! No biggie, right?&lt;/p&gt;

&lt;p&gt;Well, hold on a sec. You generate the &lt;strong&gt;&lt;em&gt;alf&lt;/em&gt;&lt;/strong&gt; file after creating the github action. You carry on with the list and head to &lt;a href="https://license.unity3d.com/manual" rel="noopener noreferrer"&gt;https://license.unity3d.com/manual&lt;/a&gt;, all set to create that &lt;strong&gt;&lt;em&gt;ulf&lt;/em&gt;&lt;/strong&gt; file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plot Twist
&lt;/h2&gt;

&lt;p&gt;But hold your horses because here comes the twist.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.ankursheel.com%2Fassets%2Fimages%2Fposts%2Funity-personal-license-manual-activation-workaround%2Fno_longer_supported.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.ankursheel.com%2Fassets%2Fimages%2Fposts%2Funity-personal-license-manual-activation-workaround%2Fno_longer_supported.png" alt="Unity no longer supports manual activation of Personal licenses"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unity dropped a bombshell: "Unity no longer supports manual activation of Personal licenses."&lt;/p&gt;

&lt;p&gt;Manual activation of Personal licenses? Nope, not happening anymore. Cue the dramatic music. 🎵&lt;/p&gt;

&lt;p&gt;But we are not giving up that easily. We disregard the message and upload the &lt;strong&gt;&lt;em&gt;alf&lt;/em&gt;&lt;/strong&gt; file.&lt;/p&gt;

&lt;p&gt;Something's fishy. The option to generate an ulf for a personal license? Poof, it's vanished. Instead, it asks us to type in a serial number.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.ankursheel.com%2Fassets%2Fimages%2Fposts%2Funity-personal-license-manual-activation-workaround%2Fserial_number.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.ankursheel.com%2Fassets%2Fimages%2Fposts%2Funity-personal-license-manual-activation-workaround%2Fserial_number.png" alt="Activate your license using serial number"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Time for a bit of trickery
&lt;/h2&gt;

&lt;p&gt;Right-click and inspect the serial number box&lt;/p&gt;

&lt;p&gt;Now, hunt down the &lt;code&gt;&amp;lt;div class="option option-personal clear" style="display: none;"&amp;gt;&lt;/code&gt; section&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.ankursheel.com%2Fassets%2Fimages%2Fposts%2Funity-personal-license-manual-activation-workaround%2Fhtml_source.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.ankursheel.com%2Fassets%2Fimages%2Fposts%2Funity-personal-license-manual-activation-workaround%2Fhtml_source.png" alt="Html Source"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Guess what? We're deleting that pesky &lt;code&gt;"display: none;"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Boom! Like magic, the Unity Personal Edition option reappears. 🎉&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.ankursheel.com%2Fassets%2Fimages%2Fposts%2Funity-personal-license-manual-activation-workaround%2Fpage_with_personal_license.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.ankursheel.com%2Fassets%2Fimages%2Fposts%2Funity-personal-license-manual-activation-workaround%2Fpage_with_personal_license.png" alt="Page With Personal License"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hopefully, before this hack stops working, GameCI will have an official workaround :)&lt;/p&gt;

&lt;h3&gt;
  
  
  Shoutout
&lt;/h3&gt;

&lt;p&gt;And here's a shoutout to &lt;a href="https://reallpepe.itch.io/defendron" rel="noopener noreferrer"&gt;realpepe&lt;/a&gt;, who cracked the code and shared the wisdom on Discord. Because in the world of tech, teamwork makes the magic happen.&lt;/p&gt;

</description>
      <category>unity3d</category>
    </item>
    <item>
      <title>Laid off: Reflections and Lessons learned</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Sat, 18 Mar 2023 05:43:48 +0000</pubDate>
      <link>https://dev.to/ankursheel/laid-off-reflections-and-lessons-learned-32k5</link>
      <guid>https://dev.to/ankursheel/laid-off-reflections-and-lessons-learned-32k5</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;I initially started writing to process my feelings about getting laid off. When I wrote this, I didn't know if I would ever publish it. I was inspired to clean it up and post it after reading &lt;a href="https://angelariggs.github.io/articles/thirty-five-days" rel="noopener noreferrer"&gt;The Future of Quality at Instrument was 35 Days Long&lt;/a&gt;. More importantly, some of my friends have been laid off recently, and after chatting with them, I thought this could be helpful to others. And enough time has passed that I am comfortable publishing this, even though there might still be repercussions.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Unfortunately, getting laid off can feel like a personal badge of failure. You might see an open-to-work badge on LinkedIn or hear about the new job someone is starting, but no one talks about their feelings after getting laid off, especially if they feel they were performing satisfactorily.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Far32a91mjhpc3bo0gcuc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Far32a91mjhpc3bo0gcuc.png" alt="A cartoon of a sad person with a cardboard box"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Having gone through layoffs multiple times, I can say it's been traumatic every time. Every time I felt like I was the only one struggling when I should be able to move on like the others. And to be honest, that's the face I showed in public every time.&lt;/p&gt;

&lt;p&gt;Given the current climate, I would like this post to make people feel less alone after getting laid off.&lt;/p&gt;

&lt;h2&gt;
  
  
  What would I change about my layoff experience
&lt;/h2&gt;

&lt;p&gt;There is no good time to announce layoffs. But getting laid off just before mid-year reviews was not ideal. I was also a few weeks away from vesting another 25% of my ESOPs, which made the timing worse.&lt;/p&gt;

&lt;p&gt;I was surprised that the company continued hiring till before the layoffs and did not explore an across-the-board reduction in pay or voluntary (temporary) quitting, like the last time they were in a similar situation.&lt;/p&gt;

&lt;p&gt;I wish, in this regard, they had been more like Apple (who, at the time of publishing) have not resorted to layoffs because &lt;a href="https://blog.pragmaticengineer.com/apple-job-cuts-tide/" rel="noopener noreferrer"&gt;they did not overhire&lt;/a&gt;. Moreover, &lt;a href="https://www.bbc.com/news/business-64258289" rel="noopener noreferrer"&gt;CEO Tim Cook took a pay cut of 40%&lt;/a&gt; to help weather the economic climate.&lt;/p&gt;

&lt;h3&gt;
  
  
  Relationships with co-workers
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;While you don't have to be everything to everyone in your network, it's human decency 101 to reach out to those you spent 40 hours a week with&lt;/p&gt;

&lt;p&gt;&lt;cite&gt;Scarlett McCarthy&lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This one hurt the most.&lt;/p&gt;

&lt;p&gt;It is ironic that when you quit of your own accord, you get a going away present, a card filled with thoughts on how you will be missed and maybe a speech or two extolling your value. You get an exit interview and a place to share your thoughts. Your wins are celebrated.&lt;/p&gt;

&lt;p&gt;But in the case of layoffs, all of that vanishes, and you feel like a social pariah.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Just because it's uncomfortable to have doesn't mean you should avoid it&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Some colleagues I thought would reach out didn't. On the flip side, some people I didn't expect reached out. I want to believe that it's not because the relationship did not matter but because it makes for an awkward conversation.&lt;/p&gt;

&lt;p&gt;I wish some more of my colleagues had asked how I was doing and if I wanted to catch up. Even some messages that made me feel I had a beneficial impact on them would have been appreciated. Anything I could take with me for the future would have made the experience less painful.&lt;/p&gt;

&lt;p&gt;If you are on the other side and know someone who has been laid off, don't be a stranger. Drop them an email or a slack message asking if they want to get together for a coffee. Even if they ignore you or say no, that's fine. Everyone deals with this differently. The important thing is that they will remember that you reached out to them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Thoughts about the reason for laying me off
&lt;/h3&gt;

&lt;p&gt;That I was on the hit list at this company was both surprising and not surprising. There were subtle and not-so-subtle hints that some people wanted me to leave.&lt;/p&gt;

&lt;p&gt;The official reason for disestablishing my role was that the company had too many backend engineers. I was "too senior" (whatever that means) and hence expensive to keep on. By letting me go, they could save more jobs.&lt;/p&gt;

&lt;p&gt;Although this might be true, it doesn't make sense to me for various reasons.&lt;/p&gt;

&lt;p&gt;If the company really wanted to keep me on, they could have allowed me to work in an area where they needed more engineers or explored the possibility of working reduced hours/pay. I have on multiple occasions shown that I can pick up new technologies relatively fast, so it would have been low risk. I had written a lot of the backend code. I also had a lot of historical context about some engineering decisions in the Product and Engineering team, so I could have easily continued to provide value.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It was the easiest way to silence what I think they saw as disruptive dissent&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Like other startups I have been a part of, I joined this one early in the company's life before the founders built the leadership team. From the beginning, I openly raised things I disagreed with or thought could be better.&lt;/p&gt;

&lt;p&gt;I feel that as new leaders joined the company, they became increasingly uncomfortable with my standing up for my principles. Leadership might have been threatened by my discussions in internal forums around things I felt were incorrect, as they probably felt called out. It's possible that disagreeing with mandatory in-office days, advocating for pay transparency etc., is what put the final nail in the coffin.&lt;/p&gt;

&lt;p&gt;Since I am not in a country with at-will employment and there was no issue with my performance, I feel that with the decision to announce layoffs, my detractors found an easy way to force me to leave.&lt;/p&gt;

&lt;h2&gt;
  
  
  It worked out in the end
&lt;/h2&gt;

&lt;p&gt;Everything worked out for me in the end.&lt;/p&gt;

&lt;p&gt;I got a month of severance. I also had many annual leaves left over, which got paid out. After I raised my concerns with the founders, they also vested the 25% of my options.&lt;/p&gt;

&lt;p&gt;I took a few days to process my feelings before starting the job hunt. Luckily, I landed a job almost immediately once I started looking but I took a month to unwind before starting the new position.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Previously, the time for getting a new job has varied from 1 to 6 months, so this was a pleasant surprise.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Nearly all the companies I had worked with previously, reached out to see if I wanted to come back. This was a great signal that I was doing something right when I was there. I had also been &lt;a href="https://www.ankursheel.com/blog/interview-happy-job" rel="noopener noreferrer"&gt;interviewing when I didn't need a job&lt;/a&gt;, so I could reinitiate talks with some of those companies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways from this experience
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Have a layoff fund, so you have some runway and can ensure the next job is not just a rebound.&lt;/li&gt;
&lt;li&gt;Every couple of months, update your resume, so you are not scrambling to remember what you did in case of an unplanned exit.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.ankursheel.com/blog/interview-happy-job" rel="noopener noreferrer"&gt;Keep interviewing even if you are happy in your job&lt;/a&gt; and keep a list of interesting companies. Ask and connect with the interviewers (you resonated with) on LinkedIn.&lt;/li&gt;
&lt;li&gt;Take some me-time. Give yourself time to process your feelings. This is one of the few times in your life when you get to be alone with your thoughts and can truly unwind. Every time I was laid off, it was a coincidence that I was about to go on a holiday. This enabled me to take a step back and recharge before taking a new job.&lt;/li&gt;
&lt;li&gt;A job search is a numbers game, so keep applying and don't take the rejection personally. Most importantly, don't stop applying till you sign an offer letter.&lt;/li&gt;
&lt;li&gt;The company might employ pressure tactics to get you to leave but do not yield. Either negotiate a severance or &lt;a href="https://twitter.com/GergelyOrosz/status/1620038048913444866" rel="noopener noreferrer"&gt;talk to a lawyer, or you will most likely get a horrible deal&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Finally, remember that you are more than your job title and organisation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;I am aware that I am privileged to be able to speak up more than others. I know the risks of speaking up. At all companies I have worked at, I have always chosen to stand up and speak out when I have felt the need to.&lt;/p&gt;

&lt;p&gt;In most companies, it has worked out well. In some others, not so much. Regardless of how it went for me, people have repeatedly told me they appreciated having someone ask questions and say what they were thinking but didn't feel safe saying.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you want someone else to tell you why this is a good thing, watch &lt;a href="https://www.youtube.com/watch?v=dGfcc4Np_Sc" rel="noopener noreferrer"&gt;Why your business needs dissenters by Andrew Millar&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The silver lining of all this is that it further shaped my perspective and has informed the &lt;a href="https://www.ankursheel.com/blog/interview-interviewers-must-have-deal-breaker-list" rel="noopener noreferrer"&gt;questions I'm asking companies during the interview process&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It's not the first time, and it won't be the last when people are fired/laid off as a silencing tactic. On an even more public scale, look at &lt;a href="https://ma.nu/blog/bye-twitter" rel="noopener noreferrer"&gt;what happened at Twitter after the takeover&lt;/a&gt; and &lt;a href="https://twitter.com/JannekeParrish/status/1449066853314224129" rel="noopener noreferrer"&gt;what happened at Apple in 2021&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you were recently laid off, please drop me a note. I might not be able to help, but I know how valuable it is to vent, and I'm happy to lend an ear.&lt;/p&gt;

&lt;p&gt;Something else you want to know? Ask in the comments.&lt;/p&gt;

</description>
      <category>career</category>
    </item>
    <item>
      <title>How To Disable Buttons In Unity</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Mon, 06 Feb 2023 00:00:00 +0000</pubDate>
      <link>https://dev.to/ankursheel/how-to-disable-buttons-in-unity-4b85</link>
      <guid>https://dev.to/ankursheel/how-to-disable-buttons-in-unity-4b85</guid>
      <description>&lt;p&gt;When working with Unity UI, there will be times when you will need to disable a button. Unity provides three ways to disable a UI Button, each of which can be used depending on the desired user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using enabled property
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;enabled&lt;/code&gt; property will make the button non-clickable, but it will not use the disabled colour.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;testButton.enabled = false;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will rarely want to use &lt;code&gt;enabled&lt;/code&gt; as it results in a confusing user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using interactable property
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;interactable&lt;/code&gt; property will make the button non-clickable and will set the disabled colour (which is grey by default).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;testButton.interactable = false;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In most cases, this is the option to use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using GameObject.SetActive
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;gameObject.SetActive&lt;/code&gt; will deactivate the button and hide it from the user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;testButton.gameObject.SetActive(false);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an excellent option if you want to change what button is showing based on some conditions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Using these methods, you can customize how the user will interact with the UI Button. It is crucial to understand how each of these methods works so that you can choose the best one for your project.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>How to change the author of multiple Git commits</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Fri, 08 Oct 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/ankursheel/how-to-change-the-author-of-multiple-git-commits-dkc</link>
      <guid>https://dev.to/ankursheel/how-to-change-the-author-of-multiple-git-commits-dkc</guid>
      <description>&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;I have two accounts from which I access my GitHub repository. I have set one of them as a global setting. On a per-repository basis, I override the default details with my other account. Sometimes, I forget to override the default values and realize it only after making a few commits.&lt;/p&gt;

&lt;p&gt;This post will show how we can update the author after making a few commits with incorrect details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;First, we need to update our gitconfig with the author details.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[user]
name = author_name
email = author_email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can run the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git rebase &lt;span class="nt"&gt;-i&lt;/span&gt; &amp;lt;commit_hash&amp;gt; &lt;span class="nt"&gt;-x&lt;/span&gt; &lt;span class="s2"&gt;"git commit --amend --reset-author -CHEAD"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;git rebase -i&lt;/strong&gt; : Runs git rebase in interactive mode, allowing altering individual commits in the process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;/strong&gt; : The hash of the commit after which we want to update the author.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;-x&lt;/strong&gt; : Append the shell command for each line creating a commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git commit —amend&lt;/strong&gt; : Modify the most recent commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;—reset-author&lt;/strong&gt; : Resets the author to the settings in the .gitconfig.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;-CHEAD&lt;/strong&gt; : -C takes the existing commit object and reuses the log message without allowing the user to edit it. HEAD refers to the current commit we are viewing. -CHEAD takes the message from the current commit without opening the editor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will then be presented with an editor to confirm all the commits we want.&lt;/p&gt;

&lt;p&gt;We can run the following command to update the author for all commits, including the root.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git rebase &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="nt"&gt;--root&lt;/span&gt; &lt;span class="nt"&gt;-x&lt;/span&gt; &lt;span class="s2"&gt;"git commit --amend --reset-author -CHEAD"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This will update the author details for all the specified commits.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/docs/git-commit"&gt;git-commit Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/docs/gitrevisions"&gt;gitrevisions Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/docs/git-rebase"&gt;git-rebase Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>snippet</category>
      <category>git</category>
    </item>
    <item>
      <title>How to Upload Multiple Files to AWS S3 using Terraform</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Tue, 14 Sep 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/ankursheel/how-to-upload-multiple-files-to-aws-s3-using-terraform-24bl</link>
      <guid>https://dev.to/ankursheel/how-to-upload-multiple-files-to-aws-s3-using-terraform-24bl</guid>
      <description>&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;I want to upload multiple files from a specific folder to an AWS S3 bucket.&lt;/p&gt;

&lt;h3&gt;
  
  
  Assumptions
&lt;/h3&gt;

&lt;p&gt;The S3 bucket name is &lt;strong&gt;test&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The directory structure is as follows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;documents
|- file_1
|- subdirectory1
| |- file_1_1
| |- file_1_2
| |- subdirectory2
| | |- file_1_2_1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We want to end up with the following S3 objects.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;s3://test/file_1&lt;/li&gt;
&lt;li&gt;s3://test/subdirectory1/file_1_1&lt;/li&gt;
&lt;li&gt;s3://test/subdirectory1/file_1_2&lt;/li&gt;
&lt;li&gt;s3://test/subdirectory1/subdirectory2/file_1_2_1&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_bucket_object"&lt;/span&gt; &lt;span class="s2"&gt;"test"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;for_each&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fileset&lt;/span&gt;&lt;span class="err"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"./documents/"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"**"&lt;/span&gt;&lt;span class="err"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;bucket&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"test"&lt;/span&gt;
  &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;each&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;
  &lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"./documents/${each.value}"&lt;/span&gt;
  &lt;span class="nx"&gt;etag&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;filemd5&lt;/span&gt;&lt;span class="err"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"./documents/${each.value}"&lt;/span&gt;&lt;span class="err"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Line 1&lt;/em&gt;:&lt;/strong&gt; : Create an S3 bucket object resource.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Line 2&lt;/em&gt;:&lt;/strong&gt; : Use a &lt;strong&gt;&lt;em&gt;for_each&lt;/em&gt;&lt;/strong&gt; argument to iterate over the documents returned by the &lt;strong&gt;&lt;em&gt;fileset&lt;/em&gt;&lt;/strong&gt; function. &lt;strong&gt;&lt;em&gt;for_each&lt;/em&gt;&lt;/strong&gt; identifies each instance of the resource by its S3 path, making it easy to add/remove files. The fileset function enumerates over a set of filenames for a given path. It uses &lt;strong&gt;&lt;em&gt;**&lt;/em&gt;&lt;/strong&gt; as the pattern for a recursive search.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Line 3&lt;/em&gt;:&lt;/strong&gt; : The name of the bucket to put the files in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Line 4&lt;/em&gt;:&lt;/strong&gt; : The object’s name once it’s in the bucket. In the example above, it is the same as the path.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Line 5&lt;/em&gt;:&lt;/strong&gt; : the Path to the file to be uploaded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Line 6&lt;/em&gt;:&lt;/strong&gt; : Triggers an update only if the file changes. The eTag of each object is an MD5 hash of that object.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_object"&gt;Resource: aws_s3_bucket_object&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.terraform.io/docs/language/meta-arguments/for_each.html"&gt;for_each&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.terraform.io/docs/language/functions/fileset.html"&gt;fileset&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>s3</category>
      <category>aws</category>
      <category>terraform</category>
    </item>
    <item>
      <title>Add Tailwind CSS to a Statiq website</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Fri, 27 Aug 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/ankursheel/add-tailwind-css-to-a-statiq-website-4bi1</link>
      <guid>https://dev.to/ankursheel/add-tailwind-css-to-a-statiq-website-4bi1</guid>
      <description>&lt;p&gt;In this article, I will be showing how we can integrate &lt;a href="https://tailwindcss.com/"&gt;Tailwind CSS&lt;/a&gt; with &lt;a href="https://www.statiq.dev/web/"&gt;Statiq&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Many articles out there discuss the pros and cons of using Tailwind so that I won’t be doing that. All I will be saying is that Tailwind is a utility first framework with what might be considered an ugly-as syntax, but boy is it faster to build elegant components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Install &lt;a href="https://nodejs.org/en/"&gt;Node and npm&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Install &lt;a href="https://dotnet.microsoft.com/"&gt;.Net Core&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Create a &lt;a href="https://www.statiq.dev/web/"&gt;.Net Core Console Application configured to use Statiq&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install Tailwind
&lt;/h2&gt;

&lt;p&gt;Tailwind can only be installed as an NPM package.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Create a folder called node
&lt;/h3&gt;

&lt;p&gt;Because our core project is a .Net Core application, and we don’t need npm except for Tailwind, we will install it in a separate folder. This will avoid clutter in the root directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Install packages
&lt;/h3&gt;

&lt;p&gt;We will install Tailwind and other peer dependencies inside a directory called &lt;em&gt;node&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;node
npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-D&lt;/span&gt; tailwindcss@latest postcss@latest autoprefixer@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PostCSS&lt;/strong&gt; is a preprocessor that transforms the CSS using plugins.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AuoPrefixer&lt;/strong&gt; is a PostCSS plugin to add vendor prefixes to CSS rules.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our package.json should look something like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"devDependencies"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"@tailwindcss/typography"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^0.4.1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"autoprefixer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^10.3.1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"postcss"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^8.3.6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"tailwindcss"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^2.2.7"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Configure postcss
&lt;/h3&gt;

&lt;p&gt;Create a postcss.config.js file and add &lt;em&gt;tailwindcss&lt;/em&gt; and &lt;em&gt;autoprefixer&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;tailwindcss&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
        &lt;span class="na"&gt;autoprefixer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Configure Tailwind
&lt;/h3&gt;

&lt;p&gt;Generate a config file using the Tailwind CLI utility&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx tailwindcss init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a tailwind.config.js file.&lt;/p&gt;

&lt;p&gt;We will update the purge section to optimize our CSS&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="nx"&gt;purge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../ **/input/** /*.cshtml&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Line 2&lt;/strong&gt; :Enable purge without having to set the NODE_ENV to production&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Line 3&lt;/strong&gt; :Scan our razor views files and remove any superfluous CSS from our final output file. We prefix the path with &lt;strong&gt;../&lt;/strong&gt; because our config is inside a subfolder and we need to find the razor views from the root.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our final configuration will look like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;purge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../ **/input/** /*.cshtml&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;darkMode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// or 'media' or 'class'&lt;/span&gt;
    &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;variants&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Add CSS
&lt;/h3&gt;

&lt;p&gt;Create an input folder and add a _site.css&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/*! @import */&lt;/span&gt;
&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;components&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;utilities&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Build the CSS
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx tailwind build -c ./tailwind.config.js -i ../input/_site.css -o ../Bookland/output/assets/styles.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;-c&lt;/strong&gt; : The config file path&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;-i&lt;/strong&gt; : The input file path. Our CSS file is in the input folder and called _site.css&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;-o&lt;/strong&gt; : The output file path. Our output file is in the output folder and called styles.css&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 6: Link the stylesheet to a layout file
&lt;/h3&gt;

&lt;p&gt;In our input folder, we will add a _Layout.cshtml file and link to the stylesheet generated by tailwind and postcss.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="n"&gt;DOCTYPE&lt;/span&gt; &lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt; &lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;link&lt;/span&gt; &lt;span class="n"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/styles.css"&lt;/span&gt; &lt;span class="n"&gt;rel&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt;&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nf"&gt;@RenderBody&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Reference to the styles.css file&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Now we should be able to add Tailwind classes to our Razor view. The generated site will use the styles outputted by Tailwind.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tailwindcss.com/docs"&gt;Tailwind Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>jamstack</category>
      <category>webdev</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>How to override the netlify build config</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Wed, 18 Aug 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/ankursheel/how-to-override-the-netlify-build-config-php</link>
      <guid>https://dev.to/ankursheel/how-to-override-the-netlify-build-config-php</guid>
      <description>&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;As part of the &lt;a href="https://www.ankursheel.com/blog/migrating-gatsby-statiq"&gt;migration from Gatsby to Statiq&lt;/a&gt;, I wanted to keep the original site running with gatsby but deploy the new branch using Statiq.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;First, we need to allow branch deploys for our branch.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XOp3z1xg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a494wpknjpgkztdavqxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XOp3z1xg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a494wpknjpgkztdavqxh.png" alt="Netlify UI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above screenshot, my branch for the migration is named &lt;em&gt;statiq&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;To override the build settings set in the Netlify UI, we can add the following snippet to &lt;em&gt;netlify.toml&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[build]&lt;/span&gt;
  &lt;span class="py"&gt;command&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"dotnet run --project ./subDir/"&lt;/span&gt;
  &lt;span class="py"&gt;publish&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"./subDir/output"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, what’s happening here?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Line 1&lt;/strong&gt; : Apply the build settings globally and override anything set in the UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Line 2&lt;/strong&gt; : Use the &lt;code&gt;dotnet run&lt;/code&gt; as the build command and specify the project path.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Line 3&lt;/strong&gt; : The relative directory to the root directory containing the deploy-ready HTML files and assets.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The advantage of updating the &lt;em&gt;netlify.toml&lt;/em&gt; file is that when we merge our branch back to master, it will automatically use Statiq to build the site.&lt;/p&gt;

&lt;p&gt;References:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.netlify.com/configure-builds/file-based-configuration/"&gt;Netlify File Based Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-run"&gt;Dotnet run command&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devops</category>
      <category>netlify</category>
    </item>
    <item>
      <title>How to rename multiple files in subfolders using Windows command prompt</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Tue, 17 Aug 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/ankursheel/how-to-rename-multiple-files-in-subfolders-using-windows-command-prompt-51la</link>
      <guid>https://dev.to/ankursheel/how-to-rename-multiple-files-in-subfolders-using-windows-command-prompt-51la</guid>
      <description>&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;As part of the &lt;a href="https://www.ankursheel.com/blog/migrating-gatsby-statiq"&gt;migration from Gatsby to Statiq&lt;/a&gt;, I had to rename all the files with the extension &lt;em&gt;mdx&lt;/em&gt; to &lt;em&gt;md&lt;/em&gt;. Now, I could do it one by one or find a utility but using a single command is more elegant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;To rename all the files recursively, we can use the REN (rename) command as follows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;FOR /R %G IN &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;.mdx&lt;span class="o"&gt;)&lt;/span&gt; DO REN &lt;span class="s2"&gt;"%f"&lt;/span&gt; &lt;span class="s2"&gt;"%~dpnG.md"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s unpack this command.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;FOR&lt;/strong&gt; : Loops through files&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/R&lt;/strong&gt; : Recurse through subfolders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;%G&lt;/strong&gt; : A parameter set to a different value for each iteration of the for loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(*.mdx)&lt;/strong&gt;: The filename pattern that we want to match.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;REN&lt;/strong&gt; : The command to rename a file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;%~dpnG”&lt;/strong&gt; : Expands the parameter of the original filename to the fully qualified path without the extension&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;References:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ss64.com/nt/for_r.html"&gt;FOR /R&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ss64.com/nt/ren.html"&gt;REN&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ss64.com/nt/syntax-args.html"&gt;Command Line arguments&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tutorial</category>
      <category>utility</category>
      <category>windows</category>
      <category>rename</category>
    </item>
    <item>
      <title>Increasing Productivity with No-Meeting Days</title>
      <dc:creator>Ankur Sheel</dc:creator>
      <pubDate>Wed, 28 Jul 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/ankursheel/increasing-productivity-with-no-meeting-days-3cek</link>
      <guid>https://dev.to/ankursheel/increasing-productivity-with-no-meeting-days-3cek</guid>
      <description>&lt;p&gt;&lt;em&gt;This is an edited version of an article I originally wrote for the First AML Product &amp;amp; Engineering blog.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Have you ever been in a position where you are in meetings during the day, and then you code at night just to feel that you are getting things done? I know I have&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In 2009, Paul Graham wrote an article about the &lt;a href="http://www.paulgraham.com/makersschedule.html"&gt;maker vs manager schedule&lt;/a&gt;. It articulates that meetings are disastrous when we are on the maker’s schedule. When we are attending many meetings, it is tough to focus on the task and get things done. In my case, even a single meeting can blow my whole afternoon.&lt;/p&gt;

&lt;p&gt;In today’s world, most of us have two workdays - one on the manager’s schedule and the other on the maker’s schedule.&lt;/p&gt;

&lt;p&gt;In his article, Paul proposes that one can use office hours and set aside a time for meetings. But I struggled with this when acting as the team lead for one of the teams and found my day broken up by various meetings. After all, how do we tell our boss (and the rest of the business) that we have office hours and will only meet him/her/them during those? I think office hours works well when we are high enough on the totem pole.&lt;/p&gt;

&lt;p&gt;Since office hours are not viable for most of us, we can try the next best thing - blocking out chunks of time in our calendar for focus time. Blackout periods work well in most cases, but we still have to attend meetings and can’t get stuck in on a task for the whole day.&lt;/p&gt;

&lt;p&gt;Let us look at something that works a little better - A no-meeting day.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a No-Meeting Day?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2fp7FrY3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4sarqn3swbimuy4qynld.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2fp7FrY3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4sarqn3swbimuy4qynld.jpg" alt="Photo from Unsplash"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A no-meeting day is a day for focused work. Essentially, it’s a day in the week with no meetings so that we get uninterrupted time to do our job. This continuous focus time is perfect for deep work and more extensive projects. In addition, there is less context switching, so it’s easier to achieve that magical state of flow.&lt;/p&gt;

&lt;p&gt;And if you are a manager, it also allows you to be a doer.&lt;/p&gt;

&lt;h2&gt;
  
  
  A No-meeting day will never work for my role.
&lt;/h2&gt;

&lt;p&gt;Now some of you might be reading this and going -&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Yeah, it sounds great and I would love to get in on that action, but it will never work for my role&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Some functions like Sales and Customer Success will require more collaboration than others.&lt;/p&gt;

&lt;p&gt;For these roles, it might be better to institute blackout periods where people can pick half a day each week where they are not expected to be in a meeting. Shared blackout periods can work well so that there is time to have meetings that involve multiple people or external stakeholders.&lt;/p&gt;

&lt;p&gt;Alternatively, we can also institute no meeting days just for internal meetings.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to implement no-meeting days?
&lt;/h2&gt;

&lt;p&gt;Now that I have allayed your fears, you want to know how to implement them for yourself and your team.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Patience, you must have my young Padawan&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt; : The first step to a meeting-free day is to talk with your manager and get them on board. If your manager is concerned, you can start with blackout periods and then move up to no-meeting days. Once you have a few blackout periods in your calendar for focus time, it is an easier sell to consolidate them into a single no-meeting day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; : Next, communicate with others about your availability on no meeting days. Have a plan for how or when you are available in case of work emergencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt; : The final step is to ensure that no meetings can be scheduled on your nominated no-meeting day. Create a recurring all-day event on your calendar that blocks others from scheduling time with you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt; : Once you are happy with the trial, roll it out to the rest of the team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Pitfalls
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Getting the whole team to buy-in from the start
&lt;/h3&gt;

&lt;p&gt;People make a big mistake and set themselves up for failure because they try to get the whole team to agree to try it from the outset. It’s not hard to make space for a no-meeting day for a single person.&lt;/p&gt;

&lt;h3&gt;
  
  
  Blocking the calendar one week at a time
&lt;/h3&gt;

&lt;p&gt;Making it recurring and not just a week by week addition makes it easier to maintain the meeting free schedule.&lt;/p&gt;

&lt;p&gt;I prefer to set up a regular &lt;strong&gt;Out of Office&lt;/strong&gt; event with a title of &lt;strong&gt;&lt;em&gt;Focus Time&lt;/em&gt;&lt;/strong&gt; and a message stating - &lt;em&gt;I am open to urgent meetings. Please slack me to get me to accept&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Be Flexible
&lt;/h2&gt;

&lt;p&gt;Meetings involve more than one person. Sometimes, we have to take a meeting on our no-meeting day because that is the only day someone else is available, or there is an urgent fire that we need to put out.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make exceptions when necessary but try hard to avoid them&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Having a no-meeting day does not mean that we don’t get together with our co-workers or have spontaneous conversations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feel free to have them; Just don’t schedule it!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>watercooler</category>
    </item>
  </channel>
</rss>
