<?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: Bhoomit Ganatra</title>
    <description>The latest articles on DEV Community by Bhoomit Ganatra (@bhumit070).</description>
    <link>https://dev.to/bhumit070</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%2F628690%2Fca66f555-7e1a-47d7-aee6-b8f79e6da13f.jpeg</url>
      <title>DEV Community: Bhoomit Ganatra</title>
      <link>https://dev.to/bhumit070</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bhumit070"/>
    <language>en</language>
    <item>
      <title>Tools I Use to Increase My Productivity.</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Sat, 05 Jul 2025 05:59:02 +0000</pubDate>
      <link>https://dev.to/bhumit070/tools-i-use-to-increase-my-productivity-2bn4</link>
      <guid>https://dev.to/bhumit070/tools-i-use-to-increase-my-productivity-2bn4</guid>
      <description>&lt;p&gt;I’m always looking for ways to save time, reduce friction, and make my workflow smoother. Whether it’s automating boring stuff, avoiding context switching, or just flexing with a bit of Vim, these are the tools I use every day to stay productive (and sometimes just feel productive).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I use macOS, btw.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🐳 &lt;a href="https://orbstack.dev/" rel="noopener noreferrer"&gt;OrbStack&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;OrbStack is my go-to tool for running Docker containers and Linux on macOS. It’s fast, lightweight, and feels way smoother than Docker Desktop. The setup is dead simple, and it gets out of the way so I can focus on building — not waiting for containers to start. If you’re tired of Docker Desktop hogging your resources, this is the upgrade you didn’t know you needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 &lt;a href="https://www.locatorjs.com/" rel="noopener noreferrer"&gt;LocatorJS&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;LocatorJS is a Chrome extension that lets me option-click (or alt-click) on any React component in the browser, and boom — it opens directly in my IDE.&lt;/p&gt;

&lt;p&gt;It works with React, Preact, and SolidJS. If you’re tired of digging through the DOM or guessing component names, LocatorJS makes frontend development feel like magic. It even has a Babel plugin for more advanced setups. Also, it’s open source — shoutout to the team behind this gem: &lt;a href="https://github.com/infi-pc/locatorjs" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔔 Built-in Reminder App
&lt;/h2&gt;

&lt;p&gt;I’ll be honest — I forget stuff. A lot. The built-in reminder app on my phone helps me offload mental clutter. Grocery items? Meeting follow-ups? Random blog ideas at 2 AM? It all goes in here. It’s not fancy, but it keeps me sane. Productivity isn’t just about dev tools — it’s about remembering to reply to your boss too.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧙 Vim VSCode Extension
&lt;/h2&gt;

&lt;p&gt;I use Vim emulation in VSCode — partly for efficiency, but mostly because it feels cool. Yes, I know I’m flexing. Yes, I still sometimes forget I’m in insert mode. But once you get the muscle memory down, it’s hard to go back.&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 &lt;a href="https://chromewebstore.google.com/detail/packageflex/kikhkjfhchalgdhdjfjjimlgbipmhlci" rel="noopener noreferrer"&gt;PackageFlex&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;PackageFlex is a small but insanely useful Chrome extension. It adds a dropdown on npm package pages showing all the install commands — npm, yarn, pnpm, bun, etc.&lt;/p&gt;

&lt;p&gt;As someone who switches between projects with different package managers daily, this saves me the Google search every single time.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧮 &lt;a href="https://tableplus.com/" rel="noopener noreferrer"&gt;TablePlus&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;TablePlus is hands-down the best GUI I’ve used for relational databases. Whether it’s PostgreSQL, MySQL, or SQLite, it just works. Clean UI, snappy performance, and helpful features like multi-tab editing, safe mode, and inline editing — it’s made my DB workflows 10x more enjoyable.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 &lt;a href="https://discord.com/" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; (Yes, Seriously)
&lt;/h2&gt;

&lt;p&gt;You might think Discord is just for memes and late-night debates on whether tabs or spaces are better. But I also use Discord’s webhooks to post automated messages from my scripts or apps. No frontend? No problem. Just push data to a Discord channel and move on. It’s a surprisingly effective and lightweight way to debug, log, or share updates.&lt;/p&gt;




&lt;h2&gt;
  
  
  🖥️ Zsh + Dotfiles
&lt;/h2&gt;

&lt;p&gt;As a developer, you probably spend a good chunk of your day in the terminal — so why not make it look good and feel just right? A well-configured shell can boost your productivity and make your workflow smoother (and cooler).&lt;/p&gt;

&lt;p&gt;I use Zsh with a few essential plugins like autosuggestions, syntax highlighting, and a custom theme. Everything is wired up through my personal dotfiles — feel free to check them out here:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/bhumit070/dotfiles" rel="noopener noreferrer"&gt;github.com/bhumit070/dotfiles&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s a small thing that makes a big difference when you’re living in the terminal.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔥 &lt;a href="https://www.usebruno.com/" rel="noopener noreferrer"&gt;Bruno&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Bruno is an open-source API client that works completely offline and integrates seamlessly with Git. Think of it as a clean, developer-first alternative to tools like Postman. I love that my API collections live alongside my code, version-controlled, and portable. No account, no sync issues — just open it and start hitting endpoints.&lt;/p&gt;




&lt;h2&gt;
  
  
  📸 &lt;a href="https://flameshot.org/" rel="noopener noreferrer"&gt;Flameshot&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Sometimes you just need to show QA that “it works on my machine” — with proof. Flameshot is my go-to for quick, clean, and annotated screenshots. It’s open source, lightweight, and makes it super easy to capture and highlight exactly what you need. Bonus: it’s great for writing documentation or bug reports too.&lt;/p&gt;




&lt;h2&gt;
  
  
  ☁️ &lt;a href="https://www.localstack.cloud/" rel="noopener noreferrer"&gt;LocalStack&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;LocalStack is a lifesaver when working with AWS services locally. It emulates cloud services like Lambda, S3, DynamoDB, and more — all in a single container. I use it to test my AWS-based applications without ever leaving my laptop or racking up a cloud bill. It’s especially helpful when experimenting with Terraform or CDK setups in a controlled environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  🗑️ &lt;a href="https://github.com/andreafrancia/trash-cli" rel="noopener noreferrer"&gt;trash-cli&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;If you’re someone like me who runs &lt;code&gt;rm&lt;/code&gt; a bit too recklessly, trash-cli can be a real lifesaver.&lt;/p&gt;

&lt;p&gt;Instead of permanently deleting files, &lt;code&gt;trash&lt;/code&gt; sends them to your system’s trash can, while recording the original path, deletion date, and permissions. It works seamlessly with desktop environments like KDE, GNOME, and XFCE, but you can use it straight from the terminal or in your scripts.&lt;/p&gt;

&lt;p&gt;It’s basically a safety net for your command line — because we’ve all deleted something we shouldn’t have.&lt;/p&gt;




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

&lt;p&gt;At the end of the day, tools are just tools — what really matters is how well they fit into your workflow. These are the ones that make my life a little easier, a little faster, and a lot more fun. If you use any cool tools I should try, drop them in the comments — always down to discover new stuff!&lt;/p&gt;

&lt;p&gt;Let me know in the comments what kinda tools you use in your daily life to increase your productivity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect with Me
&lt;/h2&gt;

&lt;p&gt;If you liked this post or want to geek out about productivity, dev tools, or anything tech, feel free to connect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/bhoomit-ganatra/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/bhumit070" rel="noopener noreferrer"&gt;Twitter / X&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Exploring the Hidden Gems of HTML: 11 Lesser-Known Tags You Should Know</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Sun, 18 Aug 2024 05:17:49 +0000</pubDate>
      <link>https://dev.to/bhumit070/exploring-the-hidden-gems-of-html-11-lesser-known-tags-you-should-know-54cl</link>
      <guid>https://dev.to/bhumit070/exploring-the-hidden-gems-of-html-11-lesser-known-tags-you-should-know-54cl</guid>
      <description>&lt;p&gt;HTML is an incredible markup language that forms the backbone of web development. Despite its simplicity and lack of strict syntax rules like semicolons, HTML is a great starting point for anyone learning to code. It introduces concepts of proper syntax and logic, laying the groundwork for more advanced programming languages.&lt;/p&gt;

&lt;p&gt;In the world of web development, HTML can be thought of as the skeleton that holds everything together. JavaScript serves as the organs that make the webpage functional, while CSS is the outer appearance, adding style and visual appeal. HTML's elements, or tags, tell the browser what each part of the page should do. For example, headings are marked with &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt;, paragraphs with &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;, and containers with &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;While many are familiar with basic HTML tags, there are some lesser-known tags that can significantly enhance your web pages. Let's explore 10 of these hidden gems, complete with code demos.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. &lt;code&gt;&amp;lt;abbr&amp;gt;&lt;/code&gt; Tag: The Abbreviation Assistant
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;abbr&amp;gt;&lt;/code&gt; tag is perfect for displaying the meaning of acronyms or abbreviations. By wrapping an acronym in the &lt;code&gt;&amp;lt;abbr&amp;gt;&lt;/code&gt; tag and adding a &lt;code&gt;title&lt;/code&gt; attribute, you can provide additional information when users hover over the abbreviation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;The &lt;span class="nt"&gt;&amp;lt;abbr&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"HyperText Markup Language"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;HTML&lt;span class="nt"&gt;&amp;lt;/abbr&amp;gt;&lt;/span&gt; is the standard markup language for creating web pages.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you hover over "HTML," a tooltip will display "HyperText Markup Language."&lt;/p&gt;

&lt;h4&gt;
  
  
  2. &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; Tag: Displaying Code Snippets
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; tag is your go-to for displaying code blocks on a webpage. It automatically displays text in a monospace font, making your code snippets clear and distinct.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;To print "Hello, World!" in Python, use the following code:&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;code&amp;gt;&lt;/span&gt;print("Hello, World!")&lt;span class="nt"&gt;&amp;lt;/code&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will display the Python code snippet in a monospace font.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. &lt;code&gt;&amp;lt;kbd&amp;gt;&lt;/code&gt; Tag: Keyboard Input Display
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;kbd&amp;gt;&lt;/code&gt; tag is used to display keyboard inputs. Wrapping keyboard keys in the &lt;code&gt;&amp;lt;kbd&amp;gt;&lt;/code&gt; tag will display them in a monospace font, giving them the appearance of keyboard buttons.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;To save your work, press &lt;span class="nt"&gt;&amp;lt;kbd&amp;gt;&lt;/span&gt;Ctrl&lt;span class="nt"&gt;&amp;lt;/kbd&amp;gt;&lt;/span&gt; + &lt;span class="nt"&gt;&amp;lt;kbd&amp;gt;&lt;/span&gt;S&lt;span class="nt"&gt;&amp;lt;/kbd&amp;gt;&lt;/span&gt;.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will show "Ctrl + S" as if they are keyboard buttons.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. &lt;code&gt;&amp;lt;datalist&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; Tags: Interactive Input Suggestions
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;datalist&amp;gt;&lt;/code&gt; tag, combined with the &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; tag, allows you to create input fields with interactive suggestions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"color"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Choose a color:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;list=&lt;/span&gt;&lt;span class="s"&gt;"colors"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"color"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"color"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;datalist&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"colors"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"Red"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"Green"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"Blue"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"Yellow"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"Black"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/datalist&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you start typing in the input field, a list of color options will appear.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; Tag: Quick and Easy Pop-ups
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; tag provides a straightforward way to create modals or pop-ups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dialog&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"myDialog"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is a simple dialog box.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"document.getElementById('myDialog').close()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Close&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dialog&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"document.getElementById('myDialog').showModal()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Open Dialog&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clicking the "Open Dialog" button will show the dialog box, and the "Close" button will close it.&lt;/p&gt;

&lt;h4&gt;
  
  
  6. &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;summary&amp;gt;&lt;/code&gt; Tags: Native Dropdowns
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;summary&amp;gt;&lt;/code&gt; tags are perfect for creating native dropdown menus without the need for CSS or JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;details&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;More Information&lt;span class="nt"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is additional information that is hidden by default.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/details&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clicking "More Information" will reveal the hidden content.&lt;/p&gt;

&lt;h4&gt;
  
  
  7. &lt;code&gt;&amp;lt;time&amp;gt;&lt;/code&gt; Tag: SEO-Friendly Time Representation
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;time&amp;gt;&lt;/code&gt; tag helps search engines read time values, which can improve your website's SEO.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;The event will take place on &lt;span class="nt"&gt;&amp;lt;time&lt;/span&gt; &lt;span class="na"&gt;datetime=&lt;/span&gt;&lt;span class="s"&gt;"2024-12-25"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;December 25th, 2024&lt;span class="nt"&gt;&amp;lt;/time&amp;gt;&lt;/span&gt;.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will display "December 25th, 2024" as readable text, but search engines will recognize it as a date.&lt;/p&gt;

&lt;h4&gt;
  
  
  8. &lt;code&gt;&amp;lt;ruby&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;rt&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;rp&amp;gt;&lt;/code&gt; Tags: Ruby Notation
&lt;/h4&gt;

&lt;p&gt;Ruby notation can be achieved with the &lt;code&gt;&amp;lt;ruby&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;rt&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;rp&amp;gt;&lt;/code&gt; tags, useful for adding annotations to text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;ruby&amp;gt;&lt;/span&gt;明日&lt;span class="nt"&gt;&amp;lt;rt&amp;gt;&lt;/span&gt;Ashita&lt;span class="nt"&gt;&amp;lt;/rt&amp;gt;&amp;lt;/ruby&amp;gt;&lt;/span&gt; means "tomorrow" in Japanese.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will display "明日" with "Ashita" as a small annotation above it.&lt;/p&gt;

&lt;h4&gt;
  
  
  9. &lt;code&gt;&amp;lt;progress&amp;gt;&lt;/code&gt; Tag: Simple Progress Bars
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;progress&amp;gt;&lt;/code&gt; tag is an easy way to create progress bars without writing any CSS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"file"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;File upload progress:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;progress&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"file"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"32"&lt;/span&gt; &lt;span class="na"&gt;max=&lt;/span&gt;&lt;span class="s"&gt;"100"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;32%&lt;span class="nt"&gt;&amp;lt;/progress&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will display a progress bar showing 32% completion.&lt;/p&gt;

&lt;h4&gt;
  
  
  10. &lt;code&gt;&amp;lt;meter&amp;gt;&lt;/code&gt; Tag: Scalable Value Representation
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;meter&amp;gt;&lt;/code&gt; tag represents a scalar measurement, such as a score or rating.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Test score:&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meter&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"0.6"&lt;/span&gt; &lt;span class="na"&gt;min=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;max=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="na"&gt;low=&lt;/span&gt;&lt;span class="s"&gt;"0.3"&lt;/span&gt; &lt;span class="na"&gt;high=&lt;/span&gt;&lt;span class="s"&gt;"0.8"&lt;/span&gt; &lt;span class="na"&gt;optimum=&lt;/span&gt;&lt;span class="s"&gt;"0.7"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;60%&lt;span class="nt"&gt;&amp;lt;/meter&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will display a meter bar, which adjusts its color based on the value.&lt;/p&gt;

&lt;h4&gt;
  
  
  11. &lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;legend&amp;gt;&lt;/code&gt; Tags: Grouping Form Elements
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;legend&amp;gt;&lt;/code&gt; tags provide a simple way to group related form elements together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;fieldset&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;legend&amp;gt;&lt;/span&gt;Personal Information&lt;span class="nt"&gt;&amp;lt;/legend&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Name:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Email:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/fieldset&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will display a box labeled "Personal Information" containing the form fields.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;These lesser-known HTML tags can add a new level of functionality and accessibility to your web pages. Whether you're creating dropdowns, displaying code snippets, or enhancing form fields, these tags offer a range of possibilities without the need for extra CSS or JavaScript. Experiment with them, and you might find yourself incorporating them into your regular web development practices.&lt;/p&gt;

&lt;p&gt;If you found this blog helpful, be sure to share it with others and stay tuned for more tips on programming, web development, and the journey of learning to code.&lt;/p&gt;

&lt;p&gt;Inspiration for this blog : &lt;a href="https://www.youtube.com/watch?v=VkWJQe_EsjQ" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=VkWJQe_EsjQ&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Your comprehensive guide to shell scripting</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Fri, 02 Aug 2024 07:06:45 +0000</pubDate>
      <link>https://dev.to/bhumit070/your-comprehensive-guide-to-shell-scripting-874</link>
      <guid>https://dev.to/bhumit070/your-comprehensive-guide-to-shell-scripting-874</guid>
      <description>&lt;p&gt;Have you ever wondered what shell scripting is and why it’s so important? When building a website or mobile application, writing code is essential to make it function. But what if you need to automate repetitive tasks on your system? This is where shell scripting comes in handy. By writing a shell script, you can automate various tasks, saving time and effort, and making your workflow more efficient.&lt;/p&gt;

&lt;p&gt;And do you know what according to &lt;a href="https://survey.stackoverflow.co/2024/technology#most-popular-technologies-language" rel="noopener noreferrer"&gt;stackoverflow survey&lt;/a&gt; shell scripting is used more than java? yes, in a professional level too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fm17ztosldyidguewbocj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fm17ztosldyidguewbocj.png" alt="survey results" width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
Your comprehensive guide to shell scripting

&lt;ul&gt;
&lt;li&gt;Table of contents&lt;/li&gt;
&lt;li&gt;What is shell script?&lt;/li&gt;
&lt;li&gt;Structure of shell script&lt;/li&gt;
&lt;li&gt;Header&lt;/li&gt;
&lt;li&gt;Script&lt;/li&gt;
&lt;li&gt;How to create shell script?&lt;/li&gt;
&lt;li&gt;Let's create a simple shell script&lt;/li&gt;
&lt;li&gt;Hello world in shell script&lt;/li&gt;
&lt;li&gt;Running shell script 🏃&lt;/li&gt;
&lt;li&gt;Defining variables in shell script&lt;/li&gt;
&lt;li&gt;Passing arguments to shell script 🔑&lt;/li&gt;
&lt;li&gt;Using Variables in shell script 🔄&lt;/li&gt;
&lt;li&gt;Conditions in shell script 🔎&lt;/li&gt;
&lt;li&gt;Loops 🔁&lt;/li&gt;
&lt;li&gt;Functions 🔨&lt;/li&gt;
&lt;li&gt;Debugging the shell script&lt;/li&gt;
&lt;li&gt;Note&lt;/li&gt;
&lt;li&gt;Arrays in shell script&lt;/li&gt;
&lt;li&gt;Importing files in shell script&lt;/li&gt;
&lt;li&gt;Wrapping up 🎉&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is shell script?
&lt;/h2&gt;

&lt;p&gt;Shell script is a scripting language ( programming language) that can be used to automate task in you system via command line interface.&lt;/p&gt;

&lt;p&gt;So let's start learning shell scripting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Structure of shell script
&lt;/h2&gt;

&lt;p&gt;Every shell script has 2 parts&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Header&lt;/li&gt;
&lt;li&gt;Script&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Header
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In header we define in which shell the script should be executed. like &lt;code&gt;sh&lt;/code&gt;, &lt;code&gt;bash&lt;/code&gt;, &lt;code&gt;fish&lt;/code&gt; or any other &lt;a href="https://simple.wikipedia.org/wiki/Unix_shell#:~:text=command%2Dline%20interpreter%20for%20Unix,ls%20to%20list%20files" rel="noopener noreferrer"&gt;shell&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The header is optional, but it is recommended to use it.&lt;/li&gt;
&lt;li&gt;If you do not defined header, it will be default to the default shell of the operating system in which the script is executed.&lt;/li&gt;
&lt;li&gt;To know which shell is default in the system, type &lt;code&gt;echo $SHELL&lt;/code&gt; in your terminal.&lt;/li&gt;
&lt;li&gt;To define header, the syntax is as below.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;#!/bin/sh&lt;/code&gt; is the header.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;#!&lt;/code&gt; is called &lt;a href="https://en.wikipedia.org/wiki/Shebang_(Unix)" rel="noopener noreferrer"&gt;shebang&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;and &lt;code&gt;/bin/sh&lt;/code&gt; where shell is located, most probably all the shells are located in &lt;code&gt;/bin&lt;/code&gt; directory, unless you are unlucky enough to work on some tricky system.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Script
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The script is bunch commands that you want to execute line by line.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to create shell script?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;When you work with languages like &lt;code&gt;javascript&lt;/code&gt;, &lt;code&gt;python&lt;/code&gt; or &lt;code&gt;java&lt;/code&gt;, you can write a script and save it in a file like &lt;code&gt;script.js&lt;/code&gt;, &lt;code&gt;script.py&lt;/code&gt; or &lt;code&gt;script.java&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Same as above, shell script has extension &lt;code&gt;.sh&lt;/code&gt; and you can write your script in it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Let's create a simple shell script
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open your terminal and type &lt;code&gt;touch script.sh&lt;/code&gt; to create a file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F8hpubr8emwqubzzhhrrj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F8hpubr8emwqubzzhhrrj.png" alt="create script.sh" width="800" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It will create a file called &lt;code&gt;script.sh&lt;/code&gt; in your current directory.&lt;/li&gt;
&lt;li&gt;Now open the favorite editor and we will write some script to execute in terminal, I use &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;vscode&lt;/a&gt;, you can use any editor of your choice.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hello world in shell script
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Let's print hello world in terminal.&lt;/li&gt;
&lt;li&gt;Just type &lt;code&gt;echo hello world&lt;/code&gt; in the file you have created and save it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Running shell script 🏃
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Now you might be wondering how to run this script?&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Your shell can run this script by typing &lt;code&gt;./script.sh&lt;/code&gt; in your terminal, as shown below.&lt;br&gt;
&lt;a href="https://media2.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%2Fbza0jsad25drs8wms1lf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fbza0jsad25drs8wms1lf.png" alt="run script.sh" width="800" height="160"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you might get an error like &lt;code&gt;permission denied: ./script.sh&lt;/code&gt;, because by default shell scripts are not executable, we need to make it executable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To make it executable type &lt;code&gt;chmod +x ./script.sh&lt;/code&gt; in the terminal.&lt;br&gt;
&lt;a href="https://media2.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%2Fugmtg3bkwevbsrfyw938.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fugmtg3bkwevbsrfyw938.png" alt=" " width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you can run the script by typing &lt;code&gt;./script.sh&lt;/code&gt; in the terminal, and you will get the output as hello world.&lt;br&gt;
&lt;a href="https://media2.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%2F1wmaxmq7denlp2eo6v0p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F1wmaxmq7denlp2eo6v0p.png" alt="running script.sh" width="800" height="126"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Defining variables in shell script
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Same as other programming languages, shell script also has variables.&lt;/li&gt;
&lt;li&gt;To define a variable see the syntax below.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;

&lt;span class="c"&gt;# define variables&lt;/span&gt;
&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Bhoomit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To access the variable, we use &lt;code&gt;$&lt;/code&gt; and the name of the variable.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;

&lt;span class="c"&gt;# define variables&lt;/span&gt;
&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Bhoomit"&lt;/span&gt;

&lt;span class="c"&gt;# access variables&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$name&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;It will print &lt;code&gt;Bhoomit&lt;/code&gt; in the terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Passing arguments to shell script 🔑
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Now let's pass some input to the script.&lt;/li&gt;
&lt;li&gt;This input is known as arguments.&lt;/li&gt;
&lt;li&gt;To pass arguments to the script, type &lt;code&gt;./script.sh message1&lt;/code&gt; in the terminal.&lt;/li&gt;
&lt;li&gt;And to access the arguments in the script we can use $1 and $2 and so on.&lt;/li&gt;
&lt;li&gt;We do not have named arguments in shell script, so we use $1 and so on ( we will also use this in next section as well).&lt;/li&gt;
&lt;li&gt;To accept arguments in shell script, we need to define the arguments in the header of the script.&lt;/li&gt;
&lt;li&gt;The syntax is as below.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="c"&gt;# define arguments&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$1&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;p&gt;This will print the first argument in the terminal.&lt;br&gt;
&lt;a href="https://media2.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%2Fa5yhcojdvyshtvh6et5p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fa5yhcojdvyshtvh6et5p.png" alt="variable output" width="800" height="148"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If we need to pass something like &lt;code&gt;hello world&lt;/code&gt; as an argument, we need to wrap it in quotes, else it will be treated as multiple arguments.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Using Variables in shell script 🔄
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Now we know that we can pass input to the script, let's store them in variable and print the variables.&lt;/li&gt;
&lt;li&gt;To define variable the syntax is as below.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="nv"&gt;message&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$message&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;This will print the first argument in the terminal.&lt;/li&gt;
&lt;li&gt;We can also use this variable in string, like string interpolation.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Message is &lt;/span&gt;&lt;span class="nv"&gt;$message&lt;/span&gt;&lt;span class="s2"&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;Make sure to use double quotes in the string interpolation, else it will print the variable as it is.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conditions in shell script 🔎
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Now that we know we can pass arguments and store them in variable, now let's check if passed argument is valid or not, but using if else condition.&lt;/li&gt;
&lt;li&gt;The syntax for if else condition is as below.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; CONDITION &lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;then
    &lt;/span&gt;CODE TO BE EXECUTED IF CONDITION IS TRUE
&lt;span class="k"&gt;else 
    &lt;/span&gt;CODE TO BE EXECUTED IF CONDITION IS FALSE
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In some places use will see &lt;code&gt;[[ CONDITION ]]&lt;/code&gt; instead of &lt;code&gt;[ CONDITION ]&lt;/code&gt;, it also works but if you wish to improve portability of scripts use single square brackets, as these are inbuilt and older than &lt;code&gt;[[&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now let's check if passed arguments in the script is empty or not, check the code below.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="nv"&gt;message&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="nv"&gt;$message&lt;/span&gt; &lt;span class="o"&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;"Invalid message!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;else
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Message is &lt;/span&gt;&lt;span class="nv"&gt;$message&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In above code the &lt;code&gt;-z&lt;/code&gt; operator is used to check if the variable is empty or not, there are many more like &lt;code&gt;-n&lt;/code&gt;, &lt;code&gt;-eq&lt;/code&gt;, &lt;code&gt;-ne&lt;/code&gt;, &lt;code&gt;-lt&lt;/code&gt;, &lt;code&gt;-le&lt;/code&gt;, &lt;code&gt;-gt&lt;/code&gt;, &lt;code&gt;-ge&lt;/code&gt; and so on.&lt;/li&gt;
&lt;li&gt;I have created a &lt;a href="https://gist.github.com/bhumit070/707c5225eab7728631537e954a4bd439" rel="noopener noreferrer"&gt;github gist&lt;/a&gt; for common operators in shell scripting.&lt;/li&gt;
&lt;li&gt;Now I will leave it on you to search for how to use &lt;code&gt;else if&lt;/code&gt; and &lt;code&gt;switch case&lt;/code&gt; in shell scripting.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Loops 🔁
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Sometimes in shell script we need to perform some simple task multiple times, and at that time loops can be your friend.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There are 4 types of loops in shell scripting.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;While&lt;/li&gt;
&lt;li&gt;For&lt;/li&gt;
&lt;li&gt;Until&lt;/li&gt;
&lt;li&gt;Select&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each loop has it's own syntax but the structure remains same&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;LOOP_NAME CONDITION
&lt;span class="k"&gt;do
    &lt;/span&gt;CODE TO BE EXECUTEED
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now let's see the example of for loop.
&lt;/li&gt;
&lt;/ul&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="k"&gt;for &lt;/span&gt;file &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;/&lt;span class="k"&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;"Processing file: &lt;/span&gt;&lt;span class="nv"&gt;$file&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In above example we are looping through all the files in the current directory and printing the file name.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;$PWD&lt;/code&gt; is a shell built-in variable that holds the current working directory.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;*&lt;/code&gt; is a wildcard that matches any sequence of characters.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;do&lt;/code&gt; keyword is used to start the loop and &lt;code&gt;done&lt;/code&gt; is used to end the loop.&lt;/li&gt;
&lt;li&gt;We can also use &lt;code&gt;break&lt;/code&gt; keyword to exit the loop and &lt;code&gt;continue&lt;/code&gt; keyword to skip the current iteration.&lt;/li&gt;
&lt;li&gt;Here is example of that in for loop.
&lt;/li&gt;
&lt;/ul&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="k"&gt;for &lt;/span&gt;file &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;do
    if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nv"&gt;$file&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="s2"&gt;".skip"&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        continue&lt;/span&gt;  &lt;span class="c"&gt;# Skip files with ".skip" extension&lt;/span&gt;
    &lt;span class="k"&gt;fi

    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Processing file: &lt;/span&gt;&lt;span class="nv"&gt;$file&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nv"&gt;$file&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="s2"&gt;".stop"&lt;/span&gt; &lt;span class="o"&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;break&lt;/span&gt;  &lt;span class="c"&gt;# Stop processing if file has ".stop" extension&lt;/span&gt;
    &lt;span class="k"&gt;fi
done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;I have created a &lt;a href="https://gist.github.com/bhumit070/6285ed8cdbadf82a36b1d40d8161f2fc" rel="noopener noreferrer"&gt;github gist&lt;/a&gt; for other loop examples in shell scripting.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Functions 🔨
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Functions are way to reuse code all the programming languages, now let's see how we can create a function in shell scripting.
&lt;/li&gt;
&lt;/ul&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;# Define a function&lt;/span&gt;

greet&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello, How are you?"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In above example we have defined a function named &lt;code&gt;greet&lt;/code&gt; that prints &lt;code&gt;Hello, How are you?&lt;/code&gt; in the terminal.&lt;/li&gt;
&lt;li&gt;In shell scripting we do not have to write &lt;code&gt;function&lt;/code&gt; keyword or &lt;code&gt;def&lt;/code&gt; or something else to defined it as a function.&lt;/li&gt;
&lt;li&gt;Now to call the function we use &lt;code&gt;function name&lt;/code&gt; to call the function as shown below.
&lt;/li&gt;
&lt;/ul&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;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now when you will build real shell script, you might be wondering how to pass arguments to the function? Well we can pass arguments to the function in the same way we pass arguments to the script.&lt;/li&gt;
&lt;li&gt;To pass arguments to the function we use &lt;code&gt;$1&lt;/code&gt;, &lt;code&gt;$2&lt;/code&gt; and so on.&lt;/li&gt;
&lt;li&gt;Let's see how we can achieve this in the script.
&lt;/li&gt;
&lt;/ul&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;

greet&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;message&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="nv"&gt;$message&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nv"&gt;message&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"How are you?"&lt;/span&gt;
    &lt;span class="k"&gt;fi

    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello, &lt;/span&gt;&lt;span class="nv"&gt;$message&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

greet &lt;span class="s2"&gt;"Bhoomit"&lt;/span&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now if you pass arguments to the function, &lt;code&gt;greet "Bhoomit"&lt;/code&gt; it will print as expected.&lt;/li&gt;
&lt;li&gt;But what if we want to pass arguments to the function via script?, we can't be doing &lt;code&gt;greet $1 $2&lt;/code&gt; and so on, it is tedious and error prone.&lt;/li&gt;
&lt;li&gt;To overcome this problem we can use we can call function like this &lt;code&gt;greet "$@"&lt;/code&gt; and it will pass all the arguments to the function.&lt;/li&gt;
&lt;li&gt;Now the one more issue you might encounter is if you define message variable in the function, it will be accessible in the function and outside the function.&lt;/li&gt;
&lt;li&gt;To solve this issue we can use &lt;code&gt;local&lt;/code&gt; in front of the variable so it will be local to the function only.
&lt;/li&gt;
&lt;/ul&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;

localVariables&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;local &lt;/span&gt;&lt;span class="nv"&gt;message&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;

    &lt;span class="c"&gt;# other code&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Note: If you use &lt;code&gt;local&lt;/code&gt; outside function body, it will give error.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Debugging the shell script
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Sometimes the code is against us, and does not work as expected, nah it's not code never lies, and it would be some mistake in the code, but how do we debug that?&lt;/li&gt;
&lt;li&gt;To debug the shell script you can use &lt;code&gt;echo&lt;/code&gt; statement to print but the funny thing is that the shell script will continue to execute even if it encounters an error.&lt;/li&gt;
&lt;li&gt;To debug the shell script we can use &lt;code&gt;set -x&lt;/code&gt; to print the commands before executing them.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It will show you how the script is executing and what is the output of the commands, something like this.&lt;br&gt;
&lt;a href="https://media2.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%2F96a3gwxm839ofz6pqn34.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F96a3gwxm839ofz6pqn34.png" alt="debugging shell script" width="800" height="197"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now that's cool but what if we want to terminate the script on error?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Well we can use &lt;code&gt;set -e&lt;/code&gt; to terminate the script on error.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It will show you the error and exit the script.&lt;br&gt;
&lt;a href="https://media2.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%2F6xt8pblzly4a3ni4sro9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F6xt8pblzly4a3ni4sro9.png" alt="stop on error" width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It will stop on error but it will not stop if it encounters an undefined variable, to stop this on undefined variable we can use &lt;code&gt;set -u&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Note: There can be many ways you can shoot yourself in the foot, so I highly recommend to use &lt;code&gt;set -u&lt;/code&gt;, because sometimes undefined variables can make a lot of mess.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check this &lt;a href="https://github.com/ValveSoftware/steam-for-linux/issues/3671#issuecomment-70161790" rel="noopener noreferrer"&gt;github issue&lt;/a&gt; Where steam tries to delete everything on system due to undefined variable.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Note
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The above things are more than enough to do shell scripting.&lt;/li&gt;
&lt;li&gt;And if you are using below features of shell script, I would highly recommend to move to any other language to perform the tasks like &lt;code&gt;js&lt;/code&gt;, &lt;code&gt;python&lt;/code&gt; or &lt;code&gt;golang&lt;/code&gt; or any other language of your choice.&lt;/li&gt;
&lt;li&gt;Unless you are working on some tricky system, where only shell scripting can be used, or you are maintaining &lt;a href="https://github.com/bhumit070/dotfiles" rel="noopener noreferrer"&gt;dotfiles like me&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Arrays in shell script
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Same as other programming languages, in shell script we can also use arrays.&lt;/li&gt;
&lt;li&gt;To define an array in shell script the syntax is as below.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;

&lt;span class="c"&gt;# define array&lt;/span&gt;
&lt;span class="nv"&gt;array&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;&lt;span class="s2"&gt;"January"&lt;/span&gt; &lt;span class="s2"&gt;"February"&lt;/span&gt; &lt;span class="s2"&gt;"March"&lt;/span&gt; &lt;span class="s2"&gt;"April"&lt;/span&gt; &lt;span class="s2"&gt;"May"&lt;/span&gt; &lt;span class="s2"&gt;"June"&lt;/span&gt; &lt;span class="s2"&gt;"July"&lt;/span&gt; &lt;span class="s2"&gt;"August"&lt;/span&gt; &lt;span class="s2"&gt;"September"&lt;/span&gt; &lt;span class="s2"&gt;"October"&lt;/span&gt; &lt;span class="s2"&gt;"November"&lt;/span&gt; &lt;span class="s2"&gt;"December"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# access array&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;array&lt;/span&gt;&lt;span class="p"&gt;[0]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To access the array we use &lt;code&gt;${array[index]}&lt;/code&gt; and the index of the array.&lt;/li&gt;
&lt;li&gt;Also we can use &lt;code&gt;${array[@]}&lt;/code&gt; to access all the elements of the array, and it will print all the elements in the terminal.&lt;/li&gt;
&lt;li&gt;We can also use &lt;code&gt;for&lt;/code&gt; loop to iterate through the array.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;

&lt;span class="c"&gt;# define array&lt;/span&gt;
&lt;span class="nv"&gt;array&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;&lt;span class="s2"&gt;"January"&lt;/span&gt; &lt;span class="s2"&gt;"February"&lt;/span&gt; &lt;span class="s2"&gt;"March"&lt;/span&gt; &lt;span class="s2"&gt;"April"&lt;/span&gt; &lt;span class="s2"&gt;"May"&lt;/span&gt; &lt;span class="s2"&gt;"June"&lt;/span&gt; &lt;span class="s2"&gt;"July"&lt;/span&gt; &lt;span class="s2"&gt;"August"&lt;/span&gt; &lt;span class="s2"&gt;"September"&lt;/span&gt; &lt;span class="s2"&gt;"October"&lt;/span&gt; &lt;span class="s2"&gt;"November"&lt;/span&gt; &lt;span class="s2"&gt;"December"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# loop through array&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;element &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;array&lt;/span&gt;&lt;span class="p"&gt;[@]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&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="nv"&gt;$element&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Importing files in shell script
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Now it is common to split the code in multiple files and import them in the main script.&lt;/li&gt;
&lt;li&gt;Let's say we have multiple files like this.

&lt;ul&gt;
&lt;li&gt;script.sh&lt;/li&gt;
&lt;li&gt;functions.sh&lt;/li&gt;
&lt;li&gt;variables.sh&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;script.sh&lt;/code&gt; is main script and &lt;code&gt;functions.sh&lt;/code&gt; has functions and &lt;code&gt;variables.sh&lt;/code&gt; has variables.&lt;/li&gt;

&lt;li&gt;now to import the files we can use &lt;code&gt;source&lt;/code&gt; keyword, as shown below.
&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;

&lt;span class="c"&gt;# script.sh&lt;/span&gt;

&lt;span class="nb"&gt;source&lt;/span&gt; ./variables.sh
&lt;span class="nb"&gt;source&lt;/span&gt; ./functions.sh

functionFromFunctionsFile

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;

&lt;span class="c"&gt;# functions.sh&lt;/span&gt;

functionFromFunctionsFile&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$variableFromVariablesFile&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;

&lt;span class="c"&gt;# variables.sh&lt;/span&gt;
&lt;span class="nv"&gt;variableFromVariablesFile&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Hello, World!"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;If you run the &lt;code&gt;script.sh&lt;/code&gt;, the final output should be &lt;code&gt;Hello, World!&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping up 🎉
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Now that you have super power of shell script, just remember to use it wisely, because with great power comes great responsibility.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This is all the things that I have learned in shell scripting, and I hope you have learned something new too.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Connect with me on other platforms as well.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/bhoomit-ganatra/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/bhumit070" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/bhumit070" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>devops</category>
    </item>
    <item>
      <title>Nodejs and typescript boilerplate</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Wed, 03 Jul 2024 12:07:19 +0000</pubDate>
      <link>https://dev.to/bhumit070/nodejs-and-typescript-boilerplate-48i8</link>
      <guid>https://dev.to/bhumit070/nodejs-and-typescript-boilerplate-48i8</guid>
      <description>&lt;h1&gt;
  
  
  Node Boilerplate Typescript
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/bhumit070/node-boilerplate-ts" rel="noopener noreferrer"&gt;This repo&lt;/a&gt; is boilerplate for typescript and nodejs projects&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is included
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Server with express&lt;/li&gt;
&lt;li&gt;Security Packages

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.npmjs.com/package/hpp" rel="noopener noreferrer"&gt;hpp&lt;/a&gt; - Express middleware to protect against HTTP Parameter Pollution attacks&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.npmjs.com/package/helmet" rel="noopener noreferrer"&gt;helmet&lt;/a&gt; - Helmet helps secure Express apps by setting HTTP response headers.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;File uploading&lt;/li&gt;

&lt;li&gt;Sending Emails&lt;/li&gt;

&lt;li&gt;Logging

&lt;ul&gt;
&lt;li&gt;By default it is configured to log on console but you can extend it to write to any file as well&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Object(s) Validation using zod&lt;/li&gt;

&lt;li&gt;Error Handling&lt;/li&gt;

&lt;li&gt;Express Req object extend with typescript support&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Routing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The base path for api will be &lt;code&gt;api&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Any folder you put inside modules folder that container &lt;code&gt;routes.ts&lt;/code&gt; file will be added to express router stack and that will be route for the api as well.&lt;/li&gt;
&lt;li&gt;So suppose if you make folder something like &lt;code&gt;modules/v1/file/routes.ts&lt;/code&gt; then all the routes defined in that &lt;code&gt;routes.ts&lt;/code&gt; file will be registered and will be available at &lt;code&gt;domain/api/modules/v1/file&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;So think like routing as a file based routing.&lt;/li&gt;
&lt;li&gt;You must export router as default export from &lt;code&gt;routes.ts&lt;/code&gt; file to make this happen.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Error handling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You can alway use try catch in your controllers to handle errors by your self, but here I have used different approach.&lt;/li&gt;
&lt;li&gt;Just wrap your any controller/middleware that receives express's &lt;code&gt;req,res&lt;/code&gt; object wrap them in &lt;code&gt;PromiseHandler&lt;/code&gt; function and this will handle the rest of the stuff.&lt;/li&gt;
&lt;li&gt;Also you can create custom errors in error folder as per your requirement and handle it in &lt;code&gt;handleApiError&lt;/code&gt; according the way you want.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Exploring 40 Free APIs for Your Next Programming Project.</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Sat, 02 Mar 2024 12:25:07 +0000</pubDate>
      <link>https://dev.to/bhumit070/exploring-40-free-apis-for-your-next-programming-project-110m</link>
      <guid>https://dev.to/bhumit070/exploring-40-free-apis-for-your-next-programming-project-110m</guid>
      <description>&lt;p&gt;Are you on the hunt for free APIs to elevate your programming projects? Look no further! In this comprehensive guide, we'll delve into 40 remarkable APIs that cover a diverse range of functionalities. Whether you're a seasoned developer or just starting out, these APIs offer a wealth of opportunities to enhance your applications. Let's dive in and explore each API in detail:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unsplash API&lt;/strong&gt;: Access a vast library of high-quality stock photos to enhance your applications' visual appeal. Perfect for blog posts, social media integrations, and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;YouTube API&lt;/strong&gt;: Take control of your YouTube channel by leveraging the API to customize thumbnails, titles, and other metadata. Ideal for A/B testing and optimizing your content strategy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Family Guy API&lt;/strong&gt;: Discover where your favorite shows are available across different streaming platforms, simplifying the search for binge-worthy content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pantry API&lt;/strong&gt;: Simplify database management with this lightweight solution that allows you to store JSON data and includes a CRUD interface. Great for small-scale applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clearbit API&lt;/strong&gt;: Enhance your applications with company logos retrieved effortlessly via HTTP requests. Ideal for corporate integrations and brand recognition.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Waifu API&lt;/strong&gt;: Delve into the world of anime with this fun API that lets you create your own anime wife using endpoints like Ufi. Perfect for anime enthusiasts and meme generators.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Internet Game Database API&lt;/strong&gt;: Access comprehensive game data, including versions, genres, covers, and images, to power gaming-related applications and services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Discord API&lt;/strong&gt;: Build custom bots for Discord channels, allowing for interactive experiences and community engagement. A must-have for gaming communities and online forums.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;World News API&lt;/strong&gt;: Stay informed with up-to-date global news headlines for your applications. Note the limited request quota for the free tier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Random Data Generator API&lt;/strong&gt;: Generate realistic fake data for testing purposes without the need for an API key. Ideal for populating databases and simulating real-world scenarios.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Foreign Exchange Rates API&lt;/strong&gt;: Access accurate foreign exchange rates, including historical data, for applications requiring currency conversion functionality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Svix API&lt;/strong&gt;: Seamlessly integrate webhooks into your applications to facilitate data exchange between different services. Offers SDKs for various programming languages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Kroki API&lt;/strong&gt;: Transform text inputs into diagrams in JPEG or PNG format, perfect for visualizing data and enhancing blog posts or documentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Google Docs API&lt;/strong&gt;: Tap into the power of Google Docs by programmatically accessing and manipulating document data. Great for automating document workflows and collaboration tasks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;HTTP Status Docs API&lt;/strong&gt;: Quickly access detailed documentation for HTTP status codes, simplifying error handling and troubleshooting in your applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GeoCoding Places API&lt;/strong&gt;: Translate textual addresses into map coordinates for seamless integration with mapping services. Useful for location-based applications and services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ticketmaster API&lt;/strong&gt;: Discover and access event data, including tickets and schedules, for various entertainment events. Ideal for event discovery and ticket purchasing applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;I Love PDF API&lt;/strong&gt;: Perform various operations on PDF files, such as extraction, editing, and compression, simplifying document management tasks in your applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CloudConvert API&lt;/strong&gt;: Convert files between different formats with ease, albeit with limited usage for the free tier. Perfect for applications requiring file format conversion capabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ollama API&lt;/strong&gt;: Run large language models locally with this privacy-centric API, offering capabilities like text generation and analysis without compromising data privacy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Free Dictionary API&lt;/strong&gt;: Access dictionary definitions and word data without the need for an API key. A handy tool for language-related applications and educational projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;OpenWeather API&lt;/strong&gt;: Retrieve accurate weather data for various locations worldwide, enabling weather forecasting and analysis in your applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Alpha Vantage API&lt;/strong&gt;: Access comprehensive stock market data, including historical and real-time stock prices, for building trading bots and financial applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Yahoo Finance API&lt;/strong&gt;: Retrieve historical stock data for analysis and visualization purposes. Note that this API is accessed through the "why finance" package in Python.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deck of Cards API&lt;/strong&gt;: Integrate card-related functionalities, such as drawing cards, shuffling decks, and managing piles, into your card game applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;WordPress REST API&lt;/strong&gt;: Access and manipulate WordPress data via RESTful endpoints, enabling seamless integration with WordPress-powered websites.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Spotify API&lt;/strong&gt;: Retrieve music-related data, including artists, albums, and tracks, for building music discovery and recommendation applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Podcast Index API&lt;/strong&gt;: Access podcast metadata and transcripts for enhancing podcast discovery and analysis in your applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DeepGram API&lt;/strong&gt;: Utilize speech-to-text capabilities and audio analysis tools for processing audio content in your applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zen Quotes API&lt;/strong&gt;: Retrieve inspirational quotes for incorporating motivational features into your applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open Food Facts API&lt;/strong&gt;: Retrieve product information based on barcode inputs, facilitating food product analysis and comparison.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stripe API&lt;/strong&gt;: Accept payments and manage finances seamlessly with this popular payment processing API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Resend API&lt;/strong&gt;: Send emails effortlessly from your applications with simple integration and support for various programming languages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Trace.mo API&lt;/strong&gt;: Retrieve anime series based on frame inputs for anime-related applications and services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Favorite App API&lt;/strong&gt;: Integrate data from your favorite productivity apps to enhance workflow automation and data analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Alpaca API&lt;/strong&gt;: Create automated stock trading bots with access to comprehensive stock market data and trading functionalities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;NASA API&lt;/strong&gt;: Access a treasure trove of space-related data, including astronomy pictures, Mars weather, and observation data, for educational and research purposes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Movie DB API&lt;/strong&gt;: Retrieve movie-related data, including titles, genres, and ratings, for building movie discovery and recommendation applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DigiDates API&lt;/strong&gt;: Handle date-related functions, such as date validation and leap year checks, with ease in your applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;OpenSky Network API&lt;/strong&gt;: Track planes in real-time with access to flight data and aircraft information for aviation enthusiasts and travel-related applications.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These APIs offer a wide range of functionalities and capabilities to enhance your programming projects. Whether you're building a web application, mobile app, or automation tool, integrating these APIs can add value and functionality to your projects. So go ahead, explore, and start building amazing applications today!&lt;/p&gt;

&lt;p&gt;Reference taken from -&amp;gt; &lt;a href="https://www.youtube.com/watch?v=YHxj3LvZoLQ&amp;amp;t=183s" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=YHxj3LvZoLQ&amp;amp;t=183s&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>projects</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Streamlining JavaScript Development with PackageFlex: One-Click Copy for npm Install Commands</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Sat, 27 Jan 2024 08:55:44 +0000</pubDate>
      <link>https://dev.to/bhumit070/streamlining-javascript-development-with-packageflex-one-click-copy-for-npm-install-commands-40mg</link>
      <guid>https://dev.to/bhumit070/streamlining-javascript-development-with-packageflex-one-click-copy-for-npm-install-commands-40mg</guid>
      <description>&lt;p&gt;Hello fellow developers! Today, I'm thrilled to introduce a tool that's going to revolutionize the way you work with npm packages. Say hello to &lt;strong&gt;PackageFlex Chrome Extension&lt;/strong&gt; – your shortcut to streamlined npm install commands!&lt;/p&gt;

&lt;h3&gt;
  
  
  The Frustration
&lt;/h3&gt;

&lt;p&gt;As JavaScript developers, we've all been there. You find a fantastic npm package, and you're ready to integrate it into your project. But, oh boy, the process of copying the install command and ensuring it aligns with your preferred package manager can be a bit of a headache. &lt;/p&gt;

&lt;h3&gt;
  
  
  Introducing PackageFlex
&lt;/h3&gt;

&lt;p&gt;PackageFlex is designed with one goal in mind – to simplify the npm package management process. With this Chrome Extension, you can now copy install commands for npm, yarn, pnpm, or bun with just one click! No more toggling between documentation pages or manually adjusting commands.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;One-Click Copy:&lt;/strong&gt; Easily copy install commands for npm, yarn, pnpm, and bun with a single click, saving you time and frustration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced Experience:&lt;/strong&gt; Enjoy a streamlined npm website interface that integrates seamlessly with your preferred package manager.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexibility:&lt;/strong&gt; Whether you're a fan of npm, yarn, pnpm, or bun, PackageFlex adapts to your workflow, making it the perfect companion for every JavaScript developer.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How It Works
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Installation:&lt;/strong&gt; Get started by installing the PackageFlex Chrome Extension. Simply clone the repository or download the ZIP file, enable developer mode in Chrome, and load the extension.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt; Visit the npm website and navigate to your desired package. Look for the PackageFlex icon in your browser's toolbar. Click on the icon to open the options menu, choose your preferred package manager, and click "Copy" – it's that easy!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Before
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F2spi5jcb7gf2aloigy25.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F2spi5jcb7gf2aloigy25.webp" alt="" width="800" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  After
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Flef3sc4bt7mtitgseg2q.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Flef3sc4bt7mtitgseg2q.webp" alt="" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Ready to Try PackageFlex?
&lt;/h3&gt;

&lt;p&gt;Head over to the &lt;a href="https://github.com/bhumit070/PackageFlex" rel="noopener noreferrer"&gt;PackageFlex GitHub repository&lt;/a&gt; to explore the code, and installation instructions, and contribute to the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;PackageFlex is not just a tool; it's a game-changer for JavaScript developers looking to streamline their workflow. Try it out, share your thoughts, and let's make JavaScript development even more enjoyable together!&lt;/p&gt;

&lt;p&gt;Happy coding! 🚀💻&lt;/p&gt;

</description>
      <category>chromeextension</category>
      <category>npm</category>
      <category>yarn</category>
      <category>bunjs</category>
    </item>
    <item>
      <title>Destiny: A Tool to Manage Cluttered Folders</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Sun, 14 Jan 2024 05:21:23 +0000</pubDate>
      <link>https://dev.to/bhumit070/destiny-a-tool-to-manage-cluttered-folders-14b7</link>
      <guid>https://dev.to/bhumit070/destiny-a-tool-to-manage-cluttered-folders-14b7</guid>
      <description>&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Description&lt;/li&gt;
&lt;li&gt;
How to Use

&lt;ul&gt;
&lt;li&gt;Installation&lt;/li&gt;
&lt;li&gt;Organizing Files&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;How it Works&lt;/li&gt;

&lt;li&gt;Conclusion&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Description
&lt;/h2&gt;

&lt;p&gt;Destiny is a command line tool written in &lt;code&gt;go&lt;/code&gt; that simplifies the organization of cluttered folders. If you've ever struggled with maintaining a tidy file system, Destiny is here to make your life easier. Unlike a traditional shell script, Destiny includes checks for excluded files and provides a more manageable and user-friendly experience.&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;p&gt;If you are on macOS or Linux, use the following command to install Destiny:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://raw.githubusercontent.com/bhumit070/destiny/main/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Organizing Files
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;To organize files in the current folder, run:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;destiny
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To organize files in a specific folder, provide the folder path as an argument:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;destiny /path/to/folder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How it Works
&lt;/h2&gt;

&lt;p&gt;Destiny employs a simple yet effective approach to file organization:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;File Scan:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Destiny scans all files in the target folder.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Folder Creation:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;For each unique file extension, Destiny checks if a corresponding folder exists.
If the folder does not exist, Destiny creates a folder with the same name as the file extension.
File Movement:
Destiny moves each file to the folder associated with its file extension.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Example: If you have a file named hello.txt, Destiny creates a folder named txt (if not exists) and moves the file into it.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Destiny is a user-friendly tool that significantly improves the organization of your files. Whether you're dealing with a cluttered workspace or aiming for a more systematic approach, Destiny has got you covered. For suggestions or feedback, please create an issue on the &lt;a href="https://github.com/bhumit070/destiny" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also if you like Destiny, please star the repo.&lt;/p&gt;

</description>
      <category>go</category>
      <category>cli</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Syncing Across Tabs: The JavaScript Magic You Didn't Know Existed!</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Sat, 06 Jan 2024 13:44:09 +0000</pubDate>
      <link>https://dev.to/bhumit070/syncing-across-tabs-the-javascript-magic-you-didnt-know-existed-a84</link>
      <guid>https://dev.to/bhumit070/syncing-across-tabs-the-javascript-magic-you-didnt-know-existed-a84</guid>
      <description>&lt;p&gt;I recently discovered a fascinating feature on the &lt;a href="https://soundcloud.com/" rel="noopener noreferrer"&gt;SoundCloud&lt;/a&gt; website: the ability to seamlessly control audio playback across multiple tabs in the same browser. Intrigued by this, I delved into how it was implemented and stumbled upon a powerful tool - JavaScript's &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API" rel="noopener noreferrer"&gt;Broadcast Channel API&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Broadcast Channel API allows communication between browser tabs, making real-time updates and synchronization possible. It's supported by major browsers, making it a versatile solution for enhancing user experiences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using the Broadcast Channel API
&lt;/h2&gt;

&lt;p&gt;To implement this feature, create a &lt;code&gt;BroadcastChannel&lt;/code&gt; object with a channel name, like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;broadCast&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;BroadcastChannel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;audio-player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, you can send messages using postMessage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;broadCast&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;postMessage&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;audio-played&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;p&gt;To receive messages, subscribe to the onmessage event:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;broadCast&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onmessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&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;p&gt;This simple yet powerful API enables real-time communication between browser tabs, opening up possibilities for dynamic and synchronized user interfaces.&lt;/p&gt;

&lt;p&gt;I have created a sample demo to showcase this feature.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/bhumit070/browser_tabs_communication" rel="noopener noreferrer"&gt;Source Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bhumit070.github.io/browser_tabs_communication/" rel="noopener noreferrer"&gt;Live Demo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;The Broadcast Channel API offers a seamless solution for enhancing multi-tab support on your website. Explore this feature in your projects and unlock the potential for dynamic and synchronized user experiences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Follow me for more updates
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/bhumit070" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/bhoomit-ganatra/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Programming YouTubers I recommend</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Sun, 31 Dec 2023 10:47:30 +0000</pubDate>
      <link>https://dev.to/bhumit070/programming-youtubers-i-recommend-38e3</link>
      <guid>https://dev.to/bhumit070/programming-youtubers-i-recommend-38e3</guid>
      <description>&lt;p&gt;Some YouTube channels I follow to keep myself updated in the tech world&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For everything about tech&lt;br&gt;
1) Fireship Tech - &lt;a href="https://www.youtube.com/@Fireship" rel="noopener noreferrer"&gt;https://www.youtube.com/@Fireship&lt;/a&gt;&lt;br&gt;
2) codedamn - &lt;a href="https://www.youtube.com/@codedamn" rel="noopener noreferrer"&gt;https://www.youtube.com/@codedamn&lt;/a&gt;&lt;br&gt;
3) Theo - &lt;a href="https://www.youtube.com/@t3dotgg" rel="noopener noreferrer"&gt;https://www.youtube.com/@t3dotgg&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For typescript-related stuff&lt;br&gt;
1) Basarat Ali Syed - &lt;a href="https://www.youtube.com/@basarat" rel="noopener noreferrer"&gt;https://www.youtube.com/@basarat&lt;/a&gt;&lt;br&gt;
2) Matt Pocock - &lt;a href="https://www.youtube.com/@mattpocockuk" rel="noopener noreferrer"&gt;https://www.youtube.com/@mattpocockuk&lt;/a&gt;&lt;br&gt;
3) Andrew Burges - &lt;a href="https://www.youtube.com/@andrew-burgess" rel="noopener noreferrer"&gt;https://www.youtube.com/@andrew-burgess&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For Backend and Architecture&lt;br&gt;
1) Hussein Nasser - &lt;a href="https://www.youtube.com/@hnasr" rel="noopener noreferrer"&gt;https://www.youtube.com/@hnasr&lt;/a&gt;&lt;br&gt;
2) Arpit Bhayani - &lt;a href="https://www.youtube.com/@AsliEngineering" rel="noopener noreferrer"&gt;https://www.youtube.com/@AsliEngineering&lt;/a&gt;&lt;br&gt;
3) Gaurav Sen - &lt;a href="https://www.youtube.com/@gkcs" rel="noopener noreferrer"&gt;https://www.youtube.com/@gkcs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For SQL&lt;br&gt;
1) PlanetScale - &lt;a href="https://www.youtube.com/@PlanetScale" rel="noopener noreferrer"&gt;https://www.youtube.com/@PlanetScale&lt;/a&gt;&lt;br&gt;
2) TechTFQ - &lt;a href="https://www.youtube.com/@techTFQ" rel="noopener noreferrer"&gt;https://www.youtube.com/@techTFQ&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For NextJs&lt;br&gt;
1) Josh tried coding - &lt;a href="https://www.youtube.com/@joshtriedcoding" rel="noopener noreferrer"&gt;https://www.youtube.com/@joshtriedcoding&lt;/a&gt;&lt;br&gt;
2) Hamed Bahram - &lt;a href="https://www.youtube.com/@hamedbahram" rel="noopener noreferrer"&gt;https://www.youtube.com/@hamedbahram&lt;/a&gt;&lt;br&gt;
3) Jack 🤔 Herrington - &lt;a href="https://www.youtube.com/@jherr" rel="noopener noreferrer"&gt;https://www.youtube.com/@jherr&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For Javascript&lt;br&gt;
1) Akshay Saini 🚀 - &lt;a href="https://www.youtube.com/@akshaymarch7" rel="noopener noreferrer"&gt;https://www.youtube.com/@akshaymarch7&lt;/a&gt;&lt;br&gt;
2) Hitesh Choudhary - &lt;a href="https://www.youtube.com/@HiteshChoudharydotcom" rel="noopener noreferrer"&gt;https://www.youtube.com/@HiteshChoudharydotcom&lt;/a&gt;&lt;br&gt;
3) Chai Aur Code - &lt;a href="https://www.youtube.com/@chaiaurcode" rel="noopener noreferrer"&gt;https://www.youtube.com/@chaiaurcode&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>typescript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Say goodbye to chrome's misleading icon 🔒</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Wed, 17 May 2023 18:26:00 +0000</pubDate>
      <link>https://dev.to/bhumit070/say-goodbye-to-chromes-misleading-icon-hj2</link>
      <guid>https://dev.to/bhumit070/say-goodbye-to-chromes-misleading-icon-hj2</guid>
      <description>&lt;p&gt;Hello everyone 🙋🏼‍♂️,&lt;br&gt;
In this article, I will talk about google chrome's misleading icons which can be seen 👀 in the URL bar which is this 👉 🔒&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Why I think this is the best move by Google and should have been done very early.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you might be wondering what's your problem with the padlock it indicates that the website is secure and has https.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F2iocduin9ir36pmgay6x.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F2iocduin9ir36pmgay6x.gif" alt="what's your problem" width="498" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Well my dear friend let me tell you that, that icon is misleading, in many articles I have seen that, people say &lt;br&gt;
if you want to stay away from fake and phishing sites and want your data to be protected check that lock icon on the browser, if it shows a lock icon it means that website is safe to use and you can enter your details there&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;but what they don't know is even though that lock is shown it is not guaranteed that website is secure for you and you can not assume that your data will be protected &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Now you might be wondering what&lt;/strong&gt;.....?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fuathoiqdzfymy4yimh07.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fuathoiqdzfymy4yimh07.gif" alt=" " width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By many articles and youtuber videos, you might be told that sites that shows lock icons are safe, well that's true but not 100% it can be just a little, because when you see that lock icon on the address bar it just indicates that no one can read the data between you and the website &lt;br&gt;
but no one knows what is on the website&lt;/p&gt;

&lt;p&gt;so no one can meddle in between which is also known as man in the middle attack but once data reaches the site it is in the developer's hand how the developer keeps it&lt;/p&gt;

&lt;p&gt;so let's just say I made a phishing site ( which I don't but let's just assume ) that looks exactly the same as Facebook now I share that site with you, you just check that website has a lock icon and enter your Facebook login and the password voila now I have access to your Facebook login and password 😈&lt;/p&gt;

&lt;p&gt;but you might say then how did you get the lock icon, the answer is I got it for free, yes you heard it right, as a developer I can deploy my site on a 5$ machine on the internet and get that lock icon for my site for just free.&lt;/p&gt;

&lt;p&gt;Thus, this lock icon does not always means that the website is safe and secure.&lt;/p&gt;

&lt;p&gt;So now you might be wondering how can I check the authenticity of that website.&lt;/p&gt;

&lt;p&gt;Hmm....,&lt;br&gt;
Here are a few steps which you can check to ensure the authenticity of that website.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Check for domain name - remember the Facebook example I gave before - I do not own a Facebook domain but if it is a phishing site then it might have a domain like &lt;strong&gt;faceebook.com&lt;/strong&gt; or &lt;strong&gt;faceboook.com&lt;/strong&gt; which is hard to see, but you can check if you just pay little more attention&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Often we become victims of these spam sites because we are getting something that is too good to be true like 90%off on iPhone or some expensive things which we are getting for pennies, just remember on the internet there is nothing too good to be true (or it is just too hard to find these kinds of things.) at that time you can check for domain name age by going to who. is's website and you can also check other people's reviews online&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can read more about it here on &lt;a href="https://blog.chromium.org/2023/05/an-update-on-lock-icon.html" rel="noopener noreferrer"&gt;chromium's blog.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To conclude, the presence of a lock icon does not guarantee the security of a website. It's essential to adopt a comprehensive approach to ensure your online safety. Pay attention to the domain name, be cautious of suspicious offers, and utilize additional security indicators such as trust seals, certifications, and reputable reviews.&lt;/p&gt;

&lt;p&gt;By being vigilant and practicing these steps, you can protect yourself from falling victim to phishing attacks&lt;/p&gt;

&lt;p&gt;Connect with me on other platforms&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/bhoomit-ganatra" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/bhumit070" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/bhumit070" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>google</category>
      <category>chrome</category>
    </item>
    <item>
      <title>Deep Link Nightmare 💀</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Wed, 26 Apr 2023 17:56:00 +0000</pubDate>
      <link>https://dev.to/bhumit070/deep-link-nighmare-49ig</link>
      <guid>https://dev.to/bhumit070/deep-link-nighmare-49ig</guid>
      <description>&lt;p&gt;Have you ever experienced a technology nightmare that left you frustrated and disappointed? Well, let me tell you about my worst experience with Firebase deep link and Instagram webview. It all started when I was trying to implement deep linking into my app, and little did I know the rollercoaster ride that awaited me. As I delved deeper, I found myself stuck in a maze of errors and bugs that seemed never-ending. And just when I thought it couldn't get any worse, Instagram webview decided to join the party. In this article, I'll share my story of how this seemingly simple task turned into a nightmare that lasted for weeks.&lt;/p&gt;

&lt;p&gt;At first glance, my client's requirements seemed pretty straightforward. They wanted their app to have a specific page with a deep link, and when the user clicked on that deep link, the app would open directly to that page. As an experienced developer, I was confident that I could easily implement this feature using Firebase deep links.&lt;/p&gt;

&lt;p&gt;I started by creating the deep link URL and testing it on my device. Everything seemed to be working as expected, simple right&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F0ck2laukacom81tqjqrg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F0ck2laukacom81tqjqrg.png" alt="it's simple right" width="480" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just when I thought I was done with the deep link feature, my client contacted me again with a new requirement. They wanted to track the number of clicks on the deep link and have the data available only in the admin panel.&lt;/p&gt;

&lt;p&gt;I thought I will give firebase a deep link and firebase will provide me statistics with link clicks app opens and what not but as you know expectations always hurts&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ffkuib4nvgwjvh6pyfm1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ffkuib4nvgwjvh6pyfm1w.png" alt="expectations hurts" width="220" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is not way firebase gives that information to us because these links are generated dynamically from my backend.&lt;/p&gt;

&lt;p&gt;So I started thinking about alternate solution so I came with an idea that the user will be first redirected to my landing page and then I will redirect them to my deeplink thus I will get link click count and and app page will open as well, once again simple right but I lost the link previews which deep links were giving me, but as I was aware of meta and og tags it was an easy task to generate link previews I just need to dynamically send html from my server and I was done&lt;/p&gt;

&lt;p&gt;Now again peaceful days 😌&lt;br&gt;
&lt;a href="https://media2.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%2F6ff6g0akhc4ttgofkhyp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F6ff6g0akhc4ttgofkhyp.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But these peaceful days did not last long and deep link stopped working&lt;/p&gt;

&lt;p&gt;reason: My client started facebook and instagram advertising and when my custom link was shared on was redirecting to deep link but not redirecting to my app 😭 and this is the issue with react native webview and it is still open in &lt;a href="https://github.com/facebook/react-native/issues/10055" rel="noopener noreferrer"&gt;github&lt;/a&gt; since 2016&lt;/p&gt;

&lt;p&gt;So my colleague android ( did I mention this issue was in android only 😅 ) developer came with an idea to open the android app with custom scheme &lt;/p&gt;

&lt;p&gt;Little note about custom schemes&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;custom schemes are links which can help you open your app from the browser these custom schemes gets registered at os level at time of installing the app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is example of whatsapp website trying to open whatsapp app through custom scheme&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fk9u1z7tbrb98b47jhq2q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fk9u1z7tbrb98b47jhq2q.png" alt="whatsapp custom scheme" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;but the issue remains same 😔, instagram webview can not handle if the app is not installed and the webview crashes, so now what!!!&lt;/p&gt;

&lt;p&gt;We observed that our link just only does not work in webview else it works find, so we just need to find a way so that when the link in clicked in instagram and facebook it gets opened in external browser and link will just work fine 🎊&lt;/p&gt;

&lt;p&gt;But the question is how do I we do that ?&lt;/p&gt;

&lt;p&gt;Remember when I said I was sending meta tags to generate link previews after some research I found about one meta tag&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;http-equiv=&lt;/span&gt;&lt;span class="s"&gt;"refresh"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"0; url=intent://${intent_link}/#Intent;scheme=https;action=android.intent.action.VIEW;end;"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So now what happens is when someone clicks on the link the in app browser is opened and then it openes an external browser and then the browser opens the my original deep link and then deep link takes the control what to do&lt;/p&gt;

&lt;p&gt;After days of struggling and endless brainstorming sessions with my team, we finally found a solution that worked seamlessly. By using a combination of custom schemes and the meta refresh tag, we were able to bypass the limitations of Instagram webview and provide a smooth user experience for our clients.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fkkkdtygfahmhmagj9znv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fkkkdtygfahmhmagj9znv.png" alt="celebration_gif" width="498" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking back, it was a tough journey, but the lessons we learned along the way were invaluable. We gained a deeper understanding of how webview technology works and how to handle unforeseen obstacles that arise during development.&lt;/p&gt;

&lt;p&gt;In conclusion, while the road to implementing Firebase deep links and Instagram webview may have been bumpy, we emerged victorious with a solution that exceeded our client's expectations. And who knows, maybe the next time we face a similar challenge, we'll be better equipped to tackle it head-on.&lt;/p&gt;

</description>
      <category>android</category>
      <category>webdev</category>
      <category>firebase</category>
      <category>programming</category>
    </item>
    <item>
      <title>All about Screen 🖥 command</title>
      <dc:creator>Bhoomit Ganatra</dc:creator>
      <pubDate>Sun, 05 Jun 2022 18:46:29 +0000</pubDate>
      <link>https://dev.to/bhumit070/all-about-screen-command-10ef</link>
      <guid>https://dev.to/bhumit070/all-about-screen-command-10ef</guid>
      <description>&lt;p&gt;Hey there everyone have you ever run a service and wondered why the hell this service does not have detached mode ( detached mode means a service which runs in background and does not freeze your terminal ) so this is the one stop solution for you&lt;/p&gt;

&lt;h2&gt;
  
  
  What is screen command
&lt;/h2&gt;

&lt;p&gt;You can assume screen command as a new screen for you inside terminal where can you create multiple virtual screen to run multiple services&lt;/p&gt;

&lt;p&gt;This command is very useful if you are in server using ssh and want to run a service in background but service itself does not provide a detached mode. ( e.x. ElasticSearch )&lt;/p&gt;

&lt;p&gt;If you have unix system ( linux or macos ) screen command should be available to you &lt;/p&gt;

&lt;p&gt;To check screen command is available to you or not just run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;screen &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;it it returns any version like this voila you have screen command installed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fgkrmzkfm06i1aadhmho9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fgkrmzkfm06i1aadhmho9.png" alt="Image descroption" width="800" height="623"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's have a look how it works &lt;/p&gt;

&lt;p&gt;You can create a screen with below command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;screen &lt;span class="nt"&gt;-S&lt;/span&gt; SCREEN_NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;it will create a screen put you into that screen&lt;br&gt;
to create a screen without entering into it you can run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;screen &lt;span class="nt"&gt;-dmS&lt;/span&gt; SCREEN_NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;it will create a screen but it won't go into screen&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now that you have created a screen if you want to see a list of screen you have created you can use below command
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;screen &lt;span class="nt"&gt;-ls&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;it should give you the list of screens you have created!&lt;br&gt;
&lt;a href="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d7q2igvnwbxtu4wykhu2.png" rel="noopener noreferrer"&gt;Screen Version&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now that you have created and listed out screens you can enter into any screen by typing below command
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;screen &lt;span class="nt"&gt;-dR&lt;/span&gt; SCREEN_NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in case you can see your screen in&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;screen -ls&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 command but unable to enter it try to enter into screen by using full name of screen with pid.SCREEN_NAME&lt;/p&gt;

&lt;p&gt;pid is id which you can see in screen -ls command &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now that you can created, listed and entered into screen and did you stuff now you want to make sure it runs in background so to come out from screen and run in background you have to press

&lt;code&gt;CONTROL+A+D&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;by pressing this you will come out of screen and it will run in background&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How to delete a screen to delete a screen enter into the screen and press

&lt;code&gt;CONTROL+D&lt;/code&gt;

it will terminate your screen and you will see an output like this&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ff7iejqie59xy12icf9u2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ff7iejqie59xy12icf9u2.png" alt="Screen Terminating" width="800" height="78"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So this is all basics about screen command which you have inside your system to know more about it type&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;screen --help&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 you will get all the options available there.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>commands</category>
      <category>screen</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
