<?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: Abdullah Algarni</title>
    <description>The latest articles on DEV Community by Abdullah Algarni (@elgarni).</description>
    <link>https://dev.to/elgarni</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%2F113608%2Fccc76bb8-407b-4463-93a6-438c3cf5fe5b.png</url>
      <title>DEV Community: Abdullah Algarni</title>
      <link>https://dev.to/elgarni</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/elgarni"/>
    <language>en</language>
    <item>
      <title>Artistic Terminal with Docker &amp; Go</title>
      <dc:creator>Abdullah Algarni</dc:creator>
      <pubDate>Tue, 01 Jan 2019 00:22:09 +0000</pubDate>
      <link>https://dev.to/elgarni/artistic-terminal-with-docker--go-2h8b</link>
      <guid>https://dev.to/elgarni/artistic-terminal-with-docker--go-2h8b</guid>
      <description>&lt;p&gt;I am not a fan of using the &lt;em&gt;Terminal&lt;/em&gt;, and I've always liked seeing things, and clicking on them. But often times I find myself obligated to writing commands on the Terminal. Sometimes because it's faster, and sometimes it's the only way to getting my thing done.&lt;/p&gt;

&lt;p&gt;As with anything in life, sometimes things don't work out. And with the Terminal, errors can be daunting to grasp, and you will be like..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/13xHqoOQOdFu5a/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/13xHqoOQOdFu5a/giphy.gif" alt="alt text" title="Looking shocked"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because I like illustrations, I was thinking of something that I can watch on Terminal that would take my mind off whatever I was doing. Hence I came up with the following :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hFlCszFE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/Elgarni/Ascii-Art-with-Docker-and-Go/master/docs/result-on-terminal.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hFlCszFE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/Elgarni/Ascii-Art-with-Docker-and-Go/master/docs/result-on-terminal.gif" alt="alt text" title="Ascii art using Docker image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So I created a Docker image that wraps around a Go application that displays artistic text on the Terminal. To give it a go, you may run the following :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Your favorite word"&lt;/span&gt; elqarni/hala
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Going one step further, you might want to send the &lt;em&gt;"Docker run.."&lt;/em&gt; command to a friend, but with text hidden. You can hide the text by having it encoded with &lt;em&gt;base64&lt;/em&gt; .&lt;/p&gt;

&lt;p&gt;For example, the text &lt;em&gt;"Hello there"&lt;/em&gt; is encoded with base64 to &lt;em&gt;"SGVsbG8gdGhlcmU="&lt;/em&gt;. Then you run the command :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"SGVsbG8gdGhlcmU="&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;hidden&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true &lt;/span&gt;elqarni/hala
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In my case, I'd encourage you to run the following :)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"SGFwcHkgTmV3IFllYXI="&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;hidden&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true &lt;/span&gt;elqarni/hala
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Lastly, if you are interested, you can find &lt;em&gt;Dockerfile&lt;/em&gt; and &lt;em&gt;Go source code&lt;/em&gt; on &lt;a href="https://github.com/Elgarni/Ascii-Art-with-Docker-and-Go"&gt;Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>go</category>
      <category>terminal</category>
      <category>fun</category>
    </item>
  </channel>
</rss>
