<?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>Forem: Abhay Srivastav</title>
    <description>The latest articles on Forem by Abhay Srivastav (@abhay07).</description>
    <link>https://forem.com/abhay07</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%2F188709%2F3af50f9c-e719-439b-bf96-68e7bab01602.jpeg</url>
      <title>Forem: Abhay Srivastav</title>
      <link>https://forem.com/abhay07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/abhay07"/>
    <language>en</language>
    <item>
      <title>All in favor of Typescript ?</title>
      <dc:creator>Abhay Srivastav</dc:creator>
      <pubDate>Tue, 23 Aug 2022 09:18:00 +0000</pubDate>
      <link>https://forem.com/abhay07/all-in-favor-of-typescript--ha3</link>
      <guid>https://forem.com/abhay07/all-in-favor-of-typescript--ha3</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_YU8PFC9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w4u1eg9dkhq4naozu134.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_YU8PFC9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w4u1eg9dkhq4naozu134.jpeg" alt="Typescript any meme" width="576" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a long term Javascript developer, I feel that using typescript takes away the easiness that comes with Javascript. And it creates a very restrictive development experience. &lt;br&gt;
Also there's a learning curve to Typescript. Typescript shouldn't be imposed in my opinion.&lt;/p&gt;

&lt;p&gt;Here's an interesting poll, for the case again Typescript.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/poll_booth/status/1561762701197852673"&gt;Love or hate Typescript ? Vote here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>typescript</category>
    </item>
    <item>
      <title>UX from an engineer POV</title>
      <dc:creator>Abhay Srivastav</dc:creator>
      <pubDate>Thu, 04 Aug 2022 11:23:11 +0000</pubDate>
      <link>https://forem.com/abhay07/ux-from-an-engineer-pov-4epo</link>
      <guid>https://forem.com/abhay07/ux-from-an-engineer-pov-4epo</guid>
      <description>&lt;p&gt;Hi,&lt;br&gt;
Can anyone point me to a youtube channel, which talks about UX principles but more relevant to a Front end engineer ?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Dare to take the Red Pill</title>
      <dc:creator>Abhay Srivastav</dc:creator>
      <pubDate>Sun, 20 Sep 2020 10:38:30 +0000</pubDate>
      <link>https://forem.com/abhay07/dare-to-take-the-red-pill-20in</link>
      <guid>https://forem.com/abhay07/dare-to-take-the-red-pill-20in</guid>
      <description>&lt;p&gt;Have you ever felt that, there are never ending problems in our life. Almost like the world is against you. Something is stopping us to realise the true happiness or the real truth. We are always planning for the next moment but never really reach there. Everyone around you is trying to tame you, trying to slow you down, rejecting your ideas, keeping you waiting, trying to waste your time. Then you are not alone. Many of us feel the same. There is some secret hidden in the world. The world is not as it seems. Someone don’t want us to realise the real truth. They want us to be get stuck in the web of &lt;strong&gt;Maya&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let’s talk about Maya. In Hindi it is &lt;strong&gt;Maya&lt;/strong&gt; or &lt;strong&gt;The Matrix&lt;/strong&gt;. If you have seen the movie Matrix, you either think that, it is just another action movie, or you have connected with the character of Neo at some deeper level. How he was looking for the truth. Because he knew there was something wrong with the world. And then when he finally realised his true identity, and defeated all the &lt;a href="https://en.wikipedia.org/wiki/Agent_(The_Matrix)"&gt;&lt;strong&gt;Agents&lt;/strong&gt;&lt;/a&gt;. And this is all an illusion, he finally wakes up.&lt;/p&gt;

&lt;p&gt;Aren’t we all Neo, waiting to wake up ?&lt;/p&gt;

&lt;p&gt;My latest belief or theory about Maya is inspired from this &lt;a href="https://www.youtube.com/watch?v=vjsgJ5-i6Tk"&gt;video&lt;/a&gt;. The video is in Hindi. The gist of the video is that the world is an illusion and we have forgotten our true purpose here. At the end of our life, we all have to go back to the source or God (if you may say).&lt;/p&gt;

&lt;p&gt;Now why would God or someone create this illusion of the world to trap us here. I think that God has sent us here to make us learn something. We will keep repeating this cycle of birth and death, till we have realised the real truth. Or as they say in Hinduism, that it is our Karmas from our previous life that lead us to the next birth. And till the time all our Karma are not resolved, we will keep coming to this world to learn and repay all our Karmic debts.&lt;/p&gt;

&lt;p&gt;The same thing is told, in some movies. You have to see some of the movies and shows in order to understand the context here. Here I’m listing some of them. I would highly recommend to watch them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/The_Truman_Show"&gt;The Truman Show&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/The_Matrix"&gt;The Matrix&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Hang_the_DJ"&gt;Hang the DJ&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Eternal_Sunshine_of_the_Spotless_Mind"&gt;Eternal Sunshine of the Spotless Mind&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;P.S. I’m on this parallel spiritual path. I know i haven’t reached the final destination yet. But i know it exists and if are on a similar journey. Let’s connect.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using multiple git accounts</title>
      <dc:creator>Abhay Srivastav</dc:creator>
      <pubDate>Thu, 03 Sep 2020 11:03:59 +0000</pubDate>
      <link>https://forem.com/abhay07/using-multiple-git-accounts-m08</link>
      <guid>https://forem.com/abhay07/using-multiple-git-accounts-m08</guid>
      <description>&lt;p&gt;If you are a developer, then you must be using git. And there are chances that you might have faced the problem of using different git accounts for each git repository. How do we switch user each time we clone a new repository.&lt;/p&gt;

&lt;p&gt;One of the solution is to change the repository username config using below command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config user.name "youremail@email.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But you have to do this for every new repository. Fortunately there's a better solution of setting multiple accounts in ssh config. Below are the steps to do that.&lt;/p&gt;

&lt;p&gt;First of all you need to generate ssh keys for each of the email.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.gitlab.com/ee/gitlab-basics/create-your-ssh-keys.html"&gt;How to generate and link public ssh keys to your git accounts&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next edit your ssh config file&lt;/p&gt;

&lt;p&gt;For Linux or Mac, run below command in terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo vim ~/.ssh/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For windows, ssh config file is found generally at below location&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\username\.ssh\config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open this folder and edit config file in any editor (Notepad/Sublime)&lt;/p&gt;

&lt;p&gt;Lets say you have you have two account on github, one is your personal account and the other is work. &lt;/p&gt;

&lt;p&gt;And from the first step, you have generated two ssh keys &lt;strong&gt;your-ssh-public-id&lt;/strong&gt; using personal email and &lt;strong&gt;your-work-ssh-public-id&lt;/strong&gt; using work email.&lt;/p&gt;

&lt;p&gt;Paste below configuration in config file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/your-ssh-public-id

Host github.com-work
  HostName github.com
  User git
  IdentityFile ~/.ssh/your-work-ssh-public-id
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now whenever you clone any repository, edit the clone url accordingly. &lt;br&gt;
For example, if you are cloning a repository from github, then change&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone git@github.com:Abhay07/repository-name.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone git@github.com-work:Abhay07/repository-name.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don't change the clone url, your &lt;strong&gt;your-ssh-public-id&lt;/strong&gt; will be used which uses personal email id. &lt;/p&gt;

&lt;p&gt;You can also update the remote url &lt;strong&gt;after cloning the repo&lt;/strong&gt;, with below command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote origin set-url git@github.com-work:Abhay07/repository-name.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Let me know if it helped or you have any suggestions.&lt;/p&gt;

&lt;p&gt;P.S. — I have created some tools. Do check it out&lt;br&gt;
Youtube video downloader or cutting tool : &lt;a href="https://youtubecut.com"&gt;youtubecut.com&lt;/a&gt;&lt;br&gt;
Check your IP address / Locate an IP : &lt;a href="https://myips.in"&gt;myips.in&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
    </item>
    <item>
      <title>Create your own proxy network using Tinyproxy</title>
      <dc:creator>Abhay Srivastav</dc:creator>
      <pubDate>Wed, 02 Sep 2020 04:38:40 +0000</pubDate>
      <link>https://forem.com/abhay07/create-your-own-proxy-network-using-tinyproxy-2pdk</link>
      <guid>https://forem.com/abhay07/create-your-own-proxy-network-using-tinyproxy-2pdk</guid>
      <description>&lt;p&gt;I live in India and love watching TV shows. One of my favorite show is &lt;a href="https://en.wikipedia.org/wiki/The_Good_Place"&gt;The Good Place&lt;/a&gt;. Few months back, i had watched 2 seasons on Netflix India, and i got to know that all the 3 seasons were on Netflix US. So i needed a proxy to watch my favorite show on Netflix US.&lt;/p&gt;

&lt;p&gt;In order to do that, there are couple of free options, one is to  install Opera Browser, which has an inbuilt VPN feature, the other is to create your own Proxy network using AWS EC2 and &lt;strong&gt;Tinyproxy&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tinyproxy.github.io/"&gt;Tinyproxy&lt;/a&gt; is a light-weight HTTP/HTTPS proxy daemon for POSIX operating systems, which is open source on Github.&lt;/p&gt;

&lt;p&gt;In order to setup a proxy network, these are the steps you have to follow&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Launch an EC2 instance on AWS in the region where you want your network to pass through, in my case i chose N. California region.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tutorial - &lt;a href="https://aws.amazon.com/premiumsupport/knowledge-center/launch-instance-custom-ami/"&gt;https://aws.amazon.com/premiumsupport/knowledge-center/launch-instance-custom-ami/&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Make changes to security group of the EC2, so that it allows connections on 8888 port. Since 8888 port is the default port used by tinyproxy.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pWLr-yb---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--0kZ1Urvs--/c_limit%252Cf_auto%252Cfl_progressive%252Cq_auto%252Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zlbkdjrxbhug9rn4dccq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pWLr-yb---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--0kZ1Urvs--/c_limit%252Cf_auto%252Cfl_progressive%252Cq_auto%252Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zlbkdjrxbhug9rn4dccq.png" alt="Security group configuration for Tinyproxy" width="880" height="339"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install tinyproxy on the instance and start it. To install tiny proxy, run below commands after sshing to your EC2 instance.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade
sudo apt install tinyproxy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Make changes to tinyproxy.conf, to allow your ip address to access the proxy.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo vim /etc/tinyproxy/tinyproxy.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for Allow 127.0.0.1 line and add your public IP&lt;/p&gt;

&lt;p&gt;To know your public ip, search "my ip" on Google or run below command in terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl ifconfig.co
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Configure your newly created proxy in Firefox Browser&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cbQ9JnsE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bvbv02620b7l55eao9s5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cbQ9JnsE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bvbv02620b7l55eao9s5.png" alt="Configuring proxy in Mozilla Firefox" width="863" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test your public ip address, by searching "my ip" on google. Or try opening Netflix in Firefox browser. You will have shows from your proxy server country!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Footnote - I have a created a tool &lt;a href="https://youtubecut.com"&gt;Youtube Cut&lt;/a&gt; to cut parts of youtube video and download, you can also choose to download the entire video. Let me know if you found this helpful.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
