<?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: Lucas Vieira</title>
    <description>The latest articles on DEV Community by Lucas Vieira (@lucasvtiradentes).</description>
    <link>https://dev.to/lucasvtiradentes</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%2F419351%2F4db1c6d5-f3b9-4d12-8e36-dcb5d301ff40.png</url>
      <title>DEV Community: Lucas Vieira</title>
      <link>https://dev.to/lucasvtiradentes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lucasvtiradentes"/>
    <language>en</language>
    <item>
      <title>Add an one way sync from ticktick and github to google calendar</title>
      <dc:creator>Lucas Vieira</dc:creator>
      <pubDate>Wed, 15 Mar 2023 02:11:00 +0000</pubDate>
      <link>https://dev.to/lucasvtiradentes/add-an-one-way-sync-from-ticktick-and-github-to-google-calendar-3862</link>
      <guid>https://dev.to/lucasvtiradentes/add-an-one-way-sync-from-ticktick-and-github-to-google-calendar-3862</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;What if you could track your overall progress effortless in google calendar?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why
&lt;/h2&gt;

&lt;p&gt;We as developers often experience a sense of working all the time and still feeling like we are not accomplishing enough.&lt;/p&gt;

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

&lt;p&gt;To combat this feeling I decided to track my progress from both ticktick and also github, the platforms I use the most. &lt;/p&gt;

&lt;p&gt;So I developed a npm package, called &lt;a href="https://github.com/lucasvtiradentes/gcal-sync#readme"&gt;gcal-sync&lt;/a&gt;, which basically adds a one way sync between ticktick and github to google calendar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mILuL2Yk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x1p4blu93gkvwzadpjmp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mILuL2Yk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x1p4blu93gkvwzadpjmp.png" alt="Image description" width="670" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;The only thing you need to use this solution is a &lt;code&gt;gmail/google account&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;To effectively use this project, please head to the main &lt;a href="https://github.com/lucasvtiradentes/gcal-sync/blob/master/README.md#installation"&gt;project instructions&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final words
&lt;/h2&gt;

&lt;p&gt;This project really helped me to track my progress and also makes me feel good about the hard work I put on in a daily basis.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kw73WPVo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/lucasvtiradentes/my-tutorials/blob/master/.github/images/divider.png%3Fraw%3Dtrue" width="880" height="9"&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Related
&lt;/h2&gt;

&lt;p&gt;👉 If you want to check the repository source code, it is &lt;a href="https://github.com/lucasvtiradentes/gcal-sync/"&gt;here&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/lucasvtiradentes/blob/master/portfolio/PROJECTS.md#TOC"&gt;my projects&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/blob/master/README.md#TOC"&gt;my tutorials&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>ticktick</category>
      <category>calendar</category>
      <category>sync</category>
    </item>
    <item>
      <title>How to easily manage your boilerplates and quickstart your projects</title>
      <dc:creator>Lucas Vieira</dc:creator>
      <pubDate>Sun, 12 Mar 2023 18:12:11 +0000</pubDate>
      <link>https://dev.to/lucasvtiradentes/how-to-easily-manage-your-boilerplates-and-quickstart-your-projects-4g04</link>
      <guid>https://dev.to/lucasvtiradentes/how-to-easily-manage-your-boilerplates-and-quickstart-your-projects-4g04</guid>
      <description>&lt;p&gt;We as developers often need to create a brand new project which sometimes take long to setup it according to our needs and preferences.&lt;/p&gt;

&lt;p&gt;In some cases, we have to literally spend hours configuring aux tools such as prettier, eslint, husky and so on.&lt;/p&gt;

&lt;p&gt;To never experience that anymore, I developed a simple and powerful npm package, called &lt;a href="https://github.com/lucasvtiradentes/boilermanager"&gt;boilermanager&lt;/a&gt;, to help developers to manage their own boilerplates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xdkSFyYG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/99iegibp0r7vjrxj8r8s.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xdkSFyYG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/99iegibp0r7vjrxj8r8s.gif" alt="Image description" width="880" height="444"&gt;&lt;/a&gt;&lt;br&gt;
Example: the above image shows this tool creating an electron typescript application with all tools configured in less than one minute&lt;/p&gt;
&lt;h2&gt;
  
  
  How to use it
&lt;/h2&gt;

&lt;p&gt;To use this tool, you have to install Node.js and Git.&lt;/p&gt;

&lt;p&gt;After have those softwares installed, simple install the package globally in your computer by running this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;boilermanager &lt;span class="nt"&gt;-g&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that you can simple run any of the following options it the folder you want to create a new boilerplate project:&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="c"&gt;# you can either use "bpm" or "boilermanager"&lt;/span&gt;

bpm                      &lt;span class="c"&gt;# will show all the nodejs default boilerplates&lt;/span&gt;
bpm &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;user/repository] &lt;span class="c"&gt;# will show the boilerplates available in the specified repository&lt;/span&gt;
bpm &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;folder]          &lt;span class="c"&gt;# will show the boilerplates available in the specified folder&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to use it with my onw boilerplates?
&lt;/h2&gt;

&lt;p&gt;I have created a &lt;a href="https://github.com/lucasvtiradentes/boilermanager-boilerplates-template"&gt;basic boilerplates repository template&lt;/a&gt;, so you can understand how to setup your own projects the way boilermanager will accept.&lt;/p&gt;

&lt;p&gt;In general, you’ll have to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/lucasvtiradentes/boilermanager-boilerplates-template/fork"&gt;Fork&lt;/a&gt; or &lt;a href="https://github.com/lucasvtiradentes/boilermanager-boilerplates-template/generate"&gt;Copy&lt;/a&gt; this project to your github;&lt;/li&gt;
&lt;li&gt;Clone into your local machine and put your boilerplates according to this repository;&lt;/li&gt;
&lt;li&gt;Push the changes to your github remote repository, lets say it is &lt;code&gt;githubuser/yourboilerplates&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Load your repository, by running:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bpm &lt;span class="nt"&gt;-r&lt;/span&gt; githubuser/yourboilerplates
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Final words
&lt;/h2&gt;

&lt;p&gt;This project initially was meant to be used for Node.js related projects, but it also can be used for any other technologies. I’m even going to add Golang boilerplates (in other repository) in the future, when I become more proficient at it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related
&lt;/h2&gt;

&lt;p&gt;👉 If you want to check the repository source code, it is &lt;a href="https://github.com/lucasvtiradentes/boilermanager"&gt;here&lt;/a&gt;;&lt;br&gt;
👉 You can also find the default boilerplates available &lt;a href="https://github.com/lucasvtiradentes/boilermanager-boilerplates"&gt;here&lt;/a&gt;;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/lucasvtiradentes/blob/master/portfolio/PROJECTS.md#TOC"&gt;my projects&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/blob/master/README.md#TOC"&gt;my tutorials&lt;/a&gt;&lt;/p&gt;

</description>
      <category>development</category>
      <category>programming</category>
      <category>boilerplates</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Easily modify your most used websites with this extension</title>
      <dc:creator>Lucas Vieira</dc:creator>
      <pubDate>Thu, 09 Mar 2023 16:44:41 +0000</pubDate>
      <link>https://dev.to/lucasvtiradentes/easily-modify-your-most-used-websites-with-this-extension-2hgf</link>
      <guid>https://dev.to/lucasvtiradentes/easily-modify-your-most-used-websites-with-this-extension-2hgf</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Who never wanted some feature in our most used websites?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Last week I was thinking and searching about that and I came across &lt;a href="https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=pt"&gt;tamper monkey&lt;/a&gt;, a browser extension that allows the user to run specific javascript scripts everytime we go to a website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CjKMhUMe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6rj7cd1nknzg1r1lkfd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CjKMhUMe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6rj7cd1nknzg1r1lkfd.png" alt="Image description" width="605" height="163"&gt;&lt;/a&gt;&lt;br&gt;
example: github — change private repositories color&lt;br&gt;
With this extension you will be able do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;hide sections you dont want to see;&lt;/li&gt;
&lt;li&gt;show a new valuable information (maybe a sum of values);&lt;/li&gt;
&lt;li&gt;change the web site appearence;&lt;/li&gt;
&lt;li&gt;combine the current information to information from other sites;&lt;/li&gt;
&lt;li&gt;and whatever more your imagination (and js skills) allow you to do.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;I basically use this extension to change my most used websites: twitch and github.&lt;/p&gt;

&lt;p&gt;a) GITHUB — navigation menu&lt;/p&gt;

&lt;p&gt;Github’s navigation bar to me is not the most effeciant since most of its items I’ve literally never used. So I change them to pages I use frequently:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pTFbIgJc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lnozqpvcna11ha1bvz78.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pTFbIgJc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lnozqpvcna11ha1bvz78.png" alt="Image description" width="880" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;b) GITHUB — private repositories&lt;/p&gt;

&lt;p&gt;I felt like everytime I need to find a repository I was taking longer because github was not proper showing differences between private and public repositories. So I decide to change this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ioiUXwhR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qi0h3hxqqmh635r8dj8b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ioiUXwhR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qi0h3hxqqmh635r8dj8b.png" alt="Image description" width="880" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;c) TWITCH — hide recommendations&lt;/p&gt;

&lt;p&gt;One of the things I taking more serious this year is to reduce my exposition to over information and recomendations in the websites I use. It was making me distract a lot of the times. In twitch, it was common to going from streamer to stremer a lot of times per day.&lt;/p&gt;

&lt;p&gt;So I made a script to hide recommendation sections, and the result looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JZ00Lx3o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4zeimj23x0qgumy2rc5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JZ00Lx3o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4zeimj23x0qgumy2rc5.png" alt="Image description" width="414" height="617"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  CONCLUSION
&lt;/h2&gt;

&lt;p&gt;My main goal in this article was to show that is quite easy to modify you most used websites, and I believe I’ve archived that.&lt;/p&gt;

&lt;p&gt;It is worth mentioning that there are a lot of tamper monkey scripts available by its great comunity, but you can always create your own.&lt;/p&gt;

&lt;p&gt;For me the best benefit is to reduce time when changing website things, that in other way would needed a own browser extension.&lt;/p&gt;

&lt;p&gt;If you have any questions, comment it bellow.&lt;/p&gt;

&lt;p&gt;Take care! 🥋&lt;/p&gt;

&lt;p&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kw73WPVo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/lucasvtiradentes/my-tutorials/blob/master/.github/images/divider.png%3Fraw%3Dtrue" width="880" height="9"&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  RELATED
&lt;/h2&gt;

&lt;p&gt;👉 If you need some tutorials to use tamper monkey, there are a lot of &lt;a href="https://www.youtube.com/results?search_query=how+to+use+tampermonkey"&gt;tutorials in youtube&lt;/a&gt;&lt;br&gt;
👉 If you want my obove showed scripts, you can use find them in &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/tree/master/content/005%20-%20Easily%20modify%20your%20most%20used%20websites%20with%20this%20extension/src"&gt;this repository&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/lucasvtiradentes/blob/master/portfolio/PROJECTS.md#TOC"&gt;my projects&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/blob/master/README.md#TOC"&gt;my tutorials&lt;/a&gt;&lt;/p&gt;

</description>
      <category>browser</category>
      <category>extension</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How to set .env variables to Heroku dynamically with a .sh script</title>
      <dc:creator>Lucas Vieira</dc:creator>
      <pubDate>Thu, 09 Mar 2023 16:40:29 +0000</pubDate>
      <link>https://dev.to/lucasvtiradentes/how-to-set-env-variables-to-heroku-dynamically-with-a-sh-script-dfg</link>
      <guid>https://dev.to/lucasvtiradentes/how-to-set-env-variables-to-heroku-dynamically-with-a-sh-script-dfg</guid>
      <description>&lt;p&gt;One of the things I really missed when I started using .env files to securelly store important variables, instead of just putting it in the source code, was the abillity to push them to my remote effectivelly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code to send .env variables to heroku
&lt;/h2&gt;

&lt;p&gt;After some reasearch, I didn’t found anything related so I decide to code it myself. And here is the result:&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="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="c"&gt;# USAGE: bash addEnvToHeroku.sh &amp;lt;filepath&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;# SET VARIABLES ________________________________________________________________&lt;/span&gt;
&lt;span class="nv"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;
&lt;span class="nv"&gt;output&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;.sh

&lt;span class="c"&gt;# DEFINE FUNCTION TO DELETE FILE _______________________________________________&lt;/span&gt;
&lt;span class="k"&gt;function &lt;/span&gt;deleteIfExist &lt;span class="o"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
      &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt; exists."&lt;/span&gt;
      &lt;span class="nb"&gt;unlink&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
   &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# SHOW SCRIPT TITLE ____________________________________________________________&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"Setting heroku variables for the file &lt;/span&gt;&lt;span class="nv"&gt;$input&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="c"&gt;# DELETE THE SH FILE IF IT EXISTS ______________________________________________&lt;/span&gt;
deleteIfExist &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$output&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="c"&gt;# READ THE CONTENT AND SAVE IN A SH FILE _______________________________________&lt;/span&gt;
&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; line&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
   &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"heroku config:set &lt;/span&gt;&lt;span class="nv"&gt;$line&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$output&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt; &amp;lt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$input&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="c"&gt;# EXECUTE THE SH FILE __________________________________________________________&lt;/span&gt;
bash &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$output&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="c"&gt;# DELETE THE SH FILE IF IT EXISTS ______________________________________________&lt;/span&gt;
deleteIfExist &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$output&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Configuration if you’re using Windows
&lt;/h2&gt;

&lt;p&gt;As you can see, it is a .sh file, but you can run it in Windows as well, you just need to specify the git bash location in your &lt;code&gt;.bashrc&lt;/code&gt; file, which is located in &lt;code&gt;C:\user\[your user name]\.bashrc&lt;/code&gt;, as it is show bellow:&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;alias &lt;/span&gt;&lt;span class="nv"&gt;bash&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'"C:\\Program Files\\Git\\bin\\bash.exe'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to use
&lt;/h2&gt;

&lt;p&gt;Now let’s see a simple example on how to use the script.&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="c"&gt;# Create a project folder&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;MySimplepProject

&lt;span class="c"&gt;# Go to the project path&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;MySimpleProject

&lt;span class="c"&gt;# Initialize git&lt;/span&gt;
git init

&lt;span class="c"&gt;# Select your heroku app&lt;/span&gt;
heroku git:remote &lt;span class="nt"&gt;-a&lt;/span&gt; mySimpleProjectInHeroku

&lt;span class="c"&gt;# supposing you have a ".env" and "addEnvToHeroku.sh" in the project root&lt;/span&gt;

&lt;span class="c"&gt;# Send the .env variables to heroku&lt;/span&gt;
bash addEnvToHeroku.sh &lt;span class="s2"&gt;".env"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And if you go to heroku you should see all your .env variables:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xvVp2Q8J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9h6o871k6n1zysciv7ic.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xvVp2Q8J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9h6o871k6n1zysciv7ic.png" alt="Image description" width="720" height="182"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can change and update these variables quicker and easier! 🤘&lt;/p&gt;

&lt;p&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kw73WPVo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/lucasvtiradentes/my-tutorials/blob/master/.github/images/divider.png%3Fraw%3Dtrue" width="880" height="9"&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  RELATED
&lt;/h2&gt;

&lt;p&gt;👉 you can also find the above mentionated code in &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/tree/master/content/004%20-%20How%20to%20set%20.env%20variables%20to%20Heroku%20dynamically%20with%20a%20.sh%20script/src"&gt;this repository&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/lucasvtiradentes/blob/master/portfolio/PROJECTS.md#TOC"&gt;my projects&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/blob/master/README.md#TOC"&gt;my tutorials&lt;/a&gt;&lt;/p&gt;

</description>
      <category>heroku</category>
      <category>bash</category>
    </item>
    <item>
      <title>How to add “Open with Windows Terminal” option to the context menu</title>
      <dc:creator>Lucas Vieira</dc:creator>
      <pubDate>Thu, 09 Mar 2023 16:33:44 +0000</pubDate>
      <link>https://dev.to/lucasvtiradentes/how-to-add-open-with-windows-terminal-option-to-the-context-menu-4eig</link>
      <guid>https://dev.to/lucasvtiradentes/how-to-add-open-with-windows-terminal-option-to-the-context-menu-4eig</guid>
      <description>&lt;p&gt;The new Windows Terminal doesn’t come with the option to be open with the right click menu by default, so you can either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;open the terminal and navigate to the folder you want;&lt;/li&gt;
&lt;li&gt;type wt in the current folder’s path.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Personaly, I prefere open it with the context menu, so I add this functionality myself. In order to do that, you have to do the following steps.&lt;/p&gt;

&lt;p&gt;1) Save a file to open the windows terminal&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vb"&gt;&lt;code&gt;

&lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="nv"&gt;objShell&lt;/span&gt;
&lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="nv"&gt;folderToOpen&lt;/span&gt;
&lt;span class="k"&gt;Set&lt;/span&gt; &lt;span class="n"&gt;objShell&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;WScript&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CreateObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"WScript.Shell"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;WScript&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Arguments&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;

  &lt;span class="n"&gt;objShell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Run&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"wt -d ."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;else&lt;/span&gt; 

  &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;WScript&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Arguments&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
    &lt;span class="n"&gt;folderToOpen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;WScript&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Arguments&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="s"&gt;"\"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;Else&lt;/span&gt; 
    &lt;span class="n"&gt;folderToOpen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;WScript&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Arguments&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;

  &lt;span class="n"&gt;objShell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Run&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"wt -d "&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;Chr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;folderToOpen&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;Chr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Make sure to save it in a place you know it is not going to be deleted accidentaly. By clicking in the above file, or draging a folder to it, you can easily open the Windows terminal. But thats not good enough, so we need to run it with the right click menu with the following script.&lt;/p&gt;

&lt;p&gt;2) Add the script to the context menu&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;

&lt;span class="c"&gt;:: ####################################################################################################################################&lt;/span&gt;
   @echo &lt;span class="na"&gt;off&lt;/span&gt;
   &lt;span class="nb"&gt;color&lt;/span&gt; &lt;span class="m"&gt;04&lt;/span&gt;
   &lt;span class="nb"&gt;title&lt;/span&gt; &lt;span class="kd"&gt;Add&lt;/span&gt; &lt;span class="kd"&gt;Open&lt;/span&gt; &lt;span class="kd"&gt;With&lt;/span&gt; &lt;span class="kd"&gt;Windows&lt;/span&gt; &lt;span class="kd"&gt;Terminal&lt;/span&gt; &lt;span class="kd"&gt;to&lt;/span&gt; &lt;span class="kd"&gt;Context&lt;/span&gt; &lt;span class="kd"&gt;Window&lt;/span&gt; &lt;span class="kd"&gt;Options&lt;/span&gt;

&lt;span class="c"&gt;:: ####################################################################################################################################&lt;/span&gt;
   &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"scriptLocation=C:\scripts\open with Windows Terminal.vbs"&lt;/span&gt;
   &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"windowsTerminalIcon=C:\scripts\windows_terminal_LVz_icon.ico"&lt;/span&gt;
   &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"registryKeyName=Windows Terminal"&lt;/span&gt;
   &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"ContextMenuCommandName=Open with Windows Terminal"&lt;/span&gt;

&lt;span class="c"&gt;:: ####################################################################################################################################&lt;/span&gt;
   &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"OpenSpecifiedFolderKey=HKCR\Directory\shell\&lt;/span&gt;&lt;span class="nv"&gt;%registryKeyName%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
   &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"OpenSpecifiedFolderKeyValue= "&lt;/span&gt;\&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%windir%&lt;/span&gt;&lt;span class="s2"&gt;\system32\wscript.exe\"&lt;/span&gt; \&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%scriptLocation%&lt;/span&gt;&lt;span class="s2"&gt;\"&lt;/span&gt; &lt;span class="s2"&gt;"\"&lt;/span&gt;&lt;span class="err"&gt;%%&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;\&lt;span class="s2"&gt;""&lt;/span&gt;

   &lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenSpecifiedFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="na"&gt;/v &lt;/span&gt;&lt;span class="s2"&gt;"Icon"&lt;/span&gt; &lt;span class="na"&gt;/t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%windowsTerminalIcon%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
   &lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenSpecifiedFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="na"&gt;/ve /t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%ContextMenuCommandName%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
   &lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenSpecifiedFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;\command"&lt;/span&gt; &lt;span class="na"&gt;/ve /t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="nv"&gt;%OpenSpecifiedFolderKeyValue%&lt;/span&gt;

&lt;span class="c"&gt;:: ####################################################################################################################################&lt;/span&gt;
   &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"OpenCurrentFolderKey=HKCR\Directory\Background\shell\&lt;/span&gt;&lt;span class="nv"&gt;%registryKeyName%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
   &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"OpenCurrentFolderKeyValue= "&lt;/span&gt;\&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%windir%&lt;/span&gt;&lt;span class="s2"&gt;\system32\wscript.exe\"&lt;/span&gt; \&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%scriptLocation%&lt;/span&gt;&lt;span class="s2"&gt;\"&lt;/span&gt; &lt;span class="s2"&gt;"\"&lt;/span&gt;&lt;span class="vm"&gt;%%V&lt;/span&gt;\&lt;span class="s2"&gt;""&lt;/span&gt;

   &lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenCurrentFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="na"&gt;/v &lt;/span&gt;&lt;span class="s2"&gt;"Icon"&lt;/span&gt; &lt;span class="na"&gt;/t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%windowsTerminalIcon%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
   &lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenCurrentFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="na"&gt;/ve /t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%ContextMenuCommandName%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
   &lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenCurrentFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;\command"&lt;/span&gt; &lt;span class="na"&gt;/ve /t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="nv"&gt;%OpenCurrentFolderKeyValue%&lt;/span&gt;

&lt;span class="c"&gt;:: ####################################################################################################################################&lt;/span&gt;
   &lt;span class="nb"&gt;pause&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kr"&gt;nul&lt;/span&gt;
   &lt;span class="k"&gt;exit&lt;/span&gt; &lt;span class="na"&gt;/b


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

&lt;/div&gt;

&lt;p&gt;The only thing you need to change in the above script is the first script path and also the path of the icon to show in the terminal context menu option. Make sure to convert it to .ico file or it will not work.&lt;/p&gt;

&lt;p&gt;After run this script with admin rights, you should see the brand new option to open a folder or the current one with the Windows Terminal 🤘.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Flucasvtiradentes%2Fmy-tutorials%2Fblob%2Fmaster%2F.github%2Fimages%2Fdivider.png%3Fraw%3Dtrue"&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  RELATED
&lt;/h2&gt;

&lt;p&gt;👉 you can also find the above mentionated code in &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/tree/master/content/003%20-%20How%20to%20add%20%E2%80%9COpen%20with%20Windows%20Terminal%E2%80%9D%20option%20to%20the%20context%20menu/src" rel="noopener noreferrer"&gt;this repository&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/lucasvtiradentes/blob/master/portfolio/PROJECTS.md#TOC" rel="noopener noreferrer"&gt;my projects&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/blob/master/README.md#TOC" rel="noopener noreferrer"&gt;my tutorials&lt;/a&gt;&lt;/p&gt;

</description>
      <category>windows</category>
      <category>customization</category>
      <category>developer</category>
    </item>
    <item>
      <title>How to add a .bashrc equivalent to the windows cmd terminal</title>
      <dc:creator>Lucas Vieira</dc:creator>
      <pubDate>Thu, 09 Mar 2023 16:28:01 +0000</pubDate>
      <link>https://dev.to/lucasvtiradentes/how-to-add-a-bashrc-equivalent-to-the-windows-cmd-terminal-3e97</link>
      <guid>https://dev.to/lucasvtiradentes/how-to-add-a-bashrc-equivalent-to-the-windows-cmd-terminal-3e97</guid>
      <description>&lt;p&gt;In *nix operational systems there is a file called .bashrc, which is loaded before the bash terminal is ready to use, so you can use all the variables setted in that file. It is really useful as you can create personal macros and aliases to boost you productivity.&lt;/p&gt;

&lt;p&gt;If you want to to do the same thing in the Windows Command Prompt (CMD), you have to do these steps:&lt;/p&gt;

&lt;p&gt;1) Create a .bat with the variables you want&lt;br&gt;
This file should be saved in a place it is not going to be deleted accidently, for example, you could create a folder in &lt;code&gt;C:\scripts&lt;/code&gt; and save it there.&lt;/p&gt;

&lt;p&gt;The file should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;@echo &lt;span class="na"&gt;off&lt;/span&gt;
&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="kd"&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=[&lt;/span&gt;&lt;span class="kd"&gt;here&lt;/span&gt; &lt;span class="kd"&gt;is&lt;/span&gt; &lt;span class="kd"&gt;my&lt;/span&gt; &lt;span class="kd"&gt;github&lt;/span&gt; &lt;span class="kd"&gt;token&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="kd"&gt;AWS_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=[&lt;/span&gt;&lt;span class="kd"&gt;here&lt;/span&gt; &lt;span class="kd"&gt;is&lt;/span&gt; &lt;span class="kd"&gt;my&lt;/span&gt; &lt;span class="kd"&gt;aws&lt;/span&gt; &lt;span class="kd"&gt;token&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) Add the file to be loaded before cmd init&lt;br&gt;
In order to do that you have to add a registry key specifying the path of the cmdrc, as it is shown bellow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="c"&gt;:: ####################################################################################################################################&lt;/span&gt;
   @echo &lt;span class="na"&gt;off&lt;/span&gt;
   &lt;span class="nb"&gt;color&lt;/span&gt; &lt;span class="m"&gt;04&lt;/span&gt;
   &lt;span class="nb"&gt;title&lt;/span&gt; &lt;span class="kd"&gt;Add&lt;/span&gt; &lt;span class="nb"&gt;cmd&lt;/span&gt; &lt;span class="kd"&gt;rc&lt;/span&gt; &lt;span class="kd"&gt;to&lt;/span&gt; &lt;span class="kd"&gt;registry&lt;/span&gt;

&lt;span class="c"&gt;:: ####################################################################################################################################&lt;/span&gt;
   &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"OpenCurrentFolderKey=HKLM\SOFTWARE\Microsoft\Command Processor"&lt;/span&gt;
   &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"cmdRcPath=C:\scripts\cmd rc.bat"&lt;/span&gt;
   &lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenCurrentFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="na"&gt;/v &lt;/span&gt;&lt;span class="s2"&gt;"AutoRun"&lt;/span&gt; &lt;span class="na"&gt;/t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="s2"&gt;"\"&lt;/span&gt;&lt;span class="nv"&gt;%cmdRcPath%&lt;/span&gt;\&lt;span class="s2"&gt;""&lt;/span&gt;

&lt;span class="c"&gt;:: ####################################################################################################################################&lt;/span&gt;
   &lt;span class="nb"&gt;pause&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kr"&gt;nul&lt;/span&gt;
   &lt;span class="k"&gt;exit&lt;/span&gt; &lt;span class="na"&gt;/b

&lt;/span&gt;&lt;span class="c"&gt;:: ####################################################################################################################################&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the file also with a .bat extension and make sure to run it as admin. After that you should be able to retrieve all your variables whenever the Command Prompt is open 🚀.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kw73WPVo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/lucasvtiradentes/my-tutorials/blob/master/.github/images/divider.png%3Fraw%3Dtrue" width="880" height="9"&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  RELATED
&lt;/h2&gt;

&lt;p&gt;👉 you can also find the above mentionated code in &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/tree/master/content/002%20-%20How%20to%20add%20a%20.bashrc%20equivalent%20to%20the%20windows%20cmd%20terminal/src"&gt;this repository&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/lucasvtiradentes/blob/master/portfolio/PROJECTS.md#TOC"&gt;my projects&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/blob/master/README.md#TOC"&gt;my tutorials&lt;/a&gt;&lt;/p&gt;

</description>
      <category>windows</category>
      <category>dotfiles</category>
      <category>bashrc</category>
    </item>
    <item>
      <title>How to add “Open with WSL VS Code” to Windows Context Menu</title>
      <dc:creator>Lucas Vieira</dc:creator>
      <pubDate>Thu, 09 Mar 2023 16:16:58 +0000</pubDate>
      <link>https://dev.to/lucasvtiradentes/how-to-add-open-with-wsl-vs-code-to-windows-context-menu-3f8b</link>
      <guid>https://dev.to/lucasvtiradentes/how-to-add-open-with-wsl-vs-code-to-windows-context-menu-3f8b</guid>
      <description>&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;How to add “Open with WSL VS Code” to Windows Context Menu&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0i6DQLPx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/lucasvtiradentes/my-tutorials/master/tutorials/001%2520-%2520How%2520to%2520add%2520%25E2%2580%259COpen%2520with%2520WSL%2520VS%2520Code%25E2%2580%259D%2520to%2520Windows%2520Context%2520Menu/images/cover.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0i6DQLPx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/lucasvtiradentes/my-tutorials/master/tutorials/001%2520-%2520How%2520to%2520add%2520%25E2%2580%259COpen%2520with%2520WSL%2520VS%2520Code%25E2%2580%259D%2520to%2520Windows%2520Context%2520Menu/images/cover.webp" width="702" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The ability to choose in which VS Code we want to open a certain folder is not displayed in the windows context menu as default, so we have two main options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the Linux subsystem terminal and send the command to open;&lt;/li&gt;
&lt;li&gt;Open the Windows VS Code and choose its WSL edition to open the current open project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these options was good enough for me, so I decided to write a simple tool to add display the WSL VS Code option.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;In order to complete this tutorial effectively, you should have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installed Ubuntu subsystem for Windows&lt;/li&gt;
&lt;li&gt;Installed WSL extension for VS Code&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Open with WSL VS Code script
&lt;/h3&gt;

&lt;p&gt;In order to do that effectvly I tryid both .REG and .BAT files, bot they diding work very well, the first didnt run function (which are necessery in order to convert windows path location to an string understandble by linux) and the last was showing an window everytime an folder was opend by WSL VS Code.&lt;/p&gt;

&lt;p&gt;So I ended up using a .VBS, as it follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Dim userprofile
Dim vscodeLocation
Dim wls_args

Dim objfso
Dim objShell

Dim originalFolder
Dim folderDrive
Dim formatedFolder
Dim commandToRun

Set objfso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")

userprofile = objShell.ExpandEnvironmentStrings("%USERPROFILE%")
vscodeLocation= userprofile &amp;amp; "\AppData\Local\Programs\Microsoft VS Code\Code.exe"
wls_args = "--remote wsl+Ubuntu"

if (WScript.Arguments.Count = 0) then
  msgbox "No folder was selected!"
  WScript.Quit
end if

if Not (objfso.FolderExists(WScript.Arguments(0))) then
  msgbox "Folder was not found!"
  WScript.Quit
end if

originalFolder = WScript.Arguments(0)
folderDrive = objfso.GetDriveName(originalFolder)
formatedFolder = Replace(originalFolder, folderDrive, Lcase(folderDrive))
formatedFolder = Replace(formatedFolder, "\","/")
formatedFolder = Replace(formatedFolder, ":","")
formatedFolder = "mnt/" &amp;amp; formatedFolder

commandToRun = Chr(34) &amp;amp; vscodeLocation &amp;amp; Chr(34) &amp;amp; " " &amp;amp; wls_args &amp;amp; " " &amp;amp; Chr(34) &amp;amp; formatedFolder &amp;amp; Chr(34)
'  Wscript.Echo commandToRun
objShell.Run commandToRun, 0

Set objfso = Nothing
Set objShell = Nothing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You don't have much to do in the code, except &lt;strong&gt;checking if your VS Code is installed locally (only your user) or for all users&lt;/strong&gt;. In the last case, you have to replace the following line with the exact VS Code location:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vscodeLocation = userprofile &amp;amp; "\AppData\Local\Programs\Microsoft VS Code\Code.exe"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, open the notepad, paste the code and save it as &lt;code&gt;"open in WSL VS Code.vbs"&lt;/code&gt;. Then, place it in a folder that you now its not goning to be deleted acidentaly, for example, I saved mine in &lt;code&gt;C:\scripts\open in WSL VS Code.VBS&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This script already open an placed folder with the WSL VS Code, but thats not quit what we want.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add Open with WSL VS Code to context menu script
&lt;/h2&gt;

&lt;p&gt;So we need one more script to add this functionality to the context window. To do that, save the following script as &lt;code&gt;add_to_registry.bat&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;@echo &lt;span class="na"&gt;off&lt;/span&gt;
&lt;span class="nb"&gt;color&lt;/span&gt; &lt;span class="m"&gt;04&lt;/span&gt;
&lt;span class="nb"&gt;title&lt;/span&gt; &lt;span class="kd"&gt;Add&lt;/span&gt; &lt;span class="kd"&gt;Open&lt;/span&gt; &lt;span class="kd"&gt;With&lt;/span&gt; &lt;span class="kd"&gt;WSL&lt;/span&gt; &lt;span class="kd"&gt;VS&lt;/span&gt; &lt;span class="kd"&gt;Code&lt;/span&gt; &lt;span class="kd"&gt;to&lt;/span&gt; &lt;span class="kd"&gt;Context&lt;/span&gt; &lt;span class="kd"&gt;Window&lt;/span&gt; &lt;span class="kd"&gt;Options&lt;/span&gt;

&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"scriptLocation=C:\scripts\open In WSL VSCode.vbs"&lt;/span&gt;
&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"VscoIcon=C:\Users\lucas\AppData\Local\Programs\Microsoft VS Code\Code.exe"&lt;/span&gt;
&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"registryKeyName=WSL VSCode"&lt;/span&gt;
&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"ContextMenuCommandName=Open with WSL VS Code"&lt;/span&gt;

&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"OpenSpecifiedFolderKey=HKCR\Directory\shell\&lt;/span&gt;&lt;span class="nv"&gt;%registryKeyName%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"OpenSpecifiedFolderKeyValue= "&lt;/span&gt;\&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%windir%&lt;/span&gt;&lt;span class="s2"&gt;\system32\wscript.exe\"&lt;/span&gt; \&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%scriptLocation%&lt;/span&gt;&lt;span class="s2"&gt;\"&lt;/span&gt; &lt;span class="s2"&gt;"\"&lt;/span&gt;&lt;span class="err"&gt;%%&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;\&lt;span class="s2"&gt;""&lt;/span&gt;

&lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenSpecifiedFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="na"&gt;/v &lt;/span&gt;&lt;span class="s2"&gt;"Icon"&lt;/span&gt; &lt;span class="na"&gt;/t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%VscoIcon%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenSpecifiedFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="na"&gt;/ve /t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%ContextMenuCommandName%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenSpecifiedFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;\command"&lt;/span&gt; &lt;span class="na"&gt;/ve /t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="nv"&gt;%OpenSpecifiedFolderKeyValue%&lt;/span&gt;

&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"OpenCurrentFolderKey=HKCR\Directory\Background\shell\&lt;/span&gt;&lt;span class="nv"&gt;%registryKeyName%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"OpenCurrentFolderKeyValue= "&lt;/span&gt;\&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%windir%&lt;/span&gt;&lt;span class="s2"&gt;\system32\wscript.exe\"&lt;/span&gt; \&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%scriptLocation%&lt;/span&gt;&lt;span class="s2"&gt;\"&lt;/span&gt; &lt;span class="s2"&gt;"\"&lt;/span&gt;&lt;span class="vm"&gt;%%V&lt;/span&gt;\&lt;span class="s2"&gt;""&lt;/span&gt;

&lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenCurrentFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="na"&gt;/v &lt;/span&gt;&lt;span class="s2"&gt;"Icon"&lt;/span&gt; &lt;span class="na"&gt;/t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%VscoIcon%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenCurrentFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="na"&gt;/ve /t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%ContextMenuCommandName%&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="kd"&gt;REG&lt;/span&gt; &lt;span class="kd"&gt;ADD&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;%OpenCurrentFolderKey%&lt;/span&gt;&lt;span class="s2"&gt;\command"&lt;/span&gt; &lt;span class="na"&gt;/ve /t &lt;/span&gt;&lt;span class="kd"&gt;REG_EXPAND_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="nv"&gt;%OpenCurrentFolderKeyValue%&lt;/span&gt;

&lt;span class="nb"&gt;pause&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kr"&gt;nul&lt;/span&gt;
&lt;span class="k"&gt;exit&lt;/span&gt; &lt;span class="na"&gt;/b
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The only thing you should change in the above script is the &lt;code&gt;open in WSL VS Code script&lt;/code&gt; and the Windows VS Code paths, as it is shown:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"scriptLocation=C:\scripts\open In WSL VSCode.vbs"&lt;/span&gt;
&lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"VscoIcon=C:\Users\lucas\AppData\Local\Programs\Microsoft VS Code\Code.exe"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After you place the correct paths, make sure to &lt;strong&gt;run it as Administrator&lt;/strong&gt;. Then, you should see a screen telling you that the keys were successfull added to registry and if you click the right button inside or on a folder, you should see the brand new option.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kw73WPVo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/lucasvtiradentes/my-tutorials/blob/master/.github/images/divider.png%3Fraw%3Dtrue" width="880" height="9"&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  RELATED
&lt;/h2&gt;

&lt;p&gt;👉 you can also find the above mentionated code in &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/tree/master/content/001%20-%20How%20to%20add%20%E2%80%9COpen%20with%20WSL%20VS%20Code%E2%80%9D%20to%20Windows%20Context%20Menu/src"&gt;this repository&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/lucasvtiradentes/blob/master/portfolio/PROJECTS.md#TOC"&gt;my projects&lt;/a&gt;&lt;br&gt;
👉 See also all &lt;a href="https://github.com/lucasvtiradentes/my-tutorials/blob/master/README.md#TOC"&gt;my tutorials&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>wsl</category>
      <category>window</category>
    </item>
  </channel>
</rss>
