<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sonali</title>
    <description>The latest articles on Forem by Sonali (@sona_).</description>
    <link>https://forem.com/sona_</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%2F455386%2Fc1d5f066-3a73-4e4c-8aa8-e5ded266fc26.jpg</url>
      <title>Forem: Sonali</title>
      <link>https://forem.com/sona_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sona_"/>
    <language>en</language>
    <item>
      <title>Make your Terminal Sassy !</title>
      <dc:creator>Sonali</dc:creator>
      <pubDate>Mon, 12 Oct 2020 23:09:29 +0000</pubDate>
      <link>https://forem.com/sona_/make-your-terminal-sassy-2ni5</link>
      <guid>https://forem.com/sona_/make-your-terminal-sassy-2ni5</guid>
      <description>&lt;p&gt;Recently a few people asked me about my colorful terminal. So I decided to write a quick article about it. If you like what you see then scroll down.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4kyu6yk76m4qpwilwhbu.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%2F4kyu6yk76m4qpwilwhbu.png" alt="Screen Shot 2020-10-12 at 2.03.16 PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Here are easy to follow steps to make your terminal "SaSsY" like mine  ;)
&lt;/h2&gt;

&lt;h4&gt;
  
  
  1) &lt;a href="https://www.iterm2.com" rel="noopener noreferrer"&gt;https://www.iterm2.com&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;download this &lt;/p&gt;

&lt;h4&gt;
  
  
  2) Install homebrew
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3) Download ohmyzsh framework
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4) Run &lt;code&gt;brew install httpie&lt;/code&gt;.
&lt;/h4&gt;

&lt;p&gt;This is a commandline http-client with a cool UI, syntax highlighting, JSON support &amp;amp; many more features &amp;amp; I use it instead of graphical programs like &lt;code&gt;Postman&lt;/code&gt; Ref: &lt;a href="https://httpie.org/docs#installation" rel="noopener noreferrer"&gt;https://httpie.org/docs#installation&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  5) Run &lt;code&gt;brew install htop&lt;/code&gt;.
&lt;/h4&gt;

&lt;p&gt;It's a pretty cool interactive process viewer. Ref: &lt;a href="https://htop.dev" rel="noopener noreferrer"&gt;https://htop.dev&lt;/a&gt;. After installing you can run the command &lt;code&gt;htop&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  6) For the js folks &lt;code&gt;brew install node&lt;/code&gt;.
&lt;/h4&gt;

&lt;p&gt;Then you can check your node version using &lt;code&gt;node -v&lt;/code&gt; &amp;amp; npm version using &lt;code&gt;npm -v&lt;/code&gt;. You can also look into nvm which is a node version manager to easily switch between differnt node versions. &lt;/p&gt;

&lt;h4&gt;
  
  
  7) Run &lt;code&gt;npm install -g tree-cli&lt;/code&gt;.
&lt;/h4&gt;

&lt;p&gt;This will list the content of directories in tree like format when you run the command &lt;code&gt;tree&lt;/code&gt;&lt;br&gt;
Ref: &lt;a href="https://github.com/MrRaindrop/tree-cli" rel="noopener noreferrer"&gt;https://github.com/MrRaindrop/tree-cli&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  9) Make vim pretty
&lt;/h4&gt;

&lt;p&gt;If you would like a colorful vim editor then do this: &lt;br&gt;
&lt;code&gt;vi ~/.vimrc&lt;/code&gt; and add &lt;code&gt;syntax on&lt;/code&gt; &lt;br&gt;
If you'd always like to see line numbers then add &lt;code&gt;set number&lt;/code&gt; in your vimrc &lt;/p&gt;
&lt;h4&gt;
  
  
  8) Configuring zshrc
&lt;/h4&gt;
&lt;h5&gt;
  
  
  1. To configure zsh
&lt;/h5&gt;

&lt;p&gt;you need to customize somethings inside zshrc so run this command &lt;code&gt;vi ~/.zshrc&lt;/code&gt;&lt;/p&gt;
&lt;h5&gt;
  
  
  2. Theme
&lt;/h5&gt;

&lt;p&gt;The name of the theme I use is "Jonathan". So far I like it. You can search for the following in your zshrc &lt;code&gt;ZSH_THEME&lt;/code&gt; and set it to whichever theme you like. &lt;/p&gt;
&lt;h5&gt;
  
  
  3. Plugins:
&lt;/h5&gt;

&lt;p&gt;I use the following plugins. Find &lt;code&gt;plugins&lt;/code&gt; in your zshrc &amp;amp; add the name of the plugins like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    plugins=(
        git
        zsh-autosuggestions
        zsh-syntax-highlighting
    )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But for those plugins to work you need to first clone them so run the following commands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;zsh-autosuggestions&lt;br&gt;
This is a super handy plugin for auto suggestions. It suggests commands as you type based on history and completions. &lt;br&gt;
Ref: &lt;a href="https://github.com/zsh-users/zsh-autosuggestions" rel="noopener noreferrer"&gt;https://github.com/zsh-users/zsh-autosuggestions&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;zsh-syntax-highlighting&lt;br&gt;
Provides some cool syntax hylighting.&lt;br&gt;
Ref: &lt;a href="https://github.com/zsh-users/zsh-syntax-highlighting" rel="noopener noreferrer"&gt;https://github.com/zsh-users/zsh-syntax-highlighting&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
&lt;/code&gt;&lt;/pre&gt;

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

&lt;h5&gt;
  
  
  4. thefuck - Yes, thefuck ? you read it right!
&lt;/h5&gt;

&lt;p&gt;It's fine friends, we all use bad words sometimes(jk), sometimes though :P! &lt;br&gt;
This one corrects errors in previous console commands. So let's say you type &lt;code&gt;pd&lt;/code&gt; instead of &lt;code&gt;pwd&lt;/code&gt; (eyeroll) , it's obviously an invalid command. So all you gotta do is type "fuck" and it would tell you what went wrong. &lt;br&gt;
    I'm still exploring this one, it's not super accurate but for now I like it. &lt;br&gt;
    To get this to work, inside your &lt;code&gt;zshrc&lt;/code&gt; copy the following &lt;br&gt;
    &lt;code&gt;eval $(thefuck --alias)&lt;/code&gt;&lt;br&gt;
    Ref: &lt;a href="https://github.com/nvbn/thefuck" rel="noopener noreferrer"&gt;https://github.com/nvbn/thefuck&lt;/a&gt;&lt;br&gt;
    Here's what it looks like&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%2Fqh8hkbtut5a8tuiep543.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%2Fqh8hkbtut5a8tuiep543.png" alt="Screen Shot 2020-10-12 at 1.20.32 PM"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;
  
  
  5. Let's talk about colors ..
&lt;/h5&gt;

&lt;p&gt;For this one, go to &lt;code&gt;Preferences -&amp;gt; i-term -&amp;gt; profiles -&amp;gt; Colors&lt;/code&gt;. I changed the font to be &lt;code&gt;Chalkduster&lt;/code&gt; and set a different color as well. Here is my config: &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%2Fxs0dewn1ik33ym5fcum8.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%2Fxs0dewn1ik33ym5fcum8.png" alt="Screen Shot 2020-10-12 at 1.20.12 PM"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  9) Now, let's get into the coolest part ;) ft. ASCII art , lolcat , cowsay
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;ASCII Art&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I created my funky ASCII name art using this tool&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://dev.to/lakatos88/ascii-themes-node-js-cli-interface-to-generate-themed-ascii-art-4ck8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;but if you do not want to go through those steps, you can always create your own art using this tool &amp;amp; copy paste it.  &lt;a href="http://www.patorjk.com/software/taag/#p=display&amp;amp;f=Patorjk-HeX&amp;amp;t=SONA" rel="noopener noreferrer"&gt;http://www.patorjk.com/software/taag/#p=display&amp;amp;f=Patorjk-HeX&amp;amp;t=SONA&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I created a file called &lt;code&gt;welcome.sh&lt;/code&gt; &amp;amp; copy pasted the design there. Make sure you put each line in an &lt;code&gt;echo "your ascii"&lt;/code&gt; command . Checkout the screenshot. &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%2Fzhg7b7lbnh71vpqnzuca.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%2Fzhg7b7lbnh71vpqnzuca.png" alt="Screen Shot 2020-10-12 at 1.44.09 PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I then put this &lt;code&gt;./welcome.sh&lt;/code&gt; at the end of my &lt;code&gt;zshrc&lt;/code&gt; file. &lt;/p&gt;

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

&lt;p&gt;If you like rainbow effects then run &lt;code&gt;brew install lolcat&lt;/code&gt;. If you want to apply this rainbow effect to your welcome message then in your &lt;code&gt;zshrc&lt;/code&gt; add this at the end of the file&lt;br&gt;
  &lt;code&gt;./welcome.sh | lolcat&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;fortune &amp;amp; cowsay &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you would like a random quote by a cow and want all of that in rainbow colors then &lt;br&gt;
&lt;code&gt;brew install fortune&lt;/code&gt; and &lt;code&gt;brew install cowsay&lt;/code&gt; and then again go back to the end of your &lt;code&gt;zshrc&lt;/code&gt; and after the welcome message add the following &lt;code&gt;fortune | cowsay | lolcat&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;Pls Note: for all the above changes to take effect, run &lt;code&gt;source ~/.zshrc&lt;/code&gt; or restart your terminal. &lt;br&gt;
Yes, your terminal is going to look absolutely beautiful after all this! &lt;/p&gt;
&lt;h4&gt;
  
  
  10) Aliases
&lt;/h4&gt;

&lt;p&gt;Aliases are super helpful &amp;amp; you can add that in your &lt;code&gt;zshrc&lt;/code&gt; as per your use-case &amp;amp; convenience. I wanted the lolcat effect for a few commands so I added the following aliases with lolcat in my config&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias ls='ls | lolcat'
alias pwd='pwd | lolcat'
alias gs='git status | lolcat'
alias tree='tree | lolcat'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope this was helpful! &lt;/p&gt;

&lt;p&gt;If you would like to share cool tricks with "lolcat" or anything else, I would love to hear from you! &lt;/p&gt;

&lt;p&gt;Also, on our medium blog:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/just2girlsintech/make-your-terminal-sassy-776465b1becd" rel="noopener noreferrer"&gt;https://medium.com/just2girlsintech/make-your-terminal-sassy-776465b1becd&lt;/a&gt;&lt;/p&gt;

</description>
      <category>terminal</category>
      <category>productivity</category>
      <category>linux</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Monitoring in AWS — Let’s cloud!</title>
      <dc:creator>Sonali</dc:creator>
      <pubDate>Fri, 21 Aug 2020 18:56:34 +0000</pubDate>
      <link>https://forem.com/sona_/monitoring-in-aws-let-s-cloud-7g3</link>
      <guid>https://forem.com/sona_/monitoring-in-aws-let-s-cloud-7g3</guid>
      <description>&lt;p&gt;Recently while debugging some performance related issues, I had to monitor the AWS resources that my application was using &amp;amp; a part of it involved checking out the cloudwatch alarms &amp;amp; metrics. While doing so I went deep into all the clouds — there’s cloudwatch, there’s cloudtrail, there’s config. What’s the purpose of these different clouds for monitoring ?&lt;br&gt;
Whatever you build on AWS, you will have to monitor it and also do some sort of logging &amp;amp; auditing so that you can get an idea of how your systems are performing.&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS CloudWatch:
&lt;/h1&gt;

&lt;p&gt;It’s a monitoring service for AWS resources and applications. Its main job is to &lt;strong&gt;monitor the performance &amp;amp; resources&lt;/strong&gt;. How is the performance affected based on certain actions of the user ? — Cloudwatch can tell you that. There are a bunch of things in cloudwatch:&lt;/p&gt;

&lt;h6&gt;
  
  
  1. Cloudwatch Metrics:
&lt;/h6&gt;

&lt;p&gt;It provides metrics for every service in AWS. For example CPUUtilization, network etc. There are up to 10 dimensions per metric. Dimensions is basically an attribute of a metric (eg — environment, instanceId etc). Metrics also have timestamps. We can create cloudwatch dashboards of these metrics. You can also define &amp;amp; send your own &lt;strong&gt;Custom Metrics&lt;/strong&gt; to cloudwatch using the putMetricData api call.&lt;/p&gt;

&lt;h6&gt;
  
  
  2. CloudWatch Dashboards:
&lt;/h6&gt;

&lt;p&gt;It consists of a bunch of graphs from same or different regions. It gives you a good visual representation. You can also set automatic refresh of the dashboard. You can choose any timeframe you want eg — last 6hrs , last 30 mins etc.&lt;/p&gt;

&lt;h6&gt;
  
  
  3. CloudWatch Logs:
&lt;/h6&gt;

&lt;p&gt;Cloudwatch can get logs from your application or various AWS resources eg: API Gateway, Route53, AWS lambda etc. Cloudwatch logs can also be sent to S3 or elastic search etc for further analytics.&lt;/p&gt;

&lt;h6&gt;
  
  
  4. CloudWatch Alarms:
&lt;/h6&gt;

&lt;p&gt;They are used to trigger notifications for any metric. eg messages on your SQS queue exceeded a certain limit etc. These alarms have 3 states OK, INSUFFICIENT_DATA, ALARM.&lt;/p&gt;

&lt;h6&gt;
  
  
  5. CloudWatch Events:
&lt;/h6&gt;

&lt;p&gt;It is a stream of system events describing changes in your AWS resources.&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS CloudTrail:
&lt;/h1&gt;

&lt;p&gt;It deals with &lt;strong&gt;API level monitoring&lt;/strong&gt;. When user logs into AWS and performs any actions — all that can be monitored using cloudtrail. So it has all the info of &lt;strong&gt;who made what changes&lt;/strong&gt; eg — I created new ec2 instance or I created a new queue etc all that info is monitored using cloudtrail. If you see that a resource is deleted in AWS — check your cloudtrail first. Cloudtrail is enabled by default.&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS Config:
&lt;/h1&gt;

&lt;p&gt;It records config level changes of your AWS resources. It also notifies if any changes are made to your account.&lt;/p&gt;

&lt;p&gt;Ummm…there are actually two more clouds left — &lt;strong&gt;Cloudformation &amp;amp; Cloudfront !!&lt;/strong&gt; But they have nothing to do with monitoring.&lt;/p&gt;

&lt;h6&gt;
  
  
  CloudFormation:
&lt;/h6&gt;

&lt;p&gt;It is just a template that will spin up all the AWS resources you need effortlessly. You just define whatever you want in that template &amp;amp; AWS magically creates it for you! &lt;a href="https://aws.amazon.com/cloudformation/"&gt;https://aws.amazon.com/cloudformation/&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  CloudFront:
&lt;/h6&gt;

&lt;p&gt;It’s just a content delivery network for low latency distribution of contents with high data transfer speeds. &lt;a href="https://aws.amazon.com/cloudfront/"&gt;https://aws.amazon.com/cloudfront/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Have fun clouding ;)!
&lt;/h2&gt;

&lt;p&gt;Also in medium on our blog: &lt;a href="https://medium.com/just2girlsintech/monitoring-in-aws-lets-cloud-2c122979cf2d"&gt;https://medium.com/just2girlsintech/monitoring-in-aws-lets-cloud-2c122979cf2d&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>performance</category>
      <category>logging</category>
    </item>
  </channel>
</rss>
