<?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: krishna</title>
    <description>The latest articles on Forem by krishna (@krishnakummar).</description>
    <link>https://forem.com/krishnakummar</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%2F346263%2Ff3d3fcf1-c382-46cf-8c3b-9f834e71415a.jpg</url>
      <title>Forem: krishna</title>
      <link>https://forem.com/krishnakummar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/krishnakummar"/>
    <language>en</language>
    <item>
      <title>Grafana 414 - Network error request URI too large</title>
      <dc:creator>krishna</dc:creator>
      <pubDate>Thu, 24 Sep 2020 16:38:44 +0000</pubDate>
      <link>https://forem.com/krishnakummar/grafana-414-network-error-request-uri-too-large-12c8</link>
      <guid>https://forem.com/krishnakummar/grafana-414-network-error-request-uri-too-large-12c8</guid>
      <description>&lt;p&gt;When your filters and eventually your GET URL is too long Grafana panel says 414-Network error request URI too large&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y0Ok8Rhs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ea0b7o1u4vl50zemeelz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y0Ok8Rhs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ea0b7o1u4vl50zemeelz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But therez a simple fix to it.&lt;br&gt;
Change your HTTP method to POST, default is GET, in your Datasource settings&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ee1JsVCd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/aokjy1u0l5y5xagbxzlw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ee1JsVCd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/aokjy1u0l5y5xagbxzlw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>grafana</category>
      <category>rest</category>
      <category>414</category>
      <category>monitoring</category>
    </item>
    <item>
      <title>Quick and Clean Nginx dashboard</title>
      <dc:creator>krishna</dc:creator>
      <pubDate>Sat, 15 Aug 2020 05:43:26 +0000</pubDate>
      <link>https://forem.com/krishnakummar/quick-and-clean-nginx-dashboard-61e</link>
      <guid>https://forem.com/krishnakummar/quick-and-clean-nginx-dashboard-61e</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/allinurl/goaccess"&gt;Goaccess&lt;/a&gt; helps you to quickly put together a dashboard based on Nginx (and many other web servers) access logs.&lt;/p&gt;

&lt;p&gt;This solution is very neat as there is no need to run any frameworks for UI, no charting library plugin etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/allinurl/goaccess"&gt;Goaccess&lt;/a&gt; can parse the access logs, calculate the HTTP stats based on every log entry and generate a self contained .html file. As a bonus it als allows csv, json exports&lt;/p&gt;

&lt;p&gt;Docker command to generate a on-demand one time access log report&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;cat&lt;/span&gt; &lt;span class="nx"&gt;access&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;docker&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;rm&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="nx"&gt;LANG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;$LANG&lt;/span&gt; &lt;span class="nx"&gt;allinurl&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;goaccess&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt; &lt;span class="nx"&gt;html&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt; &lt;span class="nx"&gt;COMBINED&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Docker command for real-time report&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;cat&lt;/span&gt; &lt;span class="nx"&gt;access&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;docker&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="mi"&gt;7890&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;7890&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;rm&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="nx"&gt;LANG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;$LANG&lt;/span&gt; &lt;span class="nx"&gt;allinurl&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;goaccess&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt; &lt;span class="nx"&gt;html&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt; &lt;span class="nx"&gt;COMBINED&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;real&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WBbivY9A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1r0uhec78s9mehid1sk7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WBbivY9A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1r0uhec78s9mehid1sk7.png" alt="Sample dashboard output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is much more to &lt;a href="https://github.com/allinurl/goaccess"&gt;Goaccess&lt;/a&gt;, In this story I just wanted to share my enthusiasm in using this cool piece of OSS.&lt;/p&gt;

</description>
      <category>nginx</category>
      <category>monitoring</category>
      <category>webserver</category>
    </item>
    <item>
      <title>Read blocked medium stories without subscription</title>
      <dc:creator>krishna</dc:creator>
      <pubDate>Mon, 29 Jun 2020 17:13:05 +0000</pubDate>
      <link>https://forem.com/krishnakummar/read-blocked-medium-stories-without-subscription-37cn</link>
      <guid>https://forem.com/krishnakummar/read-blocked-medium-stories-without-subscription-37cn</guid>
      <description>&lt;p&gt;tl;dr — In medium.com, if a premium story is blocked like below, open the article link in browser’s private tab without logging into medium account. The article will get opened. Been using this hack for a while now. Make hay while the sun shines!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Blocked content&lt;/em&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BP7_27Y0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hgwp8im1n8hjcaefydxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BP7_27Y0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hgwp8im1n8hjcaefydxh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Same content unblocked in browser's private window&lt;/em&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hjHFGkvI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ffoq1avsfr58yv3kbidk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hjHFGkvI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ffoq1avsfr58yv3kbidk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I started to not like medium after they switched from free to premium service. Users can read only 3 premium stories for free/month, common guys that’s too less, also we, the users read a title and open it if we find it interesting. We do not bother whether it is a premium story or not and before we realize the count is 3 and we cannot read more premium content. IMHO this is not fair, users contribute amazing content to the site and the business is expecting the same users to subscribe makes me feel that the business is too money-minded and I don like it.&lt;/p&gt;

&lt;p&gt;These days I follow and write in &lt;a href="https://dev.to"&gt;https://dev.to&lt;/a&gt; more than medium.com. dev.to feels at home, with fellow developers contributing amazing content. &lt;/p&gt;

</description>
      <category>medium</category>
      <category>free</category>
      <category>subscription</category>
      <category>hack</category>
    </item>
    <item>
      <title>API versioning in golang ECHO</title>
      <dc:creator>krishna</dc:creator>
      <pubDate>Mon, 29 Jun 2020 15:34:07 +0000</pubDate>
      <link>https://forem.com/krishnakummar/api-versioning-in-golang-echo-5eh5</link>
      <guid>https://forem.com/krishnakummar/api-versioning-in-golang-echo-5eh5</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"net/http"&lt;/span&gt;

    &lt;span class="s"&gt;"github.com/labstack/echo"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;echo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;New&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; 

    &lt;span class="n"&gt;v1&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/v1"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;groupV1Routes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;v2&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/v2"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;groupv2Routes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;v2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Logger&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Fatal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;":8090"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;groupV1Routes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;echo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;grA&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/groupa"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;grA&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GET&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/event"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;handlerGet1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;grB&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/groupb"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;grB&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PATCH&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/:id"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;handlerPost&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;groupv2Routes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;echo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;grA&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/groupa"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   
    &lt;span class="n"&gt;grA&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GET&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/event"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;handlerGet2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;handlerGet1&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="n"&gt;echo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;error&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;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;StatusOK&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"THIS IS VERSION 1!"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;handlerGet2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="n"&gt;echo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;error&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;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;StatusOK&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"THIS IS VERSION TWO"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;handlerPost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="n"&gt;echo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;error&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;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;StatusOK&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Param&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"id"&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;



</description>
      <category>go</category>
      <category>api</category>
      <category>rest</category>
      <category>version</category>
    </item>
    <item>
      <title>Creating block diagrams from docker-compose files</title>
      <dc:creator>krishna</dc:creator>
      <pubDate>Sun, 22 Mar 2020 08:56:38 +0000</pubDate>
      <link>https://forem.com/krishnakummar/creating-block-diagrams-from-docker-compose-files-7kf</link>
      <guid>https://forem.com/krishnakummar/creating-block-diagrams-from-docker-compose-files-7kf</guid>
      <description>&lt;p&gt;A docker-compose file contains the definition of all the services that needs to run in harmony to successfully deploy an app stack.&lt;/p&gt;

&lt;p&gt;When services and their interactions are defined clearly in a compose file manually charting a block diagram to list those services and their interaction is redundant, isn't it ? that was the thought I had when I needed to chart a block diagram for documenting my architecture.&lt;/p&gt;

&lt;p&gt;A quick search using "tool to convert a docker compose file to a block diagram" yielded this awesome repo &lt;a href="https://github.com/pmsipilot/docker-compose-viz" rel="noopener noreferrer"&gt;https://github.com/pmsipilot/docker-compose-viz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code in this repo will help us to chart a block diagram from a docker compose file.&lt;/p&gt;

&lt;h5&gt;Lets create one!&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Sample docker-compose of a simple SaaS stack&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Command to execute&lt;/p&gt;

&lt;pre&gt;
docker run 
--rm -it \
--name dcv \ 
-v /home/user/blog:/input pmsipilot/docker-compose-viz \
render -m image \
--force docker-compose.yml \
--output-file=topology.png \
--no-volumes \
--no-ports \
--no-networks
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ouptput&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fim8n43o63sf93ix7tl1j.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%2Fim8n43o63sf93ix7tl1j.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Command - With port numbers&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;
docker run 
--rm -it \
--name dcv \ 
-v /home/user/blog:/input pmsipilot/docker-compose-viz \
render -m image \
--force docker-compose.yml \
--output-file=topology.png \
--no-volumes \
--no-networks
&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ouptput - with ports&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%2Fars9ca3tzm56qx8cafob.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%2Fars9ca3tzm56qx8cafob.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Command - With volumes&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;
docker run 
--rm -it \
--name dcv \ 
-v /home/user/blog:/input pmsipilot/docker-compose-viz \
render -m image \
--force docker-compose.yml \
--output-file=topology.png \
--no-ports \
--no-networks
&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Ouptput - with volumes
&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%2F88z7dvfa4vzcy538k6ac.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>webdev</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Designs I like — Swiggy’s popup driver map</title>
      <dc:creator>krishna</dc:creator>
      <pubDate>Tue, 17 Mar 2020 04:40:58 +0000</pubDate>
      <link>https://forem.com/krishnakummar/designs-i-like-swiggy-s-popup-driver-map-am4</link>
      <guid>https://forem.com/krishnakummar/designs-i-like-swiggy-s-popup-driver-map-am4</guid>
      <description>&lt;p&gt;Who doesn’t order food online these-days, swiggy is a popular food delivery app in India. After ordering the food, I keep looking at my mobile freq, but why? becoz I am hungry mate… I need my food right away. I need to know where my delivery guy is, i would like to call him if he takes a wrong turn, tell him some shortcuts, know how long it would take for him to handover so that I can eat something else in the meanwhile ;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cjkwwIPt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pm0ggjtri9hdg2wrpced.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cjkwwIPt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pm0ggjtri9hdg2wrpced.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I need to do all the above and then more, all the while using other apps. That’s where I find this pop-up map design very much helpful.&lt;br&gt;
This is an awesome design and flexibility from android for letting app developers do this intuitive and helpful design.&lt;/p&gt;

&lt;p&gt;Swiggy’s user empathy, in this regard, is better than Uber’s I would say.&lt;br&gt;
Though this is a common design in 2019, Uber for some reason doesn’t have this. One reason would be Uber’s driver arrival is supposed to be quicker and the passenger is expected to be ready while booking the cab. Is it?&lt;/p&gt;

&lt;p&gt;In real world, many a times Uber arrivals are easily &amp;gt; 15m and also there are scheduled rides. Consumers play 30s games these days to kill boredom so 15m is way too much for a ask, uber cannot argue about being quicker than swiggy. What do you think can be uber’s reason for not having this feature?&lt;/p&gt;

</description>
      <category>ux</category>
      <category>design</category>
      <category>swiggy</category>
      <category>uber</category>
    </item>
    <item>
      <title>Be a developer before being a devops</title>
      <dc:creator>krishna</dc:creator>
      <pubDate>Sun, 08 Mar 2020 07:37:50 +0000</pubDate>
      <link>https://forem.com/krishnakummar/be-a-developer-before-being-a-devops-2k68</link>
      <guid>https://forem.com/krishnakummar/be-a-developer-before-being-a-devops-2k68</guid>
      <description>&lt;p&gt;In my opinion a devops person with software developer background can do better in devops than direct devops dive-in.&lt;/p&gt;

&lt;p&gt;Writing substantial amount of code, trying to scale it, refactor, maintain, observe, debugging, unit testing, picking a framework for a project are all a must-need experience for a devops person to function effectively in their devops role. In short, there cannot be a junior devops engineer.&lt;/p&gt;

&lt;p&gt;Without coding experience it will be difficult to understand concepts like state management, code versioning, code performance, library dependencies, packaging, need for containers, distributed tracing, why centralized logging and the list will go on. And these concepts are very much part of devops.&lt;/p&gt;

&lt;p&gt;A devops role demands someone to learn a suite of tools to implement end-end automation. Anyone can learn these suite of tools without prior software development but that doesn’t make them devops ready. Being a software developer and working for few years as a developer is the very first step in becoming devops ready.&lt;/p&gt;

&lt;p&gt;Software development is a very wide spectrum, every software dev solves different kinds of problems with different software development tool sets. Having hands-on in all these tools is close to impossible. With plethora of tools in devops space, sometimes even experienced developers find it little intriguing to understand what a particular tool is for and what kind of problem it solves. Learning to use a tool is easy but the ability to decide right tool for the right job and the optimal usage of the tool will come with years of experience on software development.&lt;/p&gt;

</description>
      <category>devops</category>
    </item>
    <item>
      <title>Python programming and scripting</title>
      <dc:creator>krishna</dc:creator>
      <pubDate>Sat, 07 Mar 2020 13:38:34 +0000</pubDate>
      <link>https://forem.com/krishnakummar/python-programming-and-scripting-5gdh</link>
      <guid>https://forem.com/krishnakummar/python-programming-and-scripting-5gdh</guid>
      <description>&lt;p&gt;I think python scripting and python programming are two different things. Python scripts can be used to automate a specific task or glue scripted tasks. Whereas programming is an organised structure, modular, unit-testable, easily maintained compared to scripts.&lt;/p&gt;

&lt;p&gt;Python is a versatile dynamic language and can be leveraged both as a scripting and programming language.&lt;/p&gt;

&lt;p&gt;If you are very clear that your task is going to accomplish just one specific objective and does not scale up in future write a python script to execute just this one piece or glue other scripts written already. But if you foresee that your task can scale up tomorrow and can grow like a mindmap please do not write ten scripts and then write a script gluing these scripts, rather organize a structure using classes or try to leverage existing frameworks to accomplish your objective.&lt;/p&gt;

&lt;p&gt;Check this awesome python repo &lt;a href="https://github.com/vinta/awesome-python"&gt;https://github.com/vinta/awesome-python&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>ruby</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Build a wingman UI for your product</title>
      <dc:creator>krishna</dc:creator>
      <pubDate>Thu, 05 Mar 2020 12:15:41 +0000</pubDate>
      <link>https://forem.com/krishnakummar/build-a-wingman-ui-for-your-product-3c8d</link>
      <guid>https://forem.com/krishnakummar/build-a-wingman-ui-for-your-product-3c8d</guid>
      <description>&lt;p&gt;Imagine you are a startup trying to pitch your idea with the prototype to potential customers, then there will be several instances where you need to generate data, content, user login sessions etc. With all this simulated data properly sitting in the UI, you can plan and pitch your demo better. In order to do this consistently and repeatedly, a separate monolith UI+scripts totally other than your product interface just to simulate actual use cases would help you to deliver your pitch better and might even save time.&lt;/p&gt;

&lt;p&gt;I have been working as full-stack developer with infrastructure based startups for the past several years. The product that gets built in these startups involves state, data, sessions, health checks, multiple user logins from several actual services, infrastructure and cloud resources. In all these products, we built and separate monolith demo UI to bring up and tear-down resources and services on-demand. These services would then push the actual data into the portal’s database and eventually into product portal’s UI. This method has helped us better rather than triggering the simulation using scripts.&lt;/p&gt;

&lt;p&gt;For example, lets say you are building a highly scalable and performant video conference app and you would like to demonstrate the scalability of the product by really starting, not just emulating, 100’s of conferences with 10’s of users in each conference. This can be built using a script. Instead built a Demo UI and trigger this script from a UI button. This way you can clearly showcase what you are trying simulate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of building a demo portal&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Repeatability&lt;/b&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Flexibility to pass dynamic inputs&lt;/li&gt;
&lt;li&gt;Better clarity on what the simulation script does&lt;/li&gt;
&lt;li&gt;Your CEO doesn’t have to SSH into a machine and trigger the scripts&lt;/li&gt;
&lt;li&gt;Extend and scale the portal to show more info like dev metrics, logs, etc&lt;/li&gt;
&lt;li&gt;Can be easily containerized and used by many&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Demo portal can be really lean&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Just one user login with a strong password&lt;/li&gt;
&lt;li&gt;UI need not be aesthetically pleasing a decent one would do&lt;/li&gt;
&lt;li&gt;Monolith app. API, microservices based development is not mandatory&lt;/li&gt;
&lt;li&gt;If code is containerized, hosting in public cloud’s managed container service would help&lt;/li&gt;
&lt;li&gt;Must have features in Demo UI&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In all the demo UI built for infrastructure products there are these common functionalities&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tear-down all the resources&lt;/li&gt;
&lt;li&gt;Reset Configuration&lt;/li&gt;
&lt;li&gt;As the demo clicks are launching resources , its very important to tear them down and save cloud cost. As you are playing around changing configurations of the services and resources, we will screw up several things in the process and these configurations needs to be reset to some defaults.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Technologies&lt;/strong&gt; I prefer building this portal - nodejs, docker, bootstrap, jquery, keeping it simple.&lt;/p&gt;

</description>
      <category>node</category>
      <category>docker</category>
    </item>
  </channel>
</rss>
