<?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: Chandu J S</title>
    <description>The latest articles on DEV Community by Chandu J S (@ctrleffive).</description>
    <link>https://dev.to/ctrleffive</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%2F61261%2Fcad946a9-7a01-46ca-a067-a0a132ba8ff8.png</url>
      <title>DEV Community: Chandu J S</title>
      <link>https://dev.to/ctrleffive</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ctrleffive"/>
    <language>en</language>
    <item>
      <title>🗃️ Backup your .dotfiles with a simple bash script</title>
      <dc:creator>Chandu J S</dc:creator>
      <pubDate>Sat, 14 Aug 2021 06:50:21 +0000</pubDate>
      <link>https://dev.to/ctrleffive/backup-your-dotfiles-with-a-simple-bash-script-5hn2</link>
      <guid>https://dev.to/ctrleffive/backup-your-dotfiles-with-a-simple-bash-script-5hn2</guid>
      <description>&lt;p&gt;We will be creating a git repository with a script that backup your required dotfiles. &lt;/p&gt;

&lt;h3&gt;
  
  
  1. Create a folder for the backup
&lt;/h3&gt;

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

&lt;span class="nb"&gt;mkdir &lt;/span&gt;my-dotfiles


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  2. Initialize git
&lt;/h3&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git init


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  3. Create file list
&lt;/h3&gt;

&lt;p&gt;Create a file named &lt;code&gt;backup.conf&lt;/code&gt; at the root of the folder.&lt;br&gt;
In this file we need to list out all the files &amp;amp; folders we need to backup. eg:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

~/.gitconfig
~/.profile
~/.vimrc
~/.xinitrc
~/.zshrc


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

&lt;/div&gt;
&lt;p&gt;Our backup script will loop through the items and copy everything into respective folders. &lt;/p&gt;
&lt;h3&gt;
  
  
  4. Create script
&lt;/h3&gt;

&lt;p&gt;Create a file named &lt;code&gt;backup.sh&lt;/code&gt; at the root of the folder.&lt;br&gt;
This is our script file. Copy the content below and paste it inside the file.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;

&lt;span class="c"&gt;# This script copy files mentioned inside `backup.conf` to the root of the project.&lt;/span&gt;

&lt;span class="c"&gt;# file to look for the paths to backup.&lt;/span&gt;
&lt;span class="nv"&gt;backupPaths&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"./backup.conf"&lt;/span&gt;
&lt;span class="c"&gt;# home directory path.&lt;/span&gt;
&lt;span class="nv"&gt;homeDirectory&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;~
&lt;span class="c"&gt;# same line identifier to echo in the same line.&lt;/span&gt;
&lt;span class="nv"&gt;sameLine&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\e&lt;/span&gt;&lt;span class="s2"&gt;[1A&lt;/span&gt;&lt;span class="se"&gt;\e&lt;/span&gt;&lt;span class="s2"&gt;[K"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"🛑 Clearing configurations directory..."&lt;/span&gt;
&lt;span class="c"&gt;# removing the folder with exsiting contents. we have git version anyway!&lt;/span&gt;
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; configurations
&lt;span class="c"&gt;# creating it again for backup.&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;configurations
&lt;span class="nb"&gt;sleep &lt;/span&gt;1
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$sameLine&lt;/span&gt;&lt;span class="s2"&gt;✅ Configurations directory cleared."&lt;/span&gt;
&lt;span class="nb"&gt;sleep &lt;/span&gt;1

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$sameLine&lt;/span&gt;&lt;span class="s2"&gt;🏁 Starting backup..."&lt;/span&gt;
&lt;span class="nb"&gt;sleep &lt;/span&gt;1

&lt;span class="c"&gt;# looping through the list &amp;amp; avoiding the empty spaces&lt;/span&gt;
&lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'/^[ \t]*$/d'&lt;/span&gt; &lt;span class="nv"&gt;$backupPaths&lt;/span&gt; | &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;read &lt;/span&gt;filePath&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$sameLine&lt;/span&gt;&lt;span class="s2"&gt;⏳ Copying: &lt;/span&gt;&lt;span class="nv"&gt;$filePath&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

  &lt;span class="c"&gt;# find &amp;amp; replace for ~ with home path&lt;/span&gt;
  &lt;span class="nv"&gt;findThis&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"~/"&lt;/span&gt;
  &lt;span class="nv"&gt;replaceWith&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$homeDirectory&lt;/span&gt;&lt;span class="s2"&gt;/"&lt;/span&gt;
  &lt;span class="nv"&gt;originalFile&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;filePath&lt;/span&gt;&lt;span class="p"&gt;//&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;findThis&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;replaceWith&lt;/span&gt;&lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

  &lt;span class="c"&gt;# copying the files&lt;/span&gt;
  &lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;--parents&lt;/span&gt; &lt;span class="nt"&gt;--recursive&lt;/span&gt; &lt;span class="nv"&gt;$originalFile&lt;/span&gt; ./configurations
  &lt;span class="nb"&gt;sleep &lt;/span&gt;0.05
&lt;span class="k"&gt;done

&lt;/span&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$sameLine&lt;/span&gt;&lt;span class="s2"&gt;🎉 Backup finished! You can review &amp;amp; commit your changes."&lt;/span&gt;


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  5. Make the script executable
&lt;/h3&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

chmod +x ./backup.sh


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  6. Commit all changes
&lt;/h3&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

git add .
git commit -m "initial commit"


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  7. Run script
&lt;/h3&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

./backup.sh


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

&lt;/div&gt;
&lt;p&gt;From now on, you can just run the script file whenever you need. After you run the backup script, all the files &amp;amp; folders mentioned inside the &lt;code&gt;backup.conf&lt;/code&gt; file will be copied into &lt;code&gt;configurations&lt;/code&gt; folder. Commit and push the changes to your remote repository.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🛑 Make sure you are not adding any confidential files or folders to &lt;code&gt;backup.conf&lt;/code&gt; file. eg: &lt;code&gt;.ssh&lt;/code&gt; or private keys.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Checkout below repository to see complete code. There is a &lt;code&gt;install.sh&lt;/code&gt; script in the root which is made for Arch Linux systems. Feel free to fork the repository and make changes according to your needs.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/ctrleffive" rel="noopener noreferrer"&gt;
        ctrleffive
      &lt;/a&gt; / &lt;a href="https://github.com/ctrleffive/linux-configurations" rel="noopener noreferrer"&gt;
        linux-configurations
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Linux Configurations
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🐧 Linux Configurations&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;💾 Backup Configurations&lt;/h2&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Make the &lt;code&gt;backup.sh&lt;/code&gt; file executable with &lt;code&gt;chmod +x ./backup.sh&lt;/code&gt; first.&lt;/li&gt;
&lt;li&gt;Backup configurations by executing &lt;code&gt;backup.sh&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Files &amp;amp; folders that needs to be backed up should be mentioned inside &lt;code&gt;backup.conf&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Once backup is complete, commit the changes.&lt;/li&gt;
&lt;li&gt;If you want to restore the backup, instead of just copy paste everything back, run the backup script. After that you can use file diff to compare the changes and pick manually.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;💫 Install Packages&lt;/h2&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Make the &lt;code&gt;install.sh&lt;/code&gt; file executable with &lt;code&gt;chmod +x ./install.sh&lt;/code&gt; first.&lt;/li&gt;
&lt;li&gt;Bulk install packages by executing &lt;code&gt;install.sh&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Packages needs to be installed should be listed inside &lt;code&gt;install_third_party.conf&lt;/code&gt; &amp;amp; &lt;code&gt;install_trusted.conf&lt;/code&gt; files.&lt;/li&gt;
&lt;li&gt;Services needs to be enabled should be listed inside &lt;code&gt;services.conf&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Its better to restart the PC after script finished running.&lt;/li&gt;
&lt;li&gt;3rd party packages are installed through &lt;code&gt;pikaur&lt;/code&gt; AUR helper.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;⚡️ Notes&lt;/h2&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Install &lt;strong&gt;VMWare Player&lt;/strong&gt; from here: &lt;a href="https://wiki.archlinux.org/title/VMware#Installation" rel="nofollow noopener noreferrer"&gt;https://wiki.archlinux.org/title/VMware#Installation&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;After installing &lt;code&gt;wine&lt;/code&gt;&lt;ul&gt;&lt;li&gt;…&lt;/li&gt;&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;
&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/ctrleffive/linux-configurations" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


</description>
      <category>dotfiles</category>
      <category>bash</category>
      <category>linux</category>
      <category>backup</category>
    </item>
    <item>
      <title>⚙ My Arch Linux setup</title>
      <dc:creator>Chandu J S</dc:creator>
      <pubDate>Wed, 04 Nov 2020 07:05:08 +0000</pubDate>
      <link>https://dev.to/ctrleffive/my-arch-linux-setup-19da</link>
      <guid>https://dev.to/ctrleffive/my-arch-linux-setup-19da</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnm7pg1vrbm245000o260.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnm7pg1vrbm245000o260.png" alt="Arch"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hey guys! I managed to successfully install Arch Linux with all of the softwares I needed. 😁&lt;/p&gt;

&lt;h3&gt;
  
  
  Here is my Arch Linux setup.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Desktop Environment: &lt;a href="https://kde.org/plasma-desktop/" rel="noopener noreferrer"&gt;KDE Plasma&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Backup Tool: &lt;a href="https://github.com/teejee2008/timeshift" rel="noopener noreferrer"&gt;Timeshift&lt;/a&gt; with RSYNC&lt;/li&gt;
&lt;li&gt;Package Manager Helper: &lt;a href="https://wiki.manjaro.org/index.php/Pamac" rel="noopener noreferrer"&gt;Pacmac Manager&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Session Manager: &lt;a href="https://github.com/loh-tar/tbsm" rel="noopener noreferrer"&gt;TBSM&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Global Theme: Breeze Dark&lt;/li&gt;
&lt;li&gt;Virtual Desktops: 2&lt;/li&gt;
&lt;li&gt;Activities: 2&lt;/li&gt;
&lt;li&gt;Linux Kernal: LTS (latest)&lt;/li&gt;
&lt;li&gt;Shell: &lt;a href="https://ohmyz.sh/" rel="noopener noreferrer"&gt;Oh My ZSH&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have a scheduled a Backup &amp;amp; Maintenance task every Sunday. I'll do backups, upgrade, junk clean up, and security checks to make sure everything works fine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Other Softwares
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VSCode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.bleachbit.org/" rel="noopener noreferrer"&gt;BleachBit&lt;/a&gt; (Junk cleaner)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.torproject.org" rel="noopener noreferrer"&gt;TOR Browser&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Google Chrome&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Slack&lt;/li&gt;
&lt;li&gt;Spotify&lt;/li&gt;
&lt;li&gt;Zoom&lt;/li&gt;
&lt;li&gt;&lt;a href="https://krita.org/en/" rel="noopener noreferrer"&gt;Krita&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;GIMP&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rawtherapee.com/" rel="noopener noreferrer"&gt;Rawtherapee&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Insomnia&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Be sure to check out the building process &lt;a href="https://chandujs.dev/blog/a-story-of-0s-1s-380p" rel="noopener noreferrer"&gt;HERE&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/ctrleffive" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F61261%2Fcad946a9-7a01-46ca-a067-a0a132ba8ff8.png" alt="ctrleffive"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/ctrleffive/a-story-of-0s-1s-380p" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;🖥 A Story of 0s &amp;amp; 1s: Building my PC&lt;/h2&gt;
      &lt;h3&gt;Chandu J S ・ Oct 30 '20&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#pcbuilding&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#hardware&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#desktop&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#linux&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>archlinux</category>
      <category>kde</category>
      <category>linux</category>
      <category>setup</category>
    </item>
    <item>
      <title>💾 Using Linux? Backup is critical.</title>
      <dc:creator>Chandu J S</dc:creator>
      <pubDate>Tue, 03 Nov 2020 13:38:19 +0000</pubDate>
      <link>https://dev.to/ctrleffive/using-linux-backup-is-critical-4hol</link>
      <guid>https://dev.to/ctrleffive/using-linux-backup-is-critical-4hol</guid>
      <description>&lt;p&gt;Whatever Operating System you are using, having proper backups is really important. But I never thought about backup when I was using Windows and Mac. Until now,&lt;/p&gt;

&lt;p&gt;I started using Linux for my primary needs.&lt;/p&gt;

&lt;p&gt;The main challenge of using Linux and messing around with the terminal is things can go ugly unexpectedly.&lt;/p&gt;

&lt;p&gt;Long story short, I run the below command in the terminal accidentally.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo rm -rf ~/.config&lt;/code&gt; 😐&lt;/p&gt;

&lt;p&gt;Guess what? 3.5 GB of configuration files are gone. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;.config&lt;/code&gt; folder contains most of the application configurations related to your user account. This includes operating system customizations and settings. Deleting the folder will not cause any harm to your operating system. But you have to configure all the settings from the beginning. Unless you have a backup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Timeshift
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eeX_K48B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/or42cd8hagfj1mdks41j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eeX_K48B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/or42cd8hagfj1mdks41j.png" alt="Timeshift" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Timeshift is a system restore tool for Linux. If you ever used Time Machine in MacOS or System Restore in Windows, you will get the idea.&lt;/p&gt;

&lt;p&gt;Here are my timeshift settings&lt;/p&gt;

&lt;h3&gt;
  
  
  Snapshot Type - RSYNC
&lt;/h3&gt;

&lt;p&gt;I'm using a separate Hard Disk for backup. RSYNC allows you to create backups on any Linux partitions. If your system got crashed, you can connect your HDD back, run Timeshift, and use the backup from the HDD to restore.&lt;/p&gt;

&lt;h3&gt;
  
  
  Storage Location - HDD
&lt;/h3&gt;

&lt;p&gt;I have an M.2 SSD with 256GB capacity and a 2TB Hard Disk for storage and backup purpose. A 100GB ext4 partition is reserved for backup.&lt;/p&gt;

&lt;h3&gt;
  
  
  Schedule - 2 per week
&lt;/h3&gt;

&lt;p&gt;I am using Arch Linux. I have weekly maintenance scheduled for my PC. Before I start maintenance tasks, I will create a backup, and after the maintenance, I will create another one. Since I'm not storing any large files in the SSD, the backup size is always small. &lt;/p&gt;

&lt;p&gt;If you have plenty of space left in your backup drive, you can choose the boot time backup. This will create a backup every time when the PC boots up. Booting speed will not be affected.&lt;/p&gt;

&lt;h3&gt;
  
  
  Users &amp;amp; Filters
&lt;/h3&gt;

&lt;p&gt;I've created symlinks for folders inside the home directory from my external HDD. All of the hidden folders in the home directory are backed up except &lt;code&gt;.cache&lt;/code&gt;. All other system folders are backed up.&lt;/p&gt;

&lt;p&gt;After I deleted the &lt;code&gt;.config&lt;/code&gt; directory, all my settings are reset. I simply had to open Timeshift and choose the most recent backup. &lt;/p&gt;

&lt;p&gt;Let me know your thoughts about backups 😊&lt;/p&gt;

</description>
      <category>archlinux</category>
      <category>backup</category>
      <category>linux</category>
      <category>timeshift</category>
    </item>
    <item>
      <title>🖥 A Story of 0s &amp; 1s: Building my PC</title>
      <dc:creator>Chandu J S</dc:creator>
      <pubDate>Fri, 30 Oct 2020 08:39:05 +0000</pubDate>
      <link>https://dev.to/ctrleffive/a-story-of-0s-1s-380p</link>
      <guid>https://dev.to/ctrleffive/a-story-of-0s-1s-380p</guid>
      <description>&lt;p&gt;Hello, world! 👋&lt;/p&gt;

&lt;p&gt;I am a software developer who has been in the industry since 2013. Currently working as a front-end developer (react) at &lt;a href="https://www.hootboard.com/"&gt;HootBoard&lt;/a&gt;. Here, I want to share my experience of building a PC from scratch.&lt;/p&gt;

&lt;p&gt;I am using my Macbook Air for development since 2017. Building a PC was not really in my mind. At first, I thought I will just buy a new MacBook Pro and deal with it. But, there are a few things I always wanted to do. I wanted to move out of the Apple ecosystem and wanted to get a better understanding of how hardware and software work outside the Apple world.&lt;/p&gt;

&lt;p&gt;I'm not a pro PC builder but I have assembled PCs before, and that was 7 years ago. A lot changed since then. This is my first time building a PC for myself!. So in a nutshell, I ordered the components from Amazon and assembled it by myself (without having the proper tools 😁 to do it. I still couldn't change an M.2 slot because I don't have the tool to remove the screw holder from the motherboard. Plus, one screw set was missing in the package 🤦)&lt;/p&gt;

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

&lt;p&gt;My primary use of the computer is for software development. I make websites &amp;amp; mobile applications mostly. The secondary purpose is image processing. I will be using different RAW image processing applications and image stacking softwares to process some of the photos. (Check out my Night Sky Album &lt;a href="https://photos.app.goo.gl/kWnSeLuYdWdAGJpD8"&gt;Are We Alone?&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;I've looked into several websites like mdcomputers.in, primeabgb.com, vedantcomputers.com, and of course, amazon.in.&lt;br&gt;
CPU seems cheaper in a local shop than the websites. So I bought it from there. The price of other components was different on different websites. But I ended up buying all the other parts from amazon after getting some reviews about the other websites. Mostly trust issues.&lt;/p&gt;
&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;

&lt;p&gt;Here is the components breakdown.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;CPU&lt;/td&gt;
&lt;td&gt;Intel i7 10th Generation (10700)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Motherboard&lt;/td&gt;
&lt;td&gt;Asus Prime Z490M-Plus LGA 1200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Memory&lt;/td&gt;
&lt;td&gt;G.Skill Ripjaws V 32GB DDR4 Dual Channel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Primary Storage&lt;/td&gt;
&lt;td&gt;Adata XPG SX8200 Pro 256GB NVME SSD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Secondary Storage&lt;/td&gt;
&lt;td&gt;Seagate Barracuda 2 TB Internal HDD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Power Supply&lt;/td&gt;
&lt;td&gt;Antec NeoEco 650M 80+ Bronze 650W Modular&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;Cabinet&lt;/td&gt;
&lt;td&gt;Antec P82 Flow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;Display&lt;/td&gt;
&lt;td&gt;LG 29" Ultrawide - 29UM69&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;Power Backup&lt;/td&gt;
&lt;td&gt;APC Back-UPS BE700Y-IND 700VA UPS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;Keyboard&lt;/td&gt;
&lt;td&gt;Logitech K230 Compact Wireless Keyboard&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;Mouse&lt;/td&gt;
&lt;td&gt;HP Z3700 Wireless Mouse&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;WiFi NIC&lt;/td&gt;
&lt;td&gt;TP-Link AC1200 Wireless WiFi PCIe Card&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Display
&lt;/h3&gt;

&lt;p&gt;In terms of display, my choice will be always a single ultrawide display. Maybe it's just me. But having multiple monitors in front of me is a mess for me. I usually take advantage of the multiple workspace feature in Operating Systems. So, a dual (or more) display arrangement is definitely not my interest.&lt;/p&gt;
&lt;h3&gt;
  
  
  Storage
&lt;/h3&gt;

&lt;p&gt;I try to keep everything very minimal. For me, a 256 GB SSD is enough for my usage. My Macbook Air is a 256GB variant. I am using it for all of my personal needs. I still have more than 50% of space left on it. So, getting a fancy 1TB or 500GB SSD is overkill for me. I bought a separate Hard Disk specifically for storage.&lt;/p&gt;
&lt;h2&gt;
  
  
  Operating System
&lt;/h2&gt;

&lt;p&gt;I've worked on all Windows versions from XP to Windows 10, a variety of Linux distros, and Mac OS. And I can say that I don't need Windows in my machine for my daily work. In fact, it's painful for me to do development on a windows machine.&lt;/p&gt;

&lt;p&gt;I choose Arch Linux as Operating System. Check out my setup &lt;a href="https://chandujs.dev/blog/my-arch-linux-setup-19da"&gt;HERE&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/ctrleffive" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sslYJppI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--cP8xMCCs--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/61261/cad946a9-7a01-46ca-a067-a0a132ba8ff8.png" alt="ctrleffive"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/ctrleffive/my-arch-linux-setup-19da" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;⚙ My Arch Linux setup&lt;/h2&gt;
      &lt;h3&gt;Chandu J S ・ Nov 4 '20 ・ 1 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#archlinux&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#kde&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#linux&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#setup&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;I always wanted to be a part of the open-source community. And I think being a Linux user could be a major part. I am the kind of guy who skips tutorials in software/games and tries to figure out the solution by myself (and ends up wasting more time 😁). Arch Linux fits really well for me in that case. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RJbXxLSu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/xk9dzea8asay4mm770yr.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RJbXxLSu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/xk9dzea8asay4mm770yr.jpeg" alt="Arch Linux" width="602" height="602"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The DIY approach in Arch gives you control over every aspect of your operating system. And the user repository of Arch (AUR) has plenty of software packages. Whatever packages I searched so far is there. And even if the package is not available, you can simply download the source code and build it yourself.&lt;/p&gt;

&lt;p&gt;For some people, that sense of accomplishment after successfully installing the software really matters.&lt;/p&gt;

&lt;p&gt;Speaking about other accessories, I didn't go for any expensive models for the keyboard and mouse. I thought I will start with something simple and upgrade later. But I spend quite some money on the chair and table.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dMhWGkbp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/bbnugemcklu1zk5yxj2s.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dMhWGkbp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/bbnugemcklu1zk5yxj2s.jpg" alt="😊" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The immense satisfaction and indescribable feeling of pleasure from building your first PC and fine-tuning your operating system is what drives me forward.&lt;/p&gt;

&lt;p&gt;Things I learned from my experience.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Have patience, it takes time.&lt;/li&gt;
&lt;li&gt;It's not as daunting as it sounds.&lt;/li&gt;
&lt;li&gt;Cable management matters.&lt;/li&gt;
&lt;li&gt;You are your own tech support.&lt;/li&gt;
&lt;li&gt;Do not buy components just because someone said it's cool!&lt;/li&gt;
&lt;li&gt;Do not turn on the Chassis Intrusion Detection option in BIOS if your chassis doesn't have that feature.&lt;/li&gt;
&lt;li&gt;If you want to reset the BIOS, shutdown and remove the battery from the motherboard and then short the BIOS reset pins.&lt;/li&gt;
&lt;li&gt;Always refer to the motherboard manual.&lt;/li&gt;
&lt;li&gt;Have a proper &amp;amp; stable power connection for your PC.&lt;/li&gt;
&lt;li&gt;Have good tools.&lt;/li&gt;
&lt;li&gt;Make sure you have an active internet connection and a computer with you during the process.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I've created a Google Photos album with some of the photos of the process. Have a look at &lt;a href="https://photos.app.goo.gl/v2G58Dm3smMFDBwLA"&gt;A Story of 0s &amp;amp; 1s&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let me know what you guys think about my setup.&lt;br&gt;
Feedback appreciated. 😊&lt;/p&gt;

</description>
      <category>pcbuilding</category>
      <category>hardware</category>
      <category>desktop</category>
      <category>linux</category>
    </item>
    <item>
      <title>📙 Static website hosting with GitHub &amp; Actions</title>
      <dc:creator>Chandu J S</dc:creator>
      <pubDate>Wed, 08 Apr 2020 09:11:20 +0000</pubDate>
      <link>https://dev.to/ctrleffive/static-website-hosting-with-github-actions-4g0d</link>
      <guid>https://dev.to/ctrleffive/static-website-hosting-with-github-actions-4g0d</guid>
      <description>&lt;p&gt;My website chandujs.dev is made with Gatsby. I made an article in dev.to recently. Read it &lt;a href="https://chandujs.dev/blog/i-made-my-website-with-gatsby-54jk" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/ctrleffive" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F61261%2Fcad946a9-7a01-46ca-a067-a0a132ba8ff8.png" alt="ctrleffive"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/ctrleffive/i-made-my-website-with-gatsby-54jk" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;🌏 I made my website with Gatsby!&lt;/h2&gt;
      &lt;h3&gt;Chandu J S ・ Feb 21 '20&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#gatsby&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#portfolio&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;I was using Netlify for hosting my website. Then I thought, why not use GitHub pages to host my website for free? Netlify is an awesome service, I know. But I have a problem keeping things in different places. GitHub has everything I want to host my website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reasons to Choose GitHub&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub Pages for hosting.&lt;/li&gt;
&lt;li&gt;GitHub Actions for building &amp;amp; deploying.&lt;/li&gt;
&lt;li&gt;Since my website is in a public repo, Hosting with GitHub pages is free, running GitHub Actions won't count against the 2,000 minutes per month quota.&lt;/li&gt;
&lt;li&gt;Webhooks for triggering actions are available,  &lt;a href="https://help.github.com/en/actions/reference/events-that-trigger-workflows#external-events-repository_dispatch" rel="noopener noreferrer"&gt;repository_dispatch&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Keep everything together in one place 😉&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Follow these simple steps to setup GitHub actions for your website.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Generate Keys
&lt;/h3&gt;

&lt;p&gt;Execute below command in your PC to get all keys.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="kd"&gt;ssh&lt;/span&gt;&lt;span class="na"&gt;-keygen -t &lt;/span&gt;&lt;span class="kd"&gt;rsa&lt;/span&gt; &lt;span class="na"&gt;-b &lt;/span&gt;&lt;span class="m"&gt;4096&lt;/span&gt; &lt;span class="na"&gt;-C &lt;/span&gt;&lt;span class="s2"&gt;"$(git config user.email)"&lt;/span&gt; &lt;span class="na"&gt;-f &lt;/span&gt;&lt;span class="kd"&gt;gh&lt;/span&gt;&lt;span class="na"&gt;-pages -N &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Two files named &lt;code&gt;gh-pages&lt;/code&gt; (private key) and &lt;code&gt;gh-pages.pub&lt;/code&gt; (public key) will be generated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DON'T PUSH THOSE GENERATED KEY FILES IN ANY GIT REPOSITORY&lt;/strong&gt;. You can delete them after you added the credentials to GitHub.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Add Deploy Key
&lt;/h3&gt;

&lt;p&gt;You need to add a deploy key for deploying the branch content to the web.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the contents of the &lt;code&gt;gh-pages.pub&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Goto &lt;strong&gt;Settings&lt;/strong&gt; of your repository.&lt;/li&gt;
&lt;li&gt;Goto &lt;strong&gt;Deploy Keys&lt;/strong&gt; settings.&lt;/li&gt;
&lt;li&gt;Give &lt;strong&gt;Title&lt;/strong&gt; as &lt;strong&gt;ACTIONS_DEPLOY_KEY&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Paste key contents in &lt;strong&gt;Key&lt;/strong&gt; field.&lt;/li&gt;
&lt;li&gt;Check &lt;strong&gt;Allow write access&lt;/strong&gt; option.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add key&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  3. Add Secret Key
&lt;/h3&gt;

&lt;p&gt;And you need to add a secret key also.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the contents of &lt;code&gt;gh-pages&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Goto &lt;strong&gt;Settings&lt;/strong&gt; of your repository.&lt;/li&gt;
&lt;li&gt;Goto &lt;strong&gt;Secrets&lt;/strong&gt; settings.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add new secret&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Give &lt;strong&gt;Name&lt;/strong&gt; as &lt;strong&gt;ACTIONS_DEPLOY_KEY&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Paste key contents in &lt;strong&gt;Value&lt;/strong&gt; field.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add secret&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  3. Personal Access Token
&lt;/h3&gt;

&lt;p&gt;If you already have a token with &lt;code&gt;repo&lt;/code&gt; access, we can use that. Or create one with &lt;code&gt;repo&lt;/code&gt; access from &lt;a href="https://github.com/settings/tokens/new" rel="noopener noreferrer"&gt;settings&lt;/a&gt;&lt;br&gt;
You can use this token to trigger &lt;code&gt;repository_dispatch&lt;/code&gt; events.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyyq0nv5987k3x08jtynu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyyq0nv5987k3x08jtynu.png" alt="New personal access token"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Workflow
&lt;/h3&gt;

&lt;p&gt;Create a file &lt;code&gt;github-deploy.yml&lt;/code&gt; with the following content in &lt;code&gt;.github/workflows&lt;/code&gt; location in the root folder of your repository.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Github Deploy&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;repository_dispatch&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;master&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;deploy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-18.04&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Setup node&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v1&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;10.x'&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Get yarn cache&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yarn-cache&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;echo "::set-output name=dir::$(yarn cache dir)"&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Cache dependencies&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/cache@v1&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ steps.yarn-cache.outputs.dir }}&lt;/span&gt;
          &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}&lt;/span&gt;
          &lt;span class="na"&gt;restore-keys&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
            &lt;span class="s"&gt;${{ runner.os }}-yarn-&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yarn install&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yarn build&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;peaceiris/actions-gh-pages@v3&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;deploy_key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.ACTIONS_DEPLOY_KEY }}&lt;/span&gt;
          &lt;span class="na"&gt;publish_dir&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./public&lt;/span&gt;

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

&lt;/div&gt;


&lt;p&gt;According to the &lt;code&gt;github-deploy.yml&lt;/code&gt; file, GitHub action will execute &lt;code&gt;yarn build&lt;/code&gt; followed by &lt;code&gt;yarn install&lt;/code&gt; and publish the contents of &lt;code&gt;/public&lt;/code&gt; folder into &lt;code&gt;gh-pages&lt;/code&gt; branch in your repository whenever there is a new push event happens in &lt;code&gt;master&lt;/code&gt; branch or whenever a &lt;code&gt;repository_dispatch&lt;/code&gt; event is fired. After the first build, you can goto &lt;strong&gt;Settings&lt;/strong&gt; page of your repository and select &lt;strong&gt;gh-pages&lt;/strong&gt; from &lt;strong&gt;Source&lt;/strong&gt; dropdown in &lt;strong&gt;GitHub Pages&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;Don't forget to link your domain with GitHub pages. For that add a &lt;code&gt;CNAME&lt;/code&gt; file with your domain name in the &lt;code&gt;/static&lt;/code&gt; folder of your gatsby project. &lt;/p&gt;

&lt;p&gt;You can read more about how I link my domain &amp;amp; subdomains with GitHub &lt;a href="https://chandujs.dev/blog/wildcard-subdomains-github-pages-38fh" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/ctrleffive" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F61261%2Fcad946a9-7a01-46ca-a067-a0a132ba8ff8.png" alt="ctrleffive"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/ctrleffive/wildcard-subdomains-github-pages-38fh" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;🔥 Wildcard Subdomains &amp;amp; GitHub Pages&lt;/h2&gt;
      &lt;h3&gt;Chandu J S ・ Apr 5 '20&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#github&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#dns&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



</description>
      <category>github</category>
      <category>gatsby</category>
      <category>hosting</category>
    </item>
    <item>
      <title>📸 How to take screenshots from Chrome</title>
      <dc:creator>Chandu J S</dc:creator>
      <pubDate>Fri, 21 Feb 2020 12:26:38 +0000</pubDate>
      <link>https://dev.to/ctrleffive/how-to-take-screenshots-from-chrome-51kj</link>
      <guid>https://dev.to/ctrleffive/how-to-take-screenshots-from-chrome-51kj</guid>
      <description>&lt;p&gt;There are lots of Chrome extensions are available to take screenshots of websites.&lt;/p&gt;

&lt;p&gt;But you know you can use Chrome's device toolbar to take screenshots of a website in any device sizes?&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Go to Website
&lt;/h3&gt;

&lt;h3&gt;
  
  
  2. Open Developer Tools
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iv791P_W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/l1uw9szar62e6o9nz27q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iv791P_W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/l1uw9szar62e6o9nz27q.png" alt="Open Developer Tools" width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Click Toggle Device Toolbar Option
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tIeeO60w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/14fe9seqxv4otp9eazcy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tIeeO60w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/14fe9seqxv4otp9eazcy.png" alt="Device Toolbar Option" width="685" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Choose Screen Size
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Iprc2ubX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/jhn8jf09g177k2xm7zs1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Iprc2ubX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/jhn8jf09g177k2xm7zs1.png" alt="Screen Size" width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or you can choose the Responsive option and adjust the size.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Click Menu Icon
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xLKgcyxi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/j65f3ze32o8jol3hqpll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xLKgcyxi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/j65f3ze32o8jol3hqpll.png" alt="Menu Icon" width="800" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Choose Capture Screenshot Option
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0uDLT_vl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/zt889y96yrnu1yeaz9lh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0uDLT_vl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/zt889y96yrnu1yeaz9lh.png" alt="Capture Screenshot" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  ✌️
&lt;/h1&gt;

</description>
      <category>productivity</category>
      <category>chrome</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🌏 I made my website with Gatsby!</title>
      <dc:creator>Chandu J S</dc:creator>
      <pubDate>Fri, 21 Feb 2020 10:34:00 +0000</pubDate>
      <link>https://dev.to/ctrleffive/i-made-my-website-with-gatsby-54jk</link>
      <guid>https://dev.to/ctrleffive/i-made-my-website-with-gatsby-54jk</guid>
      <description>&lt;p&gt;Even though I've been a web developer for more than 6 years, I bought a domain name for my website only in 2018. And just now I finished my website. I'm lazy, maybe.&lt;/p&gt;

&lt;p&gt;But I am pretty sure that this website is the fast, performance-optimized website I've ever made.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chandujs.dev"&gt;chandujs.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bXoke7HX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/5atg81ge0eatsqvz6cgg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bXoke7HX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/5atg81ge0eatsqvz6cgg.png" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pretty simple, right? &lt;/p&gt;

&lt;p&gt;Lets breakdown the things I used to build my website. &lt;/p&gt;

&lt;h1&gt;
  
  
  Gatsby
&lt;/h1&gt;

&lt;p&gt;This static site generator made me think to reconsider getting back in web development. &lt;br&gt;
Gatsby is fast, performance baked in, modern static site generator for React. The first version of the website was done in Angular. I ported it to Gatsby after I learned Gatsby. &lt;/p&gt;

&lt;p&gt;You can clone a starter project and start messing around from &lt;a href="https://www.gatsbyjs.org/starters"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Plugins
&lt;/h2&gt;

&lt;p&gt;Gatsby’s plugin archive is rich enough. You will get plugins for almost anything for your website. &lt;/p&gt;
&lt;h3&gt;
  
  
  Blogging
&lt;/h3&gt;

&lt;p&gt;I have a blog section on my website. So I used &lt;a href="https://www.gatsbyjs.org/packages/gatsby-source-dev"&gt;gatsby-source-dev&lt;/a&gt; plugin to fetch dev.to posts of my user id and render on my website. Effortless blogging 😎&lt;/p&gt;
&lt;h3&gt;
  
  
  Portfolio Showcase
&lt;/h3&gt;

&lt;p&gt;For displaying my portfolio on the website I've used the following plugins.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.gatsbyjs.org/packages/gatsby-source-filesystem"&gt;gatsby-source-filesystem&lt;/a&gt; To listing all the files in the project&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.gatsbyjs.org/packages/gatsby-plugin-sharp"&gt;gatsby-plugin-sharp&lt;/a&gt; Several image processing functions&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.gatsbyjs.org/packages/gatsby-transformer-sharp"&gt;gatsby-transformer-sharp&lt;/a&gt; Creates ImageSharp nodes from image types that are supported by the sharp image processing library&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.gatsbyjs.org/packages/gatsby-transformer-remark"&gt;gatsby-transformer-remark&lt;/a&gt; Parses Markdown files using Remark.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.gatsbyjs.org/packages/gatsby-remark-images"&gt;gatsby-remark-images&lt;/a&gt; Processes images in markdown so they can be used in the production build.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.gatsbyjs.org/packages/gatsby-remark-relative-images"&gt;gatsby-remark-relative-images&lt;/a&gt; Convert image src(s) in markdown to be relative to their node’s parent directory. &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.gatsbyjs.org/packages/gatsby-plugin-extract-image-colors"&gt;gatsby-plugin-extract-image-colors&lt;/a&gt; Extracts colors from image adds them to the image data&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Optimization
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.gatsbyjs.org/docs/performance/"&gt;Performance optimization&lt;/a&gt; is out of the box available in Gatsby. &lt;/p&gt;

&lt;p&gt;I wrote a separate article about how I purged 95% of unused bootstrap from the website. Read it &lt;a href="https://chandujs.dev/blog/how-i-purged-95-of-unused-bootstrap-css-from-my-gatsby-website-3khi"&gt;here&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/ctrleffive" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sslYJppI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--cP8xMCCs--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/61261/cad946a9-7a01-46ca-a067-a0a132ba8ff8.png" alt="ctrleffive"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/ctrleffive/how-i-purged-95-of-unused-bootstrap-css-from-my-gatsby-website-3khi" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;🗜 How I purged 95% of unused CSS from my Gatsby website&lt;/h2&gt;
      &lt;h3&gt;Chandu J S ・ Feb 21 '20 ・ 1 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#gatsby&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#css&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#bootstrap&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Netlify CMS
&lt;/h3&gt;

&lt;p&gt;I'm using a headless CMS from Netlify which is a simple easy to integrate CMS you can use with your static site. It's very easy to integrate with a Gatsby website.&lt;br&gt;
Learn more about Netlify CMS &lt;a href="https://www.netlifycms.org/docs/start-with-a-template"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Progressive Web App
&lt;/h3&gt;

&lt;p&gt;This website is PWA, which means you can access the website later once you open the website. You can make a Gatsby website a PWA with very easy steps.&lt;/p&gt;

&lt;p&gt;Install &lt;a href="https://www.gatsbyjs.org/packages/gatsby-plugin-offline"&gt;gatsby-plugin-offline&lt;/a&gt; node package and Add below to end of &lt;code&gt;plugins&lt;/code&gt; array in your &lt;code&gt;gatsby-config.js&lt;/code&gt; file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="c1"&gt;//...&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`gatsby-plugin-manifest`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Chandu J S&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;short_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Chandu&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;start_url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;background_color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Variables&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;theme_color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Variables&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;standalone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;src/assets/images/icon.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;crossOrigin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`use-credentials`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gatsby-plugin-offline&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="c1"&gt;//...&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Netlify
&lt;/h1&gt;

&lt;p&gt;In terms of hosting, I had to pay NOTHING to host my website 😁. Netlify is an awesome service that provides free hosting for static websites. &lt;/p&gt;

&lt;p&gt;It doesn't matter what kind of static site generator you have, almost all kind of them are supported by Netlify.&lt;/p&gt;

&lt;p&gt;Let me know in the comments if I need to clarify anything more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The source code of my website is open and available &lt;a href="https://github.com/ctrleffive/chandujs.dev"&gt;here&lt;/a&gt;. Feel free to use it as per the license.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>portfolio</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🗜 How I purged 95% of unused CSS from my Gatsby website</title>
      <dc:creator>Chandu J S</dc:creator>
      <pubDate>Fri, 21 Feb 2020 10:33:26 +0000</pubDate>
      <link>https://dev.to/ctrleffive/how-i-purged-95-of-unused-bootstrap-css-from-my-gatsby-website-3khi</link>
      <guid>https://dev.to/ctrleffive/how-i-purged-95-of-unused-bootstrap-css-from-my-gatsby-website-3khi</guid>
      <description>&lt;p&gt;I was using bootstrap for a long time. The last project I used bootstrap is the website I made with Gatsby. &lt;/p&gt;

&lt;p&gt;But most of the time, I use only the responsive classes in bootstrap. The &lt;code&gt;bootstrap.css&lt;/code&gt; file itself is 152 kb in size. I had to find a way to remove unnecessary CSS from the code. I was using bootstrap from the first version of this website. I didn't want to change. &lt;/p&gt;

&lt;p&gt;So, I used &lt;a href="https://www.gatsbyjs.org/packages/gatsby-plugin-purgecss"&gt;gatsby-plugin-purgecss&lt;/a&gt; to remove unnecessary CSS from the production build.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xwX6pqnO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/u57ay3h7k3ki1ljg0qez.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xwX6pqnO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/u57ay3h7k3ki1ljg0qez.png" alt="Build Screenshot" width="800" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even though this is NOT an install and forgets type plugin (mentioned in their documentation), for my website, adding to the &lt;code&gt;gatsby-config.js&lt;/code&gt; file did a good job.&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>css</category>
      <category>bootstrap</category>
      <category>webdev</category>
    </item>
    <item>
      <title>⛓ How to join two arrays in JavaScript</title>
      <dc:creator>Chandu J S</dc:creator>
      <pubDate>Wed, 19 Feb 2020 18:07:08 +0000</pubDate>
      <link>https://dev.to/ctrleffive/how-to-join-two-arrays-in-javascript-2679</link>
      <guid>https://dev.to/ctrleffive/how-to-join-two-arrays-in-javascript-2679</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;one&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;`aaa`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;`bbb`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;`ccc`&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;two&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;`ddd`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;`eee`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;`fff`&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You have the above arrays.&lt;br&gt;
How will you merge those into a single array?&lt;/p&gt;

&lt;p&gt;You can use &lt;code&gt;concat&lt;/code&gt; method.&lt;br&gt;
This method will work in older browsers also.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;megaArray&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;one&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;concat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;two&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is a new way to do this.&lt;br&gt;
You can use the &lt;strong&gt;spread&lt;/strong&gt; operator in JavaScript.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;megaArray&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;one&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;two&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Much cleaner!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>arrays</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🐞 Catch exceptions in Flutter with Catcher &amp; Sentry</title>
      <dc:creator>Chandu J S</dc:creator>
      <pubDate>Fri, 13 Dec 2019 17:24:24 +0000</pubDate>
      <link>https://dev.to/ctrleffive/catch-exceptions-in-flutter-with-catcher-sentry-cpn</link>
      <guid>https://dev.to/ctrleffive/catch-exceptions-in-flutter-with-catcher-sentry-cpn</guid>
      <description>&lt;p&gt;Who doesn't hate unhandled exceptions in their applications?&lt;/p&gt;

&lt;p&gt;In this post, I will show you how to catch unhandled exceptions in a flutter application using a &lt;a href="https://pub.dev/packages/catcher"&gt;Catcher&lt;/a&gt; plugin and &lt;a href="http://sentry.io"&gt;sentry.io&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a new project in Sentry
&lt;/h2&gt;

&lt;p&gt;Go to sentry.io and create a new project&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gIPVxBMp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/0e958rup11epvmmsusmv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gIPVxBMp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/0e958rup11epvmmsusmv.png" alt="Create New Project" width="774" height="105"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can just use the DSN for our application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3Beb5rAS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/kzm8zh1w5sc3l3hwsfge.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3Beb5rAS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/kzm8zh1w5sc3l3hwsfge.png" alt="Get DSN" width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Install Catcher
&lt;/h2&gt;

&lt;p&gt;Open your app's &lt;code&gt;pubspec.yml&lt;/code&gt; file and add &lt;code&gt;catcher&lt;/code&gt; as a dependency.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;catcher&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;^0.2.7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;NOTE: Catcher version mentioned in this post may not be the latest version.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And in your &lt;code&gt;main.dart&lt;/code&gt; file,&lt;/p&gt;

&lt;p&gt;Import the package,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:catcher/catcher_plugin.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;runApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;App&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;/// checking if release mode or not&lt;/span&gt;
  &lt;span class="c1"&gt;/// no need of Catcher &amp;amp; Sentry in debug mode.&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;kReleaseMode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Catcher&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="n"&gt;App&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
      &lt;span class="nl"&gt;releaseConfig:&lt;/span&gt; &lt;span class="n"&gt;CatcherOptions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;SilentReportMode&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;SentryHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'&amp;lt;SENTRY_DSN_STRING&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;)],&lt;/span&gt;
      &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;runApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;App&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace your sentry DSN with &lt;code&gt;&amp;lt;SENTRY_DSN_STRING&amp;gt;&lt;/code&gt; in &lt;code&gt;SentryHandler&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;CatcherOptions&lt;/code&gt;, we have to provide a &lt;code&gt;ReportMode&lt;/code&gt; as the first parameter and at least one &lt;code&gt;ReportHandler&lt;/code&gt; as the second parameter. Here we are using &lt;code&gt;SilentReportMode()&lt;/code&gt; as &lt;code&gt;ReportMode&lt;/code&gt; and &lt;code&gt;SentryHandler()&lt;/code&gt; as error handler.  &lt;/p&gt;

&lt;p&gt;What we are expecting here is, if there is any unhandled exception occurs, the app will send the error report to sentry silently. If you want to get user's confirmation to send an error report, you can use &lt;code&gt;DialogReportMode()&lt;/code&gt; instead of &lt;code&gt;SilentReportMode()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can refer more in the plugin documentation &lt;a href="https://pub.dev/packages/catcher"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;next, in &lt;code&gt;MaterialApp&lt;/code&gt; widget add &lt;code&gt;Catcher.navigatorKey&lt;/code&gt; as value of &lt;code&gt;navigatorKey&lt;/code&gt; property&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;App&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;StatelessWidget&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;MaterialApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nl"&gt;navigatorKey:&lt;/span&gt; &lt;span class="n"&gt;Catcher&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;navigatorKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// &amp;lt;---------&lt;/span&gt;
      &lt;span class="nl"&gt;home:&lt;/span&gt; &lt;span class="n"&gt;RootPage&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it!&lt;/p&gt;

&lt;p&gt;Catcher will catch all the unhandled exceptions in the application from now on. You can view the exceptions in the sentry dashboard.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>exceptions</category>
      <category>sentry</category>
      <category>dart</category>
    </item>
    <item>
      <title>⚡ Hot module replacement in Angular</title>
      <dc:creator>Chandu J S</dc:creator>
      <pubDate>Tue, 26 Nov 2019 19:47:16 +0000</pubDate>
      <link>https://dev.to/ctrleffive/hot-module-replacement-in-angular-2ckl</link>
      <guid>https://dev.to/ctrleffive/hot-module-replacement-in-angular-2ckl</guid>
      <description>&lt;p&gt;When working with angular projects, live reloading is a must. But whenever you change something in the code, the whole page will reload. Hot Module Replacement (HMR) is a feature in webpack that allows for modules to be replaced without a full browser reload. Changes will get updated instantly. This feature allows you to maintain much of the application state usually lost when reloading the page. But this is not enabled by default in angular. We need to do some adjustments to your project to get this run.&lt;/p&gt;

&lt;p&gt;So, let's start...&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Install Dependency
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn add @angularclass/hmr &lt;span class="nt"&gt;--dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or if you are using &lt;code&gt;npm&lt;/code&gt;,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @angularclass/hmr &lt;span class="nt"&gt;--save-dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Add New Environment
&lt;/h2&gt;

&lt;p&gt;Add a new environment file called &lt;code&gt;environment.hmr.ts&lt;/code&gt; inside your &lt;code&gt;src/environments&lt;/code&gt; folder with following code.&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;environment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;production&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;hmr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="c1"&gt;// you can add your existing development configs from `environment.ts` file here.&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we have a new environment file. We need to update &lt;code&gt;build&lt;/code&gt; &amp;amp; &lt;code&gt;serve&lt;/code&gt; properties in the &lt;code&gt;angular.json&lt;/code&gt; file with the following configurations.&lt;/p&gt;

&lt;p&gt;for the &lt;code&gt;build&lt;/code&gt; property,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;build&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;configurations&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hmr&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fileReplacements&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;replace&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;src/environments/environment.ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;with&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;src/environments/environment.hmr.ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&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;and for the &lt;code&gt;serve&lt;/code&gt; property,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;serve&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;configurations&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hmr&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hmr&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;browserTarget&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;YOUR_PROJECT_NAME&amp;gt;:build:hmr&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&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;then, add &lt;code&gt;node&lt;/code&gt; into the &lt;code&gt;types&lt;/code&gt; array in &lt;code&gt;compilerOptions&lt;/code&gt; in &lt;code&gt;src/tsconfig.app.json&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;//&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;compilerOptions&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;types&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;node&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="c1"&gt;//&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Update Existing Environments
&lt;/h2&gt;

&lt;p&gt;Next, we need to add an &lt;code&gt;hmr&lt;/code&gt; property with value &lt;code&gt;false&lt;/code&gt; in all other environment files (except &lt;code&gt;environment.hmr.ts&lt;/code&gt;).&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;environment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;//&lt;/span&gt;
  &lt;span class="na"&gt;hmr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Configure Your Application
&lt;/h2&gt;

&lt;p&gt;Create a new file named &lt;code&gt;hmr.ts&lt;/code&gt; inside &lt;code&gt;src&lt;/code&gt; folder with following content.&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="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NgModuleRef&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ApplicationRef&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createNewHosts&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angularclass/hmr&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hmrBootstrap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="kr"&gt;module&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;bootstrap&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="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;NgModuleRef&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;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="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;ngModule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NgModuleRef&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kr"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;accept&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="nx"&gt;bootstrap&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mod&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;ngModule&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;mod&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="kr"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;dispose&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="kd"&gt;const&lt;/span&gt; &lt;span class="na"&gt;appRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ApplicationRef&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ngModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;injector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ApplicationRef&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;elements&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;appRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;components&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nativeElement&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;makeVisible&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createNewHosts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;elements&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nx"&gt;ngModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nx"&gt;makeVisible&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then, we need to modify the &lt;code&gt;main.ts&lt;/code&gt; file inside &lt;code&gt;src&lt;/code&gt; folder to use HMR feature.&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="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;enableProdMode&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;platformBrowserDynamic&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/platform-browser-dynamic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;environment&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./environments/environment&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;hmrBootstrap&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./hmr&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;RootModule&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./app/root/root.module&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;production&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;enableProdMode&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bootstrap&lt;/span&gt; &lt;span class="o"&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="nx"&gt;platformBrowserDynamic&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;bootstrapModule&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;RootModule&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hmr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kr"&gt;module&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hot&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;hmrBootstrap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kr"&gt;module&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bootstrap&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&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="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;HMR is not enabled for webpack-dev-server!&lt;/span&gt;&lt;span class="dl"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Are you using the --hmr flag for ng serve?&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;bootstrap&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&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;h2&gt;
  
  
  5. Add NPM Script
&lt;/h2&gt;

&lt;p&gt;Add an &lt;code&gt;hmr&lt;/code&gt; property in &lt;code&gt;scripts&lt;/code&gt; object in the &lt;code&gt;package.json&lt;/code&gt; file to make running app easier.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;scripts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;//&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hmr&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ng serve --configuration hmr&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;h2&gt;
  
  
  Success! 👏
&lt;/h2&gt;

&lt;p&gt;We finished configuring HMR for the angular project.&lt;br&gt;
Now try running the app&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;or with &lt;code&gt;npm&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run hmr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>angular</category>
      <category>hmr</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
