<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Tools on Techformist</title>
    <link>https://techformist.com/categories/tools/</link>
    <description>Recent content in Tools on Techformist</description>
    <image>
      <url>https://techformist.com/logo.svg</url>
      <link>https://techformist.com/logo.svg</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 28 May 2023 06:30:00 +0000</lastBuildDate><atom:link href="https://techformist.com/categories/tools/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Zoomit - Light-weight presentation and draw tool for Windows</title>
      <link>https://techformist.com/zoomit-annotate-draw-present-tool/</link>
      <pubDate>Sun, 28 May 2023 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/zoomit-annotate-draw-present-tool/</guid>
      <description>&lt;p&gt;I continue to be amazed by the depth of tools created by Sysinternals even after all the tools I have used over years. Zoomit is certainly one of them.&lt;/p&gt;
&lt;p&gt;Now, how many times have you wondered about making things a weebit exciting by drawing something on the screen while you are presenting stuff. Not taking screenshots and pasting in other programs, not using Powerpoint tools and not using video tools - just plain old &lt;code&gt;do things live&lt;/code&gt; and switch context, quickly.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I continue to be amazed by the depth of tools created by Sysinternals even after all the tools I have used over years. Zoomit is certainly one of them.</p>
<p>Now, how many times have you wondered about making things a weebit exciting by drawing something on the screen while you are presenting stuff. Not taking screenshots and pasting in other programs, not using Powerpoint tools and not using video tools - just plain old <code>do things live</code> and switch context, quickly.</p>
<p>Enter Zoomit, a lightweight gem that allows users to effortlessly zoom in, annotate, and draw on their screens, bringing presentations to life.</p>
<ul>
<li>light-weight program, super performant</li>
<li>requires less context switching &amp; shuffling windows</li>
<li>no additional devices needed - all you need is a keyboard &amp; mouse</li>
<li>free</li>
</ul>
<p>ZoomIt&rsquo;s superpower is its ability to annotate anything on your screen with ease. Whether you&rsquo;re giving a coding demo, dissecting complex diagrams, or discussing intricate details, you can effortlessly highlight and explain concepts.</p>
<p>Just hit the shortcut <code>Ctrl + 2</code> and you can -</p>
<ul>
<li>draw lines, shapes, &amp; arrows</li>
<li>Zoom to pointer</li>
<li>write directly on your slides or other applications in real-time</li>
<li>save a screenshot / recording with all the annotations</li>
</ul>
<p>Hit <code>Esc</code> and you can continue the amazing thing that you were doing.</p>
<p><img loading="lazy" src="/2023/annotate-using-zoomit.gif" type="" alt="annotate-using-zoomit"  /></p>
<p>Of course, you take more time when you get started since there is no window to interact with (except for the icon in the system tray). Once you get over that bump, you are going to be as productive as one can be.</p>
<p><a href="https://learn.microsoft.com/en-us/sysinternals/downloads/zoomit">See more / download Zoomit</a> from Microsoft site.</p>
<p>Annoyances -</p>
<ol>
<li>Initial curve may put off people</li>
<li>Getting over the muscle memory of using <code>Ctrl+1</code> / <code>Ctrl+2</code> / etc. in many programs (especially tabs in browsers or in VSCode)</li>
</ol>
<p>Alternatives -</p>
<ul>
<li><a href="https://epicpen.com/">Epic Pen</a> has a free version &amp; looks great. You need a pro version for something basic like drawing rectangles</li>
<li><a href="https://apps.microsoft.com/store/detail/snipping-tool/9MZ95KL8MR0L">Microsoft Snip &amp; Sketch</a>: Comes with windows, or download from Appstore. Free, but the experience is not as pleasant - opens up a new window</li>
</ul>
<p>You can also choose to use <a href="https://support.microsoft.com/en-au/office/draw-and-write-with-ink-in-office-6d76c674-7f4b-414d-b67f-b3ffef6ccf53">Ink tools</a> from Microsoft on supported devices.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Valuable Site of the Month (Dec &#39;20) - Try Simple CSS Frameworks</title>
      <link>https://techformist.com/vsom-dec-2020/</link>
      <pubDate>Wed, 23 Dec 2020 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/vsom-dec-2020/</guid>
      <description>&lt;p&gt;It is no secret that I am a fan of Vue and Vuetify / Quasar. While the styling libraries get stuff done real quick, I often do demo projects or throw-away sites that do not need the heavy hitters. While the project development may be quick and all they enjoy is a couple of hours of show-time, I cannot quite afford to show an app without some basic styling.&lt;/p&gt;
&lt;p&gt;Here are a couple of my favourite CSS libraries to the rescue -&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>It is no secret that I am a fan of Vue and Vuetify / Quasar. While the styling libraries get stuff done real quick, I often do demo projects or throw-away sites that do not need the heavy hitters. While the project development may be quick and all they enjoy is a couple of hours of show-time, I cannot quite afford to show an app without some basic styling.</p>
<p>Here are a couple of my favourite CSS libraries to the rescue -</p>
<ul>
<li><a href="https://andybrewer.github.io/mvp/">MVP.css</a></li>
<li><a href="https://milligram.io">Milligram</a></li>
<li><a href="https://ajusa.github.io/lit/">lit.css</a></li>
</ul>
<p>I prefer a &ldquo;class-less&rdquo; approach to styling in quick projects -</p>
<ol>
<li>All I need is HTML and the styling is done</li>
<li>I get a head start and can sprinkle styling as I go deeper in the project</li>
</ol>
<p>While there are quite a few <a href="http://getskeleton.com/">skeleton.css</a> inspired libraries, there are a few challenges that come with them -</p>
<ol>
<li>A few elements that I deem as &ldquo;basic needs&rdquo; may be missing</li>
<li>Grids and the power of grids may vary greatly since most of these libraries are super light weight</li>
<li>Ability to extend the styling may vary</li>
</ol>
<p>In situations like these, and when I have to quickly decide a package to move forward, I turn to this website -
<a href="https://dohliam.github.io/dropin-minimal-css/">https://dohliam.github.io/dropin-minimal-css/</a></p>
<p><img loading="lazy" src="/2020/simple-css-preview-site.jpg" type="" alt="simple-css-preview-site"  /></p>
<p>This is a rather useful tool in your arsenal -</p>
<ul>
<li>get a bird&rsquo;s eye view of how the CSS styles look</li>
<li>get an overview of supported functions</li>
<li>compare different css frameworks quickly</li>
</ul>
<p>While rendering in a few libraries are wierd on the site, it no doubt provides a really good starting point if you are looking to explore and quickly try out &ldquo;simple&rdquo; and light-weight CSS libraries.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Request Redirect for Nginx in SPAs</title>
      <link>https://techformist.com/request-redirect-nginx-spa/</link>
      <pubDate>Wed, 09 Sep 2020 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/request-redirect-nginx-spa/</guid>
      <description>&lt;p&gt;Redirection can be easy enough on Nginx. Let&amp;rsquo;s see how we can utilise that for our single page applications coded in Vue, React, etc.&lt;/p&gt;
&lt;h2 id=&#34;nginx-and-redirection&#34;&gt;Nginx and Redirection&lt;/h2&gt;
&lt;p&gt;Nginx configuration is simple but powerful. All we need is a couple of lines to setup our server.&lt;/p&gt;
&lt;p&gt;Add the below lines to the Nginx configuration files (e.g. in &lt;code&gt;/etc/nginx/sites-enabled/domain.com.conf&lt;/code&gt; in Ubuntu).&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;server {
    listen        80;
    server_name   domain.com;
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Start the Nginx server, and lo and behold - our web server is ready to serve magic at port 80. Go to &lt;code&gt;domain.com&lt;/code&gt; in browser and see your beautiful app.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Redirection can be easy enough on Nginx. Let&rsquo;s see how we can utilise that for our single page applications coded in Vue, React, etc.</p>
<h2 id="nginx-and-redirection">Nginx and Redirection</h2>
<p>Nginx configuration is simple but powerful. All we need is a couple of lines to setup our server.</p>
<p>Add the below lines to the Nginx configuration files (e.g. in <code>/etc/nginx/sites-enabled/domain.com.conf</code> in Ubuntu).</p>
<pre tabindex="0"><code>server {
    listen        80;
    server_name   domain.com;
}
</code></pre><p>Start the Nginx server, and lo and behold - our web server is ready to serve magic at port 80. Go to <code>domain.com</code> in browser and see your beautiful app.</p>
<p>We can add redirection in the mix with a single line.</p>
<pre tabindex="0"><code>server {
    listen        80;
    server_name   domain.com;
    return        301 http://other_domain.com$request_uri;
}
</code></pre><p>This is a simple <code>301</code> redirection that informs requester (i.e., browser) that the web page at <code>domain.com</code> is redirected to <code>other_domain.com</code> permanently. Any suffix included with the original domain (e.g. <code>https://domain.com/awesome-page/1</code>) is sent to the redirected domain by using <code>$request_uri</code>. You can redirect any page to any other page within or outside the domain. We have previously seen this applied to <a href="/create-404-pages-vue-app">manage 404 error in Vue in Nginx</a>.</p>
<p>Replace <code>301</code> in the <code>return</code> statement to <code>302</code>, and you have a temporary redirect. I don&rsquo;t quite find a use case for temporary redirections, and can&rsquo;t claim to know how Google or other search engines respond to them, but.. they exist.</p>
<p>Alternatively, you could use a <code>rewrite</code> -</p>
<pre tabindex="0"><code>server {
    listen      80;

    location / {
      rewrite     ^(.*)   https://other_domain.com permanent;
    }
}
</code></pre><p>This statement indicates that all requests to the domain that server is listening to have to be redirected to some other domain.</p>
<p><code>rewrite</code> allows us to use regex and handle complex scenarios for redirection within or outside the domain.</p>
<p>For example -</p>
<pre tabindex="0"><code>server {
    # ...
    rewrite ^(/download/.*).?.*$ files.domain.com/downloads/$2;

    #...
}
</code></pre><p>I don&rsquo;t quite use Nginx to its full capacity and have rather naive considerations on when to use <code>rewrite</code> vs <code>redirect</code>-</p>
<ul>
<li>Simple use cases can be addressed by <code>redirect</code></li>
<li><code>rewrite</code> handles only 301 and 302 redirects (more on this in a bit)</li>
<li>Redirects based on conditions (e.g. */download/* should be directed to <code>files.domain.com</code> URL) are possible only using <code>rewrite</code></li>
</ul>
<p>While complex conditions are candidates for <code>rewrite</code>, I typically manage &ldquo;all things&rdquo; in the SPA or using server routes. But, there&rsquo;s more.</p>
<h2 id="nginx-redirection-in-spas">Nginx Redirection in SPAs</h2>
<p>Single page applications handle all routing on the client (well, typically). You can have something like a <code>vue-router</code> installed, throw in the routes in a <code>route.js</code> file and the application happily does all the redirections without help from server.</p>
<p>All we need from server is -</p>
<pre tabindex="0"><code>server {
    server_name domain.com;
    listen 80;
    root /usr/www/domain;
    index index.html index.htm;

    location / {
            try_files $uri $uri/ /index.html;
    }
    location /api/ {
            proxy_pass http://localhost:5000;
            proxy_set_header Host $host;
    }
}
</code></pre><p>In Ubuntu -</p>
<ul>
<li>you can enter this configuration in <code>/etc/nginx/sites-available/domain.com.conf</code> and</li>
<li>setup a link in <code>/etc/nginx/sites-enabled/domain.com.conf</code></li>
</ul>
<p>We are achieving quite a bit with these few lines -</p>
<ul>
<li>use yet another redirection directive called <code>try_files</code> to redirect any request (exceptions - see below) to <code>$uri</code> to a corresponding file with the same name accessible on web server. Point the request to <code>/index.html</code> if there is no file at <code>$uri</code>. The request is then handled by the SPA router</li>
<li>redirect any requests with <code>domain.com/api/</code> to another port on the server. This sets up reverse proxy and opens up the backend server (at port 5000) to the world through our domain</li>
</ul>
<p>See <a href="https://www.nginx.com/blog/creating-nginx-rewrite-rules/">this rewrite rules post</a> for a more detailed comparison of what each of those directives can do.</p>
<p>The above configuration sets up a full-fledged web server for your SPA, but there&rsquo;s one thing missing. That is for <code>http</code> to <code>https</code> redirection.. which is as easily done.</p>
<pre tabindex="0"><code>server {
    server_name domain.com;
    listen 80;
    return 301 https://$host$request_uri;
}

server {
    server_name domain.com;
    listen 443 ssl;
    root /usr/www/domain;
    index index.html index.htm;

    location / {
            try_files $uri $uri/ /index.html;
    }
    location /api/ {
            proxy_pass http://localhost:5000;
            proxy_set_header Host $host;
    }
}
</code></pre><p>This is all you need to setup a simple web server serving your SPA with Nginx.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Using Caddy with Quasar</title>
      <link>https://techformist.com/quasar-vue-caddy/</link>
      <pubDate>Wed, 17 Jun 2020 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/quasar-vue-caddy/</guid>
      <description>&lt;p&gt;I switched to Caddy recently on one of our servers to host multiple applications and am super happy about its simplicity and ease of use. Here&amp;rsquo;s how I use Caddy with Quasar.&lt;/p&gt;
&lt;h2 id=&#34;what-is-caddy&#34;&gt;What is Caddy?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://caddyserver.com/v2&#34;&gt;Caddy&lt;/a&gt; is a web server much like Nginx. It calls itself &amp;ldquo;a new kind of extensible platform for server apps&amp;rdquo;. Features include -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Easy configuration (super readable config. files - we will get to this in a bit)&lt;/li&gt;
&lt;li&gt;Configuration is exposed as APIs (JSON files can be used to create/change configuration)&lt;/li&gt;
&lt;li&gt;An extensible plugin system&lt;/li&gt;
&lt;li&gt;Automatic https using Let&amp;rsquo;s Encrypt&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Caddy does all this with a single executable, and a single configuration file.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I switched to Caddy recently on one of our servers to host multiple applications and am super happy about its simplicity and ease of use. Here&rsquo;s how I use Caddy with Quasar.</p>
<h2 id="what-is-caddy">What is Caddy?</h2>
<p><a href="https://caddyserver.com/v2">Caddy</a> is a web server much like Nginx. It calls itself &ldquo;a new kind of extensible platform for server apps&rdquo;. Features include -</p>
<ol>
<li>Easy configuration (super readable config. files - we will get to this in a bit)</li>
<li>Configuration is exposed as APIs (JSON files can be used to create/change configuration)</li>
<li>An extensible plugin system</li>
<li>Automatic https using Let&rsquo;s Encrypt</li>
</ol>
<p>Caddy does all this with a single executable, and a single configuration file.</p>
<p><img loading="lazy" src="/2020/caddy.jpg" type="" alt="caddy"  /></p>
<p>Caddy version 2 caused some ground-breaking changes from v1. Since I did not quite use v1, can&rsquo;t really compare how they fare. Caddy is free to use and is licensed under Apache 2.0 open source license.</p>
<h2 id="why-use-caddy">Why use Caddy?</h2>
<p>The most important factor for me - Caddy enables quick setup of a server with multiple apps without spending hours on configuration.</p>
<p>As a non sysadmin developer, I approach server configuration with some skepticism. I cannot quite get away from it due to cheaper costs, but I would rather spend time creating something else rather than fiddling with server configuration.</p>
<p>Nginx has been a great companion. The configuration files are just ok and I don&rsquo;t mind them as long as they are setup only once. However, introducing multiple apps, APIs and static file hosting on same server confuses me and requires quite a bit of trial &amp; error configuration.</p>
<p>Over years I have tried solving the problem with a few options -</p>
<ul>
<li>Use cookie cutter config files with Nginx</li>
<li>Nginx configuration file generator</li>
<li>Alternate server options (there are many options but one needs to be careful about a solution that is too niche or has a thin community behind it)</li>
<li>Self-hosting solutions like Parse that let&rsquo;s me get away with backend configuration changes</li>
</ul>
<p>It is with that background that I find Caddy a refreshing change. With minimal configuration, easier changes and acceptable performance, Caddy works great for this use case.</p>
<h2 id="my-typical-use-case">My Typical Use Case</h2>
<p>My preferred architecture when using &ldquo;quick&rdquo; Vue apps -</p>
<ol>
<li>A node server that serves APIs and database on a 2-4 GB server</li>
<li>Front-end hosted on same server. VueJS is my framework of choice</li>
<li>Static content on Github, Netlify or similar</li>
</ol>
<p>Each server typically hosts 1-4 production apps or <code>x</code> test/MVP apps.</p>
<p>The Caddy server should -</p>
<ol>
<li>handle API requests and proxy them to Node server. The requests may be from the frontend application or from external systems</li>
<li>handle frontend requests when routing to different pages</li>
</ol>
<h2 id="caddy-configuration">Caddy Configuration</h2>
<p>While I found Caddy documentation to be great in general, the examples seem to be for a more &ldquo;in the know&rdquo; audience. The radical changes from v1 to v2 have made some of the previous content irrelevant.</p>
<p>I typically use <code>Caddyfile</code> to store Caddy configuration, which does not appear to be future-proof but is fully supported and quite easy to use. The structure looks somewhat like this -</p>
<pre tabindex="0"><code>example.com {
    root * /usr/www/example
    file_server
}
</code></pre><p>You can store this file wherever you please, but I use <code>/etc/caddy/Caddyfile</code>.</p>
<p>I can now start Caddy with -</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo caddy start -config /etc/caddy/Caddyfile
</span></span></code></pre></div><p>I will switch to configuration using JSON at some point in time with a typical structure looking like this -</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;apps&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;tls&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">      <span class="nt">&#34;certificates&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">        <span class="nt">&#34;automate&#34;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&#34;example.com&#34;</span><span class="p">,</span> <span class="s2">&#34;another-example.net&#34;</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">      <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl">  <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span></code></pre></div><p>The JSON format is not quite difficult to understand, but more &ldquo;typing&rdquo;. I don&rsquo;t send API requests to configure web servers (thank heavens), and the specific port remains closed in the firewall.</p>
<h2 id="caddy-and-quasar">Caddy and Quasar</h2>
<p>While I knew Caddy&rsquo;s configuration was quite simple, I could not get it to play nicely with client-side routing of Vue apps at the beginning.</p>
<p>After some hit &amp; miss, and lot of searching on Google, I have this configuration that simply works.</p>
<pre tabindex="0"><code># Caddyfile
example.com {
    root * /usr/www/example

    route {
        reverse_proxy /api/* localhost:3000
        try_files {path} {path}/ /index.html
        file_server
    }
}

another-example.net {
    root * /usr/www/anotherexample
    file_server
}
</code></pre><p>This file accomplishes the following -</p>
<ol>
<li>Host site <code>example.com</code>
<ul>
<li>redirect all requests with <code>/api/*</code> to <code>localhost:3000</code>. The node server listens on port 3000, and that port is not open to the Internet</li>
<li>redirect any request to <code>/</code> and allow Vue to handle routing. I do this using <code>try_files {path} {path}/ /index.html</code>, which tries locating for a file with the name passed from URL and redirects to it. If no file is found, it directs to <code>index.html</code></li>
<li>the <code>route</code> statement ensures that Caddy follows the given order while handling URLs. APIs with <code>/api/</code> are served by Node server and other URLs are served by client-side routing</li>
</ul>
</li>
<li>Host site <code>another-example.net</code>
<ul>
<li>serve files in <code>/usr/www/anotherexample</code></li>
</ul>
</li>
</ol>
<p>All I now need to is point the domain name to the IP address of this server and both <code>example.com</code> and <code>another-example.net</code> just work!</p>
<h2 id="when-not-to-use-caddy">When not to use Caddy?</h2>
<p>Caddy works great for all my use cases. I don&rsquo;t quite build Twitter or Facebook level apps - so I should be ok I guess.</p>
<p>At the same time, I will not quite migrate everything to Caddy at this time. If you have configured Nginx a couple of times, you know that all it takes is some &ldquo;lazy copy/paste&rdquo; to get the whole thing working. Simpler needs = simple tasks = no need to take drastic action to change status quo.</p>
<p>You may also not want to use Caddy if you -</p>
<ul>
<li>manage quite an intensive server that handles high traffic volumes. Nginx can manage twice the processing</li>
<li>want to consume as less memory as possible. Caddy is light-weight but not as much as Nginx, and can consume more than double the memory</li>
</ul>
<p>See -</p>
<ul>
<li><a href="https://community.centminmod.com/threads/caddy-v2-versus-centmin-mod-nginx-http-2-http-3-https-benchmarks.19700/">benchmarks for Caddy2 vs Nginx on Centminmod forums</a>.</li>
</ul>
<h2 id="finis">Finis</h2>
<p>I personally believe in a great future for Caddy. It has a great community, good documentation and is a delight to use.</p>
<p>Start using Caddy for your dev/test environments and see the difference. Migrating production environments may be a long drawn out decision based on your intended use.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Setup Development Workspace in WSL2</title>
      <link>https://techformist.com/setup-dev-workspace-wsl2/</link>
      <pubDate>Fri, 29 May 2020 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/setup-dev-workspace-wsl2/</guid>
      <description>&lt;p&gt;WSL2 was released yesterday along with Windows10 May 2020 update (v2004). WSL2 enables to work with Linux kernels within Windows, and it brings some crazy possibilities for those of us who refuse to dual boot or switch over completely to Linux.&lt;/p&gt;
&lt;p&gt;I am assuming that you already have installed Windows v2004 through the normal Windows update channel, or through the &lt;a href=&#34;https://support.microsoft.com/en-us/help/3159635/windows-10-update-assistant&#34;&gt;update assistant&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Once you are on Windows10 2004, here&amp;rsquo;s how you can setup a cool WSL2 development environment.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>WSL2 was released yesterday along with Windows10 May 2020 update (v2004). WSL2 enables to work with Linux kernels within Windows, and it brings some crazy possibilities for those of us who refuse to dual boot or switch over completely to Linux.</p>
<p>I am assuming that you already have installed Windows v2004 through the normal Windows update channel, or through the <a href="https://support.microsoft.com/en-us/help/3159635/windows-10-update-assistant">update assistant</a>.</p>
<p>Once you are on Windows10 2004, here&rsquo;s how you can setup a cool WSL2 development environment.</p>
<h2 id="installation">Installation</h2>
<h3 id="wsl2">WSL2</h3>
<p>If you don&rsquo;t have WSL yet, install it from <code>Start</code> &gt; <code>Turn Windows Features On or Off</code>. Check <code>Windows Subsystem for Linux</code>. This should install WSL2. If you had WSL1 in previous Windows versions, the option will remain checked and you don&rsquo;t have to do anything else.</p>
<p><img loading="lazy" src="/2020/wsl-features-windows.jpg" type="" alt="wsl-features-windows"  /></p>
<p>Install <a href="https://www.microsoft.com/en-us/search?q=debian">Debian</a> or Ubuntu from Microsoft Store.</p>
<p>If Debian/Ubuntu/other flavours were already installed on your computer (in WSL1), you would have to upgrade the kernel. Do that by following instructions on this <a href="https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel">page</a>. Future upgrades may not need this manual step.</p>
<p>Verify whether you are running the right version of the kernel -</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">wsl -l -v
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  NAME      STATE           VERSION
</span></span><span class="line"><span class="cl">* Debian    Running         2
</span></span></code></pre></div><p>Version 1 will imply that you are still running WSL1, else you should be all set with WSL2.</p>
<h3 id="terminal">Terminal</h3>
<p><a href="https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?rtc=1">Install Windows Terminal</a> from Microsoft Store if you don&rsquo;t already have it. While this is optional, the app makes for a delightful terminal experience.</p>
<p>Of course, you can always continue to use <a href="https://cmder.net/">Cmder</a>, or any other emulator.</p>
<p>Once Terminal is installed, open Terminal &gt; Click on the dropdown in Toolbar &gt; Open <code>Settings</code>. You add instructions to open command prompt, Powershell or WSL in the settings file. You can also change themes, colors or fonts for Terminal window.</p>
<p>Add an entry for Debian under <code>Profiles</code>-</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;acrylicOpacity&#34;</span><span class="p">:</span> <span class="mf">0.5</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;closeOnExit&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;colorScheme&#34;</span><span class="p">:</span> <span class="s2">&#34;One Quarter Dark&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;commandline&#34;</span><span class="p">:</span> <span class="s2">&#34;wsl.exe -d Debian&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;cursorColor&#34;</span><span class="p">:</span> <span class="s2">&#34;#FFFFFF&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;cursorShape&#34;</span><span class="p">:</span> <span class="s2">&#34;bar&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;fontFace&#34;</span><span class="p">:</span> <span class="s2">&#34;Consolas&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;fontSize&#34;</span><span class="p">:</span> <span class="mi">16</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;guid&#34;</span><span class="p">:</span> <span class="s2">&#34;{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;historySize&#34;</span><span class="p">:</span> <span class="mi">9001</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;icon&#34;</span><span class="p">:</span> <span class="s2">&#34;ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;name&#34;</span><span class="p">:</span> <span class="s2">&#34;Debian&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;padding&#34;</span><span class="p">:</span> <span class="s2">&#34;0, 0, 0, 0&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;snapOnInput&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;useAcrylic&#34;</span><span class="p">:</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span><span class="err">,</span>
</span></span></code></pre></div><p>Note the change in <code>colorScheme</code> - you may use any color scheme that is already part of the settings.</p>
<p>The settings file I use is at <a href="https://gist.githubusercontent.com/prashanth1k/576c1c309c9aad7a8907d06137d219e9/raw/86331481c1d331a06c18c1d98d36c1a143709e44/terminal-settings.json">this Gist</a>.</p>
<p>You are now all set to access WSL2 from your terminal. Just click on the dropdown and select <code>Debian</code> profile to open WSL2.</p>
<h2 id="initial-setup">Initial Setup</h2>
<p>I love to work with <a href="https://fishshell.com/">Fish shell</a> since it has beautiful defaults that includes useful functions like auto complete, and an easy-to-use customiser (among others).</p>
<p>Install Fish.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl"><span class="k">echo</span> &#39;deb http://download.opensuse.org/repositories/shells:/fish:/release:/3/Debian_10/ /&#39; <span class="p">|</span> sudo tee /etc/apt/sources.list.d/shells:fish:release:3.list
</span></span><span class="line"><span class="cl">sudo wget -nv https://download.opensuse.org/repositories/shells:fish:release:3/Debian_10/Release.key -O <span class="s2">&#34;/etc/apt/trusted.gpg.d/shells:fish:release:3.asc&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">apt-get update
</span></span><span class="line"><span class="cl">apt-get install fish
</span></span></code></pre></div><p>See <a href="https://software.opensuse.org/download.html?project=shells%3Afish%3Arelease%3A3&amp;package=fish">this page for more detailed instructions</a>.</p>
<h3 id="optional-change-root-password">Optional: Change root password</h3>
<p>If you have setup a non-root user (which you normally do during install) and already logged in as that user, or did not setup root password yet, you an do that now.</p>
<p>First, login to Windows command prompt and set default WSL user.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">debian config --default-user root
</span></span></code></pre></div><p>.. or in case of Ubuntu..</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">ubuntu.exe config --default-user root
</span></span></code></pre></div><p>Open a new terminal to login as root. Change password.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">passwd
</span></span></code></pre></div><p>Reset default user to your user id.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">debian config --default-user <span class="p">&lt;</span>your_userid&gt;
</span></span></code></pre></div><p>Exit from current terminal that is logged in as root and open a new window to just be yourself.</p>
<h3 id="configure-fish-shell">Configure fish shell</h3>
<p>Change default shell to fish.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">chsh -s `which fish`
</span></span></code></pre></div><p>Install <a href="https://github.com/oh-my-fish/oh-my-fish">oh my fish</a> to make your shell beautiful.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">curl -L https://get.oh-my.fish <span class="p">|</span> fish
</span></span></code></pre></div><p>Now you can install themes or add new functions to fish.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">omf list <span class="c1"># list themes &amp; plugins installed</span>
</span></span><span class="line"><span class="cl">omf theme <span class="c1"># list themes</span>
</span></span><span class="line"><span class="cl">omf install clearance <span class="c1"># install clearance theme</span>
</span></span><span class="line"><span class="cl">omf theme default <span class="c1"># change back to default theme</span>
</span></span></code></pre></div><p><img loading="lazy" src="/2020/windows-terminal-wsl2.jpg" type="" alt="windows-terminal-wsl2"  /></p>
<h2 id="setup-your-favourite-programs">Setup Your Favourite Programs</h2>
<h3 id="nvm--node">NVM / Node</h3>
<p>We will not install Node directly, but use NVM.</p>
<p>First install NVM..</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh <span class="p">|</span> bash
</span></span></code></pre></div><p>You have to do an additional step for Fish shell since it not directly supported.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">omf install bass
</span></span><span class="line"><span class="cl">vi ~/.config/fish/functions/nvm.fish
</span></span></code></pre></div><p>Add the following content to file -</p>
<pre tabindex="0"><code>function nvm
    bass source ~/.nvm/nvm.sh --no-use &#39;;&#39; nvm $argv
end
</code></pre><p>Finally, install node.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">nvm install 14.3
</span></span></code></pre></div><p>Set default node version in nvm to always use the latest version.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">nvm alias default node
</span></span></code></pre></div><p>Node is now ready to do great things!</p>
<h3 id="vs-code">VS Code</h3>
<p>Install <a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl">Remote WSL extension</a>.</p>
<p>Hit <code>Ctrl + Shift + p</code> &gt; enter <code>New Window using Distro</code>. Select the Linux distro that you are setting up.</p>
<p>VSCode will automatically download and configure server to work within the distro, and open a new window specific to the distro.</p>
<p>You can now use VSCode to work with files within the Linux folders. You will see the default Fish shell when you open a new terminal within VSCode.</p>
<h3 id="docker">Docker</h3>
<p>Docker runs 8-10x faster in WSL2 - there is simply no reason to postpone using Docker in Windows anymore :)</p>
<p>Install <a href="https://www.docker.com/products/docker-desktop">Docker for Desktop</a>.</p>
<p>New installations do not require any additional steps. If you had an older version, <a href="https://docs.docker.com/docker-for-windows/wsl/">follow instructions here</a> to set everything up.</p>
<h2 id="code-away">Code Away</h2>
<p>Start working your magic in Linux in Windows!</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>The Developer Tools I Use (2021 Edition)</title>
      <link>https://techformist.com/developer-tools-2021/</link>
      <pubDate>Wed, 29 Apr 2020 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/developer-tools-2021/</guid>
      <description>&lt;p&gt;Here are the list of tools that I use in my developer life 🔥🔥.&lt;/p&gt;
&lt;p&gt;Almost all of the tools are free, or reasonably priced. We live in exciting times - a developer in a &amp;ldquo;developing country&amp;rdquo; can do business globally by using the most amazing tools that humankind has produced.&lt;/p&gt;
&lt;p&gt;Note before you scroll -&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This will be a WIP post in perpetuity&lt;/li&gt;
&lt;li&gt;I am writing the post in mid 2020 and call it 2021 edition. If that does not convince you to stop reading, I am sure nothing can&lt;/li&gt;
&lt;li&gt;The list is focused on platforms and tools to make a developer&amp;rsquo;s life easier - I code mostly for the web (so YMMV)&lt;/li&gt;
&lt;li&gt;I consider programming platforms and languages &amp;ldquo;tools&amp;rdquo;, but they are covered at the very end so that you can rage quit this page after scrolling all the way down&lt;/li&gt;
&lt;li&gt;This is not an ad and I will gain little from you agreeing with me (maybe affiliate income to make me a millionaire by accumulating pennies - but those will be clearly suffixed with &lt;code&gt;afl&lt;/code&gt;, which stands for &lt;code&gt;affiliate link&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;You may not share my love for these tools and that is ok. Don&amp;rsquo;t waste your precious time to review, comment and try to justify why Pluto is not a planet (it is)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also - there is little of pretty pictures and marketing talk.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Here are the list of tools that I use in my developer life 🔥🔥.</p>
<p>Almost all of the tools are free, or reasonably priced. We live in exciting times - a developer in a &ldquo;developing country&rdquo; can do business globally by using the most amazing tools that humankind has produced.</p>
<p>Note before you scroll -</p>
<ul>
<li>This will be a WIP post in perpetuity</li>
<li>I am writing the post in mid 2020 and call it 2021 edition. If that does not convince you to stop reading, I am sure nothing can</li>
<li>The list is focused on platforms and tools to make a developer&rsquo;s life easier - I code mostly for the web (so YMMV)</li>
<li>I consider programming platforms and languages &ldquo;tools&rdquo;, but they are covered at the very end so that you can rage quit this page after scrolling all the way down</li>
<li>This is not an ad and I will gain little from you agreeing with me (maybe affiliate income to make me a millionaire by accumulating pennies - but those will be clearly suffixed with <code>afl</code>, which stands for <code>affiliate link</code>)</li>
<li>You may not share my love for these tools and that is ok. Don&rsquo;t waste your precious time to review, comment and try to justify why Pluto is not a planet (it is)</li>
</ul>
<p>Also - there is little of pretty pictures and marketing talk.</p>
<h2 id="coding">Coding</h2>
<h5 id="vscode"><a href="https://code.visualstudio.com/">VSCode</a></h5>
<p>It is 2020 and there is no reason for anyone to use any other code editor - except, maybe, if you can&rsquo;t download enough RAM.</p>
<p>I have nothing but gratitude for developers who created VSCode, and for the many many kind souls who created great extensions on it.</p>
<h5 id="github"><a href="https://github.com">Github</a></h5>
<p>Code + version control + some basic actions to automate tasks + host.</p>
<p>Next on my list of admiration - Github has simplified my code version control + backup. And, since I am a lesser mortal - I still do not have an &ldquo;all green&rdquo; <a href="https://github.com/prashanth1k">Github profile</a>.</p>
<p>Alternatives:</p>
<ul>
<li><a href="https://gitlab.com">Gitlab</a></li>
<li><a href="https://gitea.io/en-us/">Gitea</a> if you self-host</li>
</ul>
<h2 id="design">Design</h2>
<h3 id="logos">Logos</h3>
<h5 id="hatchful--shopify"><a href="https://hatchful.shopify.com/">Hatchful @ Shopify</a></h5>
<p>Hatchful was probably the first decent and easy enough logo creator that simply works. There are quite a few tools now but I still go back to Hatchful for every new product I create.</p>
<p>Alternatives:</p>
<ul>
<li><a href="https://www.namecheap.com/logo-maker/">Namecheap&rsquo;s Logo Maker</a>: the hipster variant</li>
<li><a href="https://logodust.com/">Logodust</a>: Open source logos</li>
<li><a href="https://logomakr.com/">LogoMakr</a>: Want to be more flexible and create your own simple logos? Well, use this online logo maker tool to do the right mix of one or more of many available icons, your own images, and a few fonts. It costs money for anything worth downloading though.</li>
<li><a href="https://www.fiverr.com/logo-maker/">Create logo online using the Fiverr logo tool</a></li>
<li><a href="https://www.fiverr.com/categories/graphics-design/creative-logo-design">Avail logo creation services</a></li>
</ul>
<h3 id="icons">Icons</h3>
<ul>
<li><a href="https://material.io/resources/icons/?style=baseline">Material Icons</a>: Because, you can&rsquo;t live without them.. and you are not quite delighted with them.</li>
<li><a href="https://materialdesignicons.com/">Material Design Icons</a>: .. because there aren&rsquo;t enough icons in this world.</li>
<li><a href="flaticon.com">flaticon.com</a>: You can now call me icon freak.</li>
</ul>
<h5 id="icon-generators">Icon Generators</h5>
<p>Generate icons in multitude of standard sizes.</p>
<ul>
<li><a href="https://favicomatic.com/">Favicomatic</a> - because app icon generators have aesthetic sense too</li>
<li><a href="https://www.favicon-generator.org/">Fav/app icon generator</a></li>
</ul>
<h3 id="images">Images</h3>
<p>What does a developer do with images?</p>
<h5 id="many-many-image-sites">Many many image sites</h5>
<ul>
<li><a href="https://www.pexels.com/">pexels.com</a></li>
<li><a href="https://pixabay.com/">pixabay.com</a></li>
</ul>
<h5 id="a-few-illustration-sites">A few illustration sites</h5>
<p>Whoever says no to illustrations.</p>
<ul>
<li><a href="https://undraw.co/illustrations">Undraw</a></li>
</ul>
<h2 id="desktop-power-tools">Desktop Power Tools</h2>
<h3 id="make-peace-with-your-os">Make peace with your OS</h3>
<ul>
<li><a href="https://cmder.net/">Cmder</a>: Saved me from searching from a dozen command line windows - now I can search with tabs instead. Slow to start than the new (in preview) Microsoft Terminal, but the features are far far too many for me to switch.</li>
<li><a href="https://docs.microsoft.com/en-us/windows/wsl/wsl2-install">WSL2</a>: I was holding my breath for the May 2020 release since May 2019 - Linux on Windows, fast Docker.</li>
<li><a href="https://ditto-cp.sourceforge.io/">Ditto Clipboard Manager</a>: Yes, you need that thing called clipboard manager.</li>
</ul>
<h3 id="media--presentation">Media &amp; Presentation</h3>
<ul>
<li>
<p><a href="https://getsharex.com/">ShareX</a>: Take screenshots and rejoice.</p>
</li>
<li>
<p><a href="https://www.cockos.com/licecap/">LICEcap</a>: Record quick demos through GIFs.</p>
</li>
</ul>
<h2 id="vps-website-hosting-and-such">VPS, Website Hosting and such</h2>
<ul>
<li><a href="https://netlify.com">Netlify</a>: The greatest host that the world has seen - for static sites</li>
<li><a href="https://www.hetzner.com/">Hetzner</a>: Cheap, reliable.</li>
<li><a href="https://m.do.co/c/9f3b578e40ef">Digital Ocean</a> <code>aff</code>: Location&rsquo;s everything, and there&rsquo;s certainly one near you. <a href="https://m.do.co/c/9f3b578e40ef">Link</a> gets you $60 credits.</li>
<li><a href="https://jelastic.cloud/">Jelastic</a>: Not in the mood to host? You should totally try out this PaaS.</li>
</ul>
<h5 id="inexpensive-wordpress-hosts">Inexpensive Wordpress Hosts</h5>
<ul>
<li><a href="https://www.a2hosting.com?aid=techformist&amp;bid=3d2e1f68">A2 hosting</a> <code>aff</code></li>
</ul>
<h5 id="domains">Domains</h5>
<ul>
<li><a href="https://www.cloudflare.com/products/registrar/">Cloudflare domains</a></li>
<li><a href="https://www.namesilo.com/?rid=aa26792ms">Namesilo</a> <code>aff</code></li>
</ul>
<p>Find domains and pricing -</p>
<ul>
<li><a href="https://www.domcomp.com/">Domcomp</a></li>
<li><a href="https://tld-list.com/tld/com">tld-list</a></li>
</ul>
<h2 id="website-development">Website Development</h2>
<h5 id="hugo"><a href="https://gohugo.io">Hugo</a></h5>
<p>The static site generator that is rumoured to have changed the speed of earth&rsquo;s rotation also happens to be the best at its job.</p>
<h5 id="gridsome"><a href="http://www.gridsome.com/">Gridsome</a></h5>
<p>And then God said - &ldquo;let there be a SSG that is SPA&rdquo;.</p>
<h5 id="wordpress"><a href="https://wordpress.org">Wordpress</a></h5>
<p>For those times when you need a website within 15 min flat.</p>
<h5 id="other">Other</h5>
<ul>
<li><a href="https://vuepress.vuejs.org/">Vuepress</a>: Create a really quick documentation site</li>
<li><a href="https://www.11ty.dev/">11ty</a>: The SSG that deserves a lot more love</li>
</ul>
<h2 id="programming-languages">Programming Languages</h2>
<p>I would have loved to query everything I admire, but that would have been the next <em><a href="https://en.wikipedia.org/wiki/Mahabharata">Mahabharata</a></em>. So, the list on programming languages (and platforms might I add) is focused on things I use at least six times an year.</p>
<h5 id="javascript"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">Javascript</a></h5>
<p>There is little in the world that makes this much sense.</p>
<h5 id="c"><a href="https://docs.microsoft.com/en-us/dotnet/csharp/">C#</a></h5>
<p>I would love to code everything in C# one day - but that day may never come.</p>
<h5 id="other-1">Other</h5>
<ul>
<li><a href="https://python.org">Python</a>: Oh.. I wish I knew more about this beautiful thing.</li>
<li><a href="http://golang.com/">Go</a>: Makes the world go round and round. Not quite, but it&rsquo;s super cool</li>
</ul>
<h2 id="application-development-frontend">Application Development: Frontend</h2>
<h5 id="vuejs"><a href="http://vuejs.org/">VueJS</a></h5>
<p>The framework that makes a lot of sense.</p>
<h5 id="svelte"><a href="https://svelte.dev/">Svelte</a></h5>
<p>Still on the fence on this one, but I use it anyway.</p>
<h5 id="styling-quasar">Styling: <a href="https://quasar.dev/">Quasar</a>:</h5>
<p>The best styling library + Vue-based UI framework that there is - many, many useful components and utilities</p>
<h5 id="styling-other">Styling: Other</h5>
<ul>
<li><a href="https://vuetifyjs.com/">Vuetify</a>: The most popular library for Vue</li>
<li><a href="https://buefy.org/">Buefy</a>: where performance matters</li>
</ul>
<h5 id="charts-echarts---apache">Charts: <a href="https://www.echartsjs.com/en/index.html">echarts - Apache</a></h5>
<p>You don&rsquo;t need any other charting library.</p>
<h2 id="application-development-backend">Application Development: Backend</h2>
<h5 id="node"><a href="https://nodejs.org/en/">Node</a></h5>
<p>This is the only thing that made sense, and still does :). If there is one thing from this planet that you want to take with you in a <a href="https://en.wikipedia.org/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy">H2G2</a> situation - I choose Node.</p>
<p>Fast development, many useful libraries, and easy deployments.</p>
<p>Node comes prepackaged with <code>npm</code>, but you have to absolutely try -</p>
<ul>
<li><a href="https://github.com/pnpm/pnpm">pnpm</a> - save space, lots of space.</li>
<li><a href="https://classic.yarnpkg.com/en/">yarn</a> - fast, but headed in a new direction with v2</li>
</ul>
<h5 id="adonisjs"><a href="https://adonisjs.com/">AdonisJS</a></h5>
<p>Fast, light-weight, stable, and well-structured. The development is quite slow, and there is a smaller community - but this absolutely rocks the world (or whoever uses the framework).</p>
<h5 id="feathersjs"><a href="https://feathersjs.com/">FeathersJS</a></h5>
<p>Make service, not MVC.</p>
<h5 id="strapijs"><a href="https://strapi.io/">StrapiJS</a></h5>
<p>Been using it since alpha, one of the best free CMS&rsquo;s out there.</p>
<p>Alternatives:</p>
<ul>
<li><a href="https://www.keystonejs.com/">Keystone</a>: v5 has some great improvements, but I miss the template driven sites)</li>
</ul>
<h5 id="fastify"><a href="https://www.fastify.io/">Fastify</a></h5>
<p>The low-overhead framework.</p>
<h4 id="aspnet"><a href="https://dotnet.microsoft.com/apps/aspnet">ASP.net</a></h4>
<p>Not quite back-end alone. It is &ldquo;blazing&rdquo; its way forward, but I don&rsquo;t use it enough to show more love.</p>
<p>Also - industry-standard for the next twenty years, or until the world ends in 2050.</p>
<h2 id="application-development-supporting-tools">Application Development: Supporting Tools</h2>
<h5 id="chrome"><a href="https://www.google.com/chrome/">Chrome</a></h5>
<p>You didn&rsquo;t expect this - did you?</p>
<p>I may cry about Chrome performance all day, but the fact is simple - my debugging has never been easier.</p>
<p>Alternatives:</p>
<ul>
<li><a href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a> (duh?)</li>
</ul>
<h5 id="laragon"><a href="https://laragon.org/">Laragon</a></h5>
<p>Keep your webserver and databases organised - even when you don&rsquo;t use Laravel. Just like XAMPP and cousins, but much more flexible.</p>
<h5 id="db-tools">DB Tools</h5>
<ul>
<li><a href="https://www.heidisql.com/">HeidiSQL</a>: Small, fast, and invaluable DB client for MySQL. Works on Postgres as well - but with more meh.</li>
</ul>
<h5 id="testing">Testing</h5>
<ul>
<li><a href="https://insomnia.rest/">Insomnia</a>: Test your APIs like there&rsquo;s no tomorrow</li>
</ul>
<h5 id="prettier"><a href="https://prettier.io/">Prettier</a></h5>
<p>Deserves a mention even though it is plugged into the code editor or linter. Has probably saved thousands of hours that would have otherwise been spent on aligning lines, brackets, and educating others on how to <code>tab</code> (and why <code>space</code> is a bad idea; and don&rsquo;t even get me started on lazies who ignore semicolon).</p>
<h5 id="regex-101"><a href="https://regex101.com/">Regex 101</a></h5>
<p>&ldquo;Regex is easy&rdquo;, said no one.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Test Email Functionality During Development</title>
      <link>https://techformist.com/test-email-functionality-development/</link>
      <pubDate>Wed, 12 Feb 2020 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/test-email-functionality-development/</guid>
      <description>&lt;p&gt;Here are a few simple ways and powerful tools to test your email functionality when you are developing your awesome application.&lt;/p&gt;
&lt;h2 id=&#34;the-case-for-email-testing&#34;&gt;The Case for Email Testing&lt;/h2&gt;
&lt;p&gt;After working in CRM and dealing with millions of records, and dozens of fragile&amp;rsquo;ly built systems, I have been through imagined (and a couple of real) scenarios of email fiascos -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Sending out emails with wrong templates or to the wrong audience&lt;/li&gt;
&lt;li&gt;Sending emails in bulk from the wrong environment (good luck explaining that to an infuriated CTO)&lt;/li&gt;
&lt;li&gt;Wrong configuration that breaks tracing and you are left wondering whatever happened to the last email blast which did not record a single click&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;While many of the systems I deal with are on cloud and we have to figure out intelligent ways to manage emails like domain forwarding, custom whitelisting, or outright ban emails - there are many custom systems that can provide better tooling. We can do quite a lot with free, simple-to-use services that can be deployed locally on a developer machine to fast-forward development.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Here are a few simple ways and powerful tools to test your email functionality when you are developing your awesome application.</p>
<h2 id="the-case-for-email-testing">The Case for Email Testing</h2>
<p>After working in CRM and dealing with millions of records, and dozens of fragile&rsquo;ly built systems, I have been through imagined (and a couple of real) scenarios of email fiascos -</p>
<ol>
<li>Sending out emails with wrong templates or to the wrong audience</li>
<li>Sending emails in bulk from the wrong environment (good luck explaining that to an infuriated CTO)</li>
<li>Wrong configuration that breaks tracing and you are left wondering whatever happened to the last email blast which did not record a single click</li>
</ol>
<p>While many of the systems I deal with are on cloud and we have to figure out intelligent ways to manage emails like domain forwarding, custom whitelisting, or outright ban emails - there are many custom systems that can provide better tooling. We can do quite a lot with free, simple-to-use services that can be deployed locally on a developer machine to fast-forward development.</p>
<p>Here are a few tools that can help.</p>
<h2 id="fakesmtp">FakeSMTP</h2>
<p><a href="http://nilhcem.com/FakeSMTP/index.html">FakeSMTP</a> is a simple and straightforward solution to &ldquo;catch&rdquo; emails locally.</p>
<p>Using the program is simple enough -</p>
<ul>
<li>Download FakeSMTP, a stand-alone <code>jar</code> file, and run it</li>
<li>Start on the server (runs on default SMTP port, but is configurable)</li>
<li>Start sending emails to SMTP and see the flow of emails within the FakeSMTP program. You open emails with the default mail program on your system</li>
</ul>
<p><img loading="lazy" src="/2020/fakesmtp-email-testing.png" type="" alt="fakesmtp-email-testing"  /></p>
<p>At 2 MB and a minimal footprint, catching mails in development does not get better than this.</p>
<h2 id="papercut">Papercut</h2>
<p><a href="https://github.com/ChangemakerStudios/Papercut">Papercut</a> has a better overall UI and pleasing functions.</p>
<p>You install the program and start sending emails to the port. Papercut -</p>
<ol>
<li>Has its own viewer that emulates common email programs to show how your email appears to end user</li>
<li>Displays notifications whenever an email arrives</li>
</ol>
<p><img loading="lazy" src="/2020/papercut-email-test.png" type="" alt="papercut-email-test"  /></p>
<p><em>src:<a href="https://github.com/ChangemakerStudios/Papercut-SMTP">Papercut website</a></em></p>
<p>Papercut is a polished product with well-written documentation and is a pleasure to use.</p>
<h2 id="smtp4dev">SMTP4Dev</h2>
<p>If you don&rsquo;t like either of the above options or want to see an alternative - check out SMTP4Dev.</p>
<p>Don&rsquo;t let that name fool you - it exactly does what the name says, and does a really good job too!</p>
<p>SMTP4Dev is a good &lsquo;mail catcher&rsquo; program with its own viewer, and is well suited for those apps that extensively test emails. The inbuilt viewer makes the process of manual testing fast and you can start failing those email test cases quite efficiently.</p>
<p><img loading="lazy" src="/2020/smtp4dev-email-local-development.png" type="" alt="smtp4dev-email-local-development"  /></p>
<p><em>src: <a href="https://github.com/rnwood/smtp4dev">smtp4dev GitHub page</a></em></p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Free Excel Template for Scrum Projects</title>
      <link>https://techformist.com/free-agile-scrum-excel-template/</link>
      <pubDate>Wed, 29 Jan 2020 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/free-agile-scrum-excel-template/</guid>
      <description>&lt;p&gt;Excel is the only program you need to survive in IT. So, how about a template for tracking tasks in an Agile Scrum project?&lt;/p&gt;
&lt;h2 id=&#34;why-scrum&#34;&gt;Why Scrum?&lt;/h2&gt;
&lt;p&gt;If you are looking for the answer on why agile / scrum -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You are in the wrong site&lt;/li&gt;
&lt;li&gt;That is well beyond the scope of this post&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In short: Scrum is a framework to run your project using Agile methodologies. Scrum&amp;rsquo;s objectives are -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Self-organise&lt;/li&gt;
&lt;li&gt;Learn by doing things and through experience&lt;/li&gt;
&lt;li&gt;Continuously improve&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Read more on &lt;a href=&#34;https://www.atlassian.com/agile/scrum&#34;&gt;Atlassian&amp;rsquo;s site.&lt;/a&gt;&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Excel is the only program you need to survive in IT. So, how about a template for tracking tasks in an Agile Scrum project?</p>
<h2 id="why-scrum">Why Scrum?</h2>
<p>If you are looking for the answer on why agile / scrum -</p>
<ol>
<li>You are in the wrong site</li>
<li>That is well beyond the scope of this post</li>
</ol>
<p>In short: Scrum is a framework to run your project using Agile methodologies. Scrum&rsquo;s objectives are -</p>
<ol>
<li>Self-organise</li>
<li>Learn by doing things and through experience</li>
<li>Continuously improve</li>
</ol>
<p>Read more on <a href="https://www.atlassian.com/agile/scrum">Atlassian&rsquo;s site.</a></p>
<p>The stated objectives for Scrum need a simple to use, centralised store - which an Excel document is generally not. But, I don&rsquo;t let all that come in the way to create a beautiful template.</p>
<h2 id="download-excel-template">Download Excel Template</h2>
<p>If you like to live on the edge and download from any website -</p>
<p><a href="/misc/scrum_project_template.xlsx">Download free Scrum Excel-template</a>.</p>
<p>If you are not that naive, you can check out what this template can do (or even copy the workbook) on Google Sheets.</p>
<p>See the action on <a href="https://docs.google.com/spreadsheets/d/1RzQTkJvsElzVP1aHj49nfHdmFiedEzAnauqm1dqHCZ8/edit?usp=sharing">Google Docs</a>.</p>
<p>The template is -</p>
<ul>
<li>free to use for any kind of project</li>
<li>released to public domain - see the sole exception in the terms below</li>
</ul>
<p>You can stop reading now, and get back to work in 99.99% of the cases.</p>
<h2 id="why-use-excel-to-track-scrum-and-why-this-template">Why use Excel to track Scrum and why this template?</h2>
<ul>
<li>There are smaller teams that rely on part-time developers who don&rsquo;t want overhead</li>
<li>Small teams may discuss on &ldquo;stuff&rdquo; and move on with work, and don&rsquo;t particularly care about documenting everything</li>
<li>Simple projects may not have the budget to organise things</li>
</ul>
<p>And yes, I know that these are excuses for not creating a &ldquo;usable&rdquo; tool. But organisations continue to live in a bubble.</p>
<p>So, here we are.</p>
<p>Using this template you can -</p>
<ol>
<li>track projects and sprints</li>
<li>track backlog, impediments and retrospective remarks</li>
<li>record effort against tasks (which can relate back to backlog)</li>
<li>summarise effort and show beautiful charts</li>
</ol>
<p>There are no fancy formulae, macros, and automation to take the dog on a walk when you work.</p>
<p>All that said, I think no one should use Excel templates for use cases like this. But I really can&rsquo;t quite preach something else when I have been an ardent fan of their simplicity.</p>
<h2 id="terms-of-use">Terms of Use</h2>
<p>No terms, really. You can do what you want with this template.</p>
<p>But, I would appreciate if you could donate a dollar or more to the nearest charity, or to a person in need.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Enable SSL for your VPS using VestaCP</title>
      <link>https://techformist.com/ssl-vps-vestacp/</link>
      <pubDate>Wed, 11 Dec 2019 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/ssl-vps-vestacp/</guid>
      <description>&lt;p&gt;VestaCP is an easy to use control panel. You just need to know where to go for what!&lt;/p&gt;
&lt;h3 id=&#34;the-problem&#34;&gt;The Problem&lt;/h3&gt;
&lt;p&gt;SSLs are de-facto standards for web applications of today. How can you enable SSL for your own web app, preferably for free?&lt;/p&gt;
&lt;h2 id=&#34;the-solution&#34;&gt;The Solution&lt;/h2&gt;
&lt;p&gt;I am no Unix Guru and for the life of me, cannot enable domains, mails, etc. using just the command line. Well, I could some monkey typing to get everything up and running. But that is a lot of typing, Googling and going back and forth. And, as previously mentioned, I am still not a guy comfortable using Ansible and such.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>VestaCP is an easy to use control panel. You just need to know where to go for what!</p>
<h3 id="the-problem">The Problem</h3>
<p>SSLs are de-facto standards for web applications of today. How can you enable SSL for your own web app, preferably for free?</p>
<h2 id="the-solution">The Solution</h2>
<p>I am no Unix Guru and for the life of me, cannot enable domains, mails, etc. using just the command line. Well, I could some monkey typing to get everything up and running. But that is a lot of typing, Googling and going back and forth. And, as previously mentioned, I am still not a guy comfortable using Ansible and such.</p>
<p>So, as one of the first steps I do while creating new VPS is to enable a control panel. A control panel provides a one-step, integrated shop for all the basic things you need.</p>
<p><a href="https://vestacp.com/">VestaCP</a> has been one of my favourite control panels for a few reasons.</p>
<ol>
<li>It gets work done - easily create domains/sub-domains, secure your VPS, create and manage emails, and create and manage DBs.</li>
<li>Fast and light weight. No fluff, just the things you need</li>
<li>VestaCP is free to use. You should support the developer with a Pro plan if you have the means!</li>
</ol>
<p>You are in good hands once you get used to the quirky navigation after setting up VestaCP. (Except for the functionalities that are simply not offered as part of the free plan, that is).</p>
<p>And, one of those simple steps that you do is to enable SSL for your web app.</p>
<ol>
<li>Go to VestaCP control panel &gt; click on Web</li>
</ol>
<p><img loading="lazy" src="/misc/ssl-for-vps-using-vestacp.jpg" type="" alt="enable-ssl-encryption-vps"  /></p>
<ol start="2">
<li>
<p>Hover over your domain and click on &lsquo;Edit&rsquo;</p>
</li>
<li>
<p>Click on the checkbox!</p>
</li>
</ol>
<p><img loading="lazy" src="/misc/ssl-encryption-vestacp.jpg" type="" alt="ssl-for-vps-with-vestacp"  /></p>
<p>That is it!</p>
<p>SSL not working? Or, has the Let&rsquo;s Encrypt certification renewal fail? Just turn off SSL and turn it back on :)</p>
<p>And yes, if you have not realized it by now - this is a joke. A joke as a result of frustrating rebuild because there was a screw-up when trying to solve the certification renewal issue. But that&rsquo;s a discussion for another day!</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>No Tracking Information Error in Git</title>
      <link>https://techformist.com/no-tracking-information-error-git/</link>
      <pubDate>Mon, 11 Nov 2019 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/no-tracking-information-error-git/</guid>
      <description>&lt;p&gt;Aren&amp;rsquo;t you following the right way to git? Are you frustrated with the message &amp;ldquo;There is no tracking information for the current branch&amp;rdquo;? Keep calm and read on.&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;I create new Git repositories all the time - just like any other developer. I am too stupid to notice the small things and learn my lessons - unlike any other developer.&lt;/p&gt;
&lt;p&gt;Often I mix up creating repositories on the GitHub website and in local computer, thereby confusing Git. I happily create a repository with a README, add remote URL, try to do a &lt;code&gt;pull&lt;/code&gt;..&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Aren&rsquo;t you following the right way to git? Are you frustrated with the message &ldquo;There is no tracking information for the current branch&rdquo;? Keep calm and read on.</p>
<h2 id="the-problem">The Problem</h2>
<p>I create new Git repositories all the time - just like any other developer. I am too stupid to notice the small things and learn my lessons - unlike any other developer.</p>
<p>Often I mix up creating repositories on the GitHub website and in local computer, thereby confusing Git. I happily create a repository with a README, add remote URL, try to do a <code>pull</code>..</p>
<pre tabindex="0"><code>git pull origin master
</code></pre><p>.. and, what do I get? Lo and behold..</p>
<pre tabindex="0"><code>    From https://github.com/techformist/super_hero_project
    * branch            master     -&gt; FETCH_HEAD
    fatal: refusing to merge unrelated histories
</code></pre><p>The solution is simple, but before that - let&rsquo;s see the normal flow.</p>
<h2 id="the-normal-and-abnormal-flows-for-a-new-project">The Normal and Abnormal Flows for a New Project</h2>
<ol>
<li>Create repository on GitHub site, or using GitHub Desktop</li>
<li>Add files like README or license, or don&rsquo;t</li>
<li>Follow the helpful instructions to get the repository setup in local computer</li>
</ol>
<pre tabindex="0"><code>git init
git remote add origin https://github.com/techformist/super_hero_project
git push -u origin master
</code></pre><p>Simple.</p>
<p>Apparently I can&rsquo;t follow instructions.</p>
<p>So, I do -</p>
<ol>
<li>Create project locally. Add a few useless programs, scripts and files</li>
<li>Do a <code>git init</code></li>
<li>Create a repository on GitHub a few days later</li>
<li>Add a README, license directly on GitHub. Because, why not</li>
<li>Add remote to local and try to sync <code>git pull origin master</code></li>
</ol>
<p>Of course, there&rsquo;s an error. Git sees changes on server and changes on local. It cannot just pull server to local.</p>
<p>Almost all the time, I revert to the below simple remedy.</p>
<pre tabindex="0"><code>git pull origin master --allow-unrelated-histories
</code></pre><p>This allows Git to pull stuff from server while retaining the local files. I can add them local files to the master branch and continue like nothing&rsquo;s wrong with the world.</p>
<p>Another way to avoid the error is to create an empty repository on GitHub and avoid creating any files at the very beginning. Push local changes / sync, and from then on you can create files anywhere without antagonising Git.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Design Emails Using Bootstrap</title>
      <link>https://techformist.com/design-emails-bootstrap/</link>
      <pubDate>Mon, 04 Nov 2019 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/design-emails-bootstrap/</guid>
      <description>&lt;p&gt;Wondering how you could apply modern UI design to emails? Here&amp;rsquo;s the answer.&lt;/p&gt;
&lt;h3 id=&#34;the-problem&#34;&gt;The Problem&lt;/h3&gt;
&lt;p&gt;I don&amp;rsquo;t know about you - but emails are the last thing that I want to design. I end up sending plain text emails for most of my apps, and that works just fine.&lt;/p&gt;
&lt;p&gt;However, a few projects have more complex requirements. In one such case, I had to send bills as emails and allow a designer (if not a client power-user) to &amp;ldquo;code in&amp;rdquo; the design for the bills.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Wondering how you could apply modern UI design to emails? Here&rsquo;s the answer.</p>
<h3 id="the-problem">The Problem</h3>
<p>I don&rsquo;t know about you - but emails are the last thing that I want to design. I end up sending plain text emails for most of my apps, and that works just fine.</p>
<p>However, a few projects have more complex requirements. In one such case, I had to send bills as emails and allow a designer (if not a client power-user) to &ldquo;code in&rdquo; the design for the bills.</p>
<p>My first thought was to use <a href="https://jsreport.net/">JSReport</a> and send PDFs in emails instead of directly including bills in the email. This should have simplified the design process for the email and keep it aligned to previously applied best practice.</p>
<p>That was not to be.</p>
<ul>
<li>We had to keep emails light</li>
<li>Emails needed to be engaging and direct. 40-60% of the target audience was not in the habit of using emails</li>
<li>Any design that would require storage and linking to files was not acceptable</li>
</ul>
<p>A few curious requirements and the current tech stack presented a simple, but effective solution.</p>
<h2 id="the-solution">The Solution</h2>
<p>I had deployed the server stack on AdonisJS previously. This meant I could use AdonisJS views to merge the template with email design with the actual data at runtime.</p>
<p>But, I still had to provide a good way to design those emails. Not exactly MailChimp and friends, but something decent enough for the first run.</p>
<p>Email design is not exactly caught up with the times -</p>
<ol>
<li>Emails need inline CSS</li>
<li>Using HTML tables to align can take an ugly turn anytime</li>
<li>Responsive emails are a thing and not a thing I necessarily like</li>
</ol>
<p>It was then, and only then, did I come across <a href="https://github.com/stuyam/bootstrap-email/">bootstrap-email</a>.</p>
<p><img loading="lazy" src="/misc/bootstrap-email.jpg" type="" alt="bootstrap-email"  /></p>
<p>Bootstrap Email, as it&rsquo;s name suggests, is a way to design emails using Bootstrap. The best thing - you don&rsquo;t worry about all the email design constraints. The creator/maintainers of Bootstrap Email have done the heavy lifting.</p>
<p>You now design emails (more or less) like a web page to create a responsive email. As simple as that.</p>
<ul>
<li>Emails are responsive and device-agnostic. Emails look like &ldquo;real emails&rdquo; in a browser, on a mobile device, or using apps like Outlook</li>
<li>Create emails using simple bootstrap layouting. No special techniques needed</li>
<li>Simple to design and consistent. No more dealing directly with HTML tables to design emails</li>
</ul>
<p>The creators have kindly made the library open source and provided all this for free. Bootstrap Email is well documented and seems to have adequate maintenance over the two years.</p>
<p>Check out Bootstrap Email on <a href="https://github.com/stuyam/bootstrap-email/">GitHub</a>, or see the <a href="https://bootstrapemail.com/docs/introduction">documentation</a>
Play around with Bootstrap Email using this <a href="https://bootstrapemail.com/editor">online editor</a></p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Valuable Site of the Month (Oct &#39;19) - Online HTML Editor</title>
      <link>https://techformist.com/vsom-oct-2019/</link>
      <pubDate>Thu, 31 Oct 2019 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/vsom-oct-2019/</guid>
      <description>&lt;p&gt;We back with a valuable site of the month after a not-so-brief hiatus. Here&amp;rsquo;s presenting this month&amp;rsquo;s pick - an online HTML editor.&lt;/p&gt;
&lt;h3 id=&#34;no-not-another-editor&#34;&gt;No.. Not another editor&lt;/h3&gt;
&lt;p&gt;HTML editors are aplenty.&lt;/p&gt;
&lt;p&gt;Anyone and everyone can whip up a quick site using TinyMCE, CKEditor and the like, provide a preview and call it a day.&lt;/p&gt;
&lt;p&gt;A bit more effort there and we can have a site-of-the-month editor :)&lt;/p&gt;
&lt;p&gt;Well, recently I had been creating a few HTML emails. I needed a quick, reliable way to preview whatever HTML content and move on with my work.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>We back with a valuable site of the month after a not-so-brief hiatus. Here&rsquo;s presenting this month&rsquo;s pick - an online HTML editor.</p>
<h3 id="no-not-another-editor">No.. Not another editor</h3>
<p>HTML editors are aplenty.</p>
<p>Anyone and everyone can whip up a quick site using TinyMCE, CKEditor and the like, provide a preview and call it a day.</p>
<p>A bit more effort there and we can have a site-of-the-month editor :)</p>
<p>Well, recently I had been creating a few HTML emails. I needed a quick, reliable way to preview whatever HTML content and move on with my work.</p>
<p>It was not to be easy.</p>
<p>My first choice was VSCode, but that workflow was not straight-forward for quick turn around. I could have used preview better, but there were a few things that could be faster. For e.g. -</p>
<ol>
<li>Changing text to bold, italic etc.</li>
<li>Changing fonts or font size</li>
<li>Including tables</li>
<li>Finally, sharing work and getting some quick feedback (yes, I do use GitHub and Gist)</li>
</ol>
<h3 id="oh-do-we-need-another-editor">Oh. Do we need another editor?</h3>
<p>Not really.</p>
<p>I am sure we could use the existing development toolset to establish a better flow (with the same time taken for this post).</p>
<p>However, I was anxious about my current state of work at the time and wanted a really quick and dirty solution in my workflow.</p>
<p>Enter <a href="https://htmlpen.com/">HTMLPen</a>.</p>
<p><img loading="lazy" src="/misc/htmlpen-app.jpg" type="" alt="htmlpen-app"  /></p>
<p>One can use HTMLPen (which is in beta, btw) to -</p>
<ul>
<li>write HTML, CSS and see preview of the final result</li>
<li>use a WYSIWYG editor to include tables, media or change fonts</li>
<li>convert images to Base64</li>
<li>and finally, share projects quickly with others</li>
</ul>
<p>I love what we could do on the Internet today - with zero cost or investment.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Email for NodeJS app using separate server on CPanel</title>
      <link>https://techformist.com/email-host-app-server-cpanel/</link>
      <pubDate>Fri, 25 Oct 2019 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/email-host-app-server-cpanel/</guid>
      <description>&lt;p&gt;Configure email server on a third party host using CPanel, while continuing your app server on your favourite VPS.&lt;/p&gt;
&lt;h3 id=&#34;background&#34;&gt;Background&lt;/h3&gt;
&lt;p&gt;Typically I configure email server to be on the same server as my NodeJS / PHP app.&lt;/p&gt;
&lt;p&gt;Bad practice? Sure. But, it works just fine for the kind of applications that I write. I can see how horribly this can go wrong though -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Your app server goes down and you have no way to send communication to your users&lt;/li&gt;
&lt;li&gt;Mail servers simply get more spam, more probes - this keeps the server busy for no reason. This means your main app can suffer&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There are simply better ways to design, without breaking the bank or introducing any complexity - we can just shift mail handling to an external party.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Configure email server on a third party host using CPanel, while continuing your app server on your favourite VPS.</p>
<h3 id="background">Background</h3>
<p>Typically I configure email server to be on the same server as my NodeJS / PHP app.</p>
<p>Bad practice? Sure. But, it works just fine for the kind of applications that I write. I can see how horribly this can go wrong though -</p>
<ol>
<li>Your app server goes down and you have no way to send communication to your users</li>
<li>Mail servers simply get more spam, more probes - this keeps the server busy for no reason. This means your main app can suffer</li>
</ol>
<p>There are simply better ways to design, without breaking the bank or introducing any complexity - we can just shift mail handling to an external party.</p>
<h3 id="what-exactly-is-the-architecture">What exactly is the architecture?</h3>
<p>Quite simple.</p>
<ul>
<li>My application on NodeJS continues to reside on VPS (let&rsquo;s call this &ldquo;App IP&rdquo;)</li>
<li>Mail server is shifted to another server</li>
</ul>
<p>I could potentially use another VPS box and run Postfix (&amp; associated paraphernalia). If I had been using Virtualmin or any such tools, I could potentially clone the virtual server and make it easier.</p>
<p>However, I am quite frustrated on the issues maintaining Postfix (and friends) by myself. And, I had a few CPanel based cheaper hosting solutions lying around in my inventory. So, I just took the easy way out.</p>
<p>I went ahead and configured CPanel to accept emails for my app.</p>
<h3 id="why-is-this-a-big-deal">Why is this a big deal?</h3>
<p>There is nothing to this, really. But, it was indeed a learning experience for me - an inexperienced system admin, do-it-all, and mess-it-all guy.</p>
<p>The major issue was with the domain management.</p>
<p>DNS configuration is quite simple for an application with everything on a VPS. I just point the name server to the ones I configured on VPS, or point the A record to the specific VPS IP.</p>
<p>The MX record, which is responsible for receiving mails, just points to fully qualified domain name (FQDN) used by the &lsquo;A&rsquo; record pointing to App IP.</p>
<p>For a domain on any of the popular domain service providers, the configuration looks like this -</p>
<table>
  <thead>
      <tr>
          <th>Host Name</th>
          <th>Type</th>
          <th>Address/Value</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>domain.com</td>
          <td>A</td>
          <td>105.1.1.1</td>
      </tr>
      <tr>
          <td>domain.com</td>
          <td>MX</td>
          <td>domain.com</td>
      </tr>
  </tbody>
</table>
<p>This will enable mail for <code>@domain.com</code> addresses, and your application serves HTTP requests on ports designated in the web server on App IP.</p>
<p>If you throw an external web server in the mix, you land in a bit of a pickle for DNS configuration -</p>
<ul>
<li>MX cannot point to an IP</li>
<li>You cannot just create another &lsquo;A&rsquo; record pointing to a different IP</li>
</ul>
<p>** Bad configuration **</p>
<table>
  <thead>
      <tr>
          <th>Host Name</th>
          <th>Type</th>
          <th>Address/Value</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>domain.com</td>
          <td>A</td>
          <td>105.1.1.1</td>
      </tr>
      <tr>
          <td>domain.com</td>
          <td>A</td>
          <td>75.1.1.1</td>
      </tr>
      <tr>
          <td>domain.com</td>
          <td>MX</td>
          <td>domain.com</td>
      </tr>
  </tbody>
</table>
<p>&lsquo;A&rsquo; record will round-robin requests. So your app requests can go to the new &lsquo;Mail IP&rsquo; or your mails can ping &lsquo;App IP&rsquo; for mail handling.</p>
<h3 id="solution">Solution</h3>
<p>There are two parts to the solution.</p>
<ol>
<li>Your DNS configuration will have to revert to a recommended practice of using a prefix to the domain</li>
<li>CPanel on mail server needs to understand that <code>mail.domain.com</code> is an alias for <code>domain.com</code> email address</li>
</ol>
<p>First, configure the DNS using tools provided by your domain name service provider.</p>
<table>
  <thead>
      <tr>
          <th>Host Name</th>
          <th>Type</th>
          <th>Address/Value</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>domain.com</td>
          <td>A</td>
          <td>105.1.1.1</td>
      </tr>
      <tr>
          <td>mail.domain.com</td>
          <td>A</td>
          <td>75.1.1.1</td>
      </tr>
      <tr>
          <td>domain.com</td>
          <td>MX</td>
          <td>mail.domain.com</td>
      </tr>
  </tbody>
</table>
<p>Next, go to <strong>CPanel</strong> &gt; <strong>Domains</strong> &gt; <strong>Zone Editor</strong> and enable it to manage requests to <code>mail.domain.com</code>.</p>
<table>
  <thead>
      <tr>
          <th>Host Name</th>
          <th>Type</th>
          <th>Address/Value</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>domain.com</td>
          <td>MX</td>
          <td>mail.domain.com</td>
      </tr>
      <tr>
          <td>mail.domain.com</td>
          <td>A</td>
          <td>75.1.1.1</td>
      </tr>
  </tbody>
</table>
]]></content:encoded>
    </item>
    
    <item>
      <title>Open source and free URL shorteners</title>
      <link>https://techformist.com/free-open-source-url-shorteners/</link>
      <pubDate>Sat, 14 Sep 2019 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/free-open-source-url-shorteners/</guid>
      <description>&lt;p&gt;URL shorteners shorten your URLs. You have many many products in the market - &lt;a href=&#34;https://bit.ly&#34;&gt;bit.ly&lt;/a&gt; being the most popular. However, with a bit of help from amazing people who have built them, we can use our own URL shorteners. Again, nothing magical here - this was quite an old problem. People wanted to always mask their URL or make it easier for sharing.&lt;/p&gt;
&lt;p&gt;Here are three open source and free URL shorteners that you can use today!&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>URL shorteners shorten your URLs. You have many many products in the market - <a href="https://bit.ly">bit.ly</a> being the most popular. However, with a bit of help from amazing people who have built them, we can use our own URL shorteners. Again, nothing magical here - this was quite an old problem. People wanted to always mask their URL or make it easier for sharing.</p>
<p>Here are three open source and free URL shorteners that you can use today!</p>
<p>Host these URL shortening services on your own servers - you can set them up almost instantaneously, shorten URLs prefixed with your domain, keep track of link clicks, and also collect analytics about where your link clicks are coming from.</p>
<h3 id="shlink">Shlink</h3>
<p><a href="https://shlink.io">Shlink</a> appears to be the more modern solution of the lot.</p>
<p>It has docker support, beautiful looking UI on ReactJS, and plays well with both Nginx and Apache. You can use REST APIs and even a CLI tool to create short URLs.</p>
<h3 id="yourls">YOURLS</h3>
<p><a href="https://yourls.org">YOURLS</a> has been there forever. It is a PHP based solution, is quite easy to setup and I have used that before.</p>
<p>YOURLS is also available in CPANEL, and can be setup in your shared hosting with all but a couple of clicks. It just works and keeps working efficiently.</p>
<h3 id="polr">Polr</h3>
<p>[Polr]https://polrproject.org/ is another solution based on PHP.</p>
<p>It supports creating URLs through API requests and is easy to use.</p>
<h3 id="the-trigger">The Trigger</h3>
<p>What triggered me to write this gem of an article (yes, sarcasm) was seeing an instance of this age-old problem was being analysed.</p>
<p>Use AWS or Azure for 301/302 redirects? Quickly create a beautiful solution in your favourite programming language that does not buckle under pressure to show off beautiful charts? Shave-off milliseconds while doing URL redirection by writing everything in Assembly?</p>
<p>Let&rsquo;s say I am a tech guy in a company and someone asks whether I can create this app in a day. This is my thought process -</p>
<ol>
<li>Search internet to check on what other people are doing to solve the same (or a similar) problem</li>
<li>Search for the easiest solution that&rsquo;s not a pain to implement or maintain. Also check whether I can use existing infrastructure and keep costs reasonable</li>
<li>Get approvals for the stack/cost. Work with other teams to enable supporting infrastructure and develop/deploy solution</li>
</ol>
<p>To think that I would have to develop this solution ground-up will be the last thing to cross my mind.</p>
<p>This world is beautiful and exciting, and also thankfully - not everyone thinks like me. And probably, I am doing way-too-boring &lsquo;stuff&rsquo; to think better and be on the &lsquo;cutting edge&rsquo;.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Fake GraphQL APIs for Testing</title>
      <link>https://techformist.com/fake-graphql-API-test/</link>
      <pubDate>Mon, 02 Sep 2019 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/fake-graphql-API-test/</guid>
      <description>&lt;p&gt;Speed up your GraphQL learning with fake GraphQL APIs!&lt;/p&gt;
&lt;p&gt;I love &lt;a href=&#34;https://jsonplaceholder.typicode.com/&#34;&gt;JSON Placeholder&lt;/a&gt;, but it serves only REST requests. I had been looking for something similar in GraphQL. Without longer-term, reliable options, I had reverted to &lt;a href=&#34;https://techformist.com/spin-up-your-own-local-graphql-server-within-15-min/&#34;&gt;creating my own fake GraphQL server&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While having my own server is certainly useful, it can become a pain to demonstrate or outline a feature to all - either through a video, blog post, or in public forums.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Speed up your GraphQL learning with fake GraphQL APIs!</p>
<p>I love <a href="https://jsonplaceholder.typicode.com/">JSON Placeholder</a>, but it serves only REST requests. I had been looking for something similar in GraphQL. Without longer-term, reliable options, I had reverted to <a href="/spin-up-your-own-local-graphql-server-within-15-min/">creating my own fake GraphQL server</a>.</p>
<p>While having my own server is certainly useful, it can become a pain to demonstrate or outline a feature to all - either through a video, blog post, or in public forums.</p>
<p>Enter <a href="https://graphqlzero.almansi.me">GraphQLZero</a>.</p>
<p>GraphQLZero provides an API playground that you can use to quickly test your GraphQL clients, or put forward a point while demonstrating the client-side code.</p>
<p><img loading="lazy" src="/misc/graphql-faker-app.jpg" type="" alt=""  /></p>
<p>The app features GraphiQL interface that outlines the API documents, taking full advantage of self-documenting abilities of GraphQL.</p>
<p>I understand this is too early to get excited since there have been comparable services in the past. The challenge for the authors/maintainers will be to manage traffic and find ways to sustainably manage the application over a long term.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>VSCode file shortcuts I can&#39;t live without</title>
      <link>https://techformist.com/vscode-file-shortcuts-i-cant-live-without/</link>
      <pubDate>Tue, 27 Aug 2019 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/vscode-file-shortcuts-i-cant-live-without/</guid>
      <description>&lt;p&gt;Here&amp;rsquo;s a set of VSCode shortcuts that are part of my daily workflow for working with files!&lt;/p&gt;
&lt;p&gt;We have seen a &lt;a href=&#34;https://techformist.com/vs-code-shortcuts-that-level-up-developer-productivity/&#34;&gt;few VSCode shortcuts earlier&lt;/a&gt;, but none ever said -&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I had enough of them shortcuts.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So, here goes.&lt;/p&gt;
&lt;h3 id=&#34;1-search-text-in-all-files&#34;&gt;1. Search text in all files&lt;/h3&gt;
&lt;p&gt;Search text in within all files in workspace using ..&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Ctrl + Shift + F
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://techformist.com/misc/vscode-shortcut-file-find.gif&#34; type=&#34;&#34; alt=&#34;vscode-shortcut-file-find&#34;  /&gt;&lt;/p&gt;
&lt;p&gt;I used Explorer and &lt;a href=&#34;https://www.voidtools.com/&#34;&gt;Everything&lt;/a&gt; before incorporating this extension in my workflow. The biggest advantage is having to to search within the workspace folder - have all other files open in context of current work.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Here&rsquo;s a set of VSCode shortcuts that are part of my daily workflow for working with files!</p>
<p>We have seen a <a href="/vs-code-shortcuts-that-level-up-developer-productivity/">few VSCode shortcuts earlier</a>, but none ever said -</p>
<blockquote>
<p>I had enough of them shortcuts.</p>
</blockquote>
<p>So, here goes.</p>
<h3 id="1-search-text-in-all-files">1. Search text in all files</h3>
<p>Search text in within all files in workspace using ..</p>
<pre tabindex="0"><code>Ctrl + Shift + F
</code></pre><p><img loading="lazy" src="/misc/vscode-shortcut-file-find.gif" type="" alt="vscode-shortcut-file-find"  /></p>
<p>I used Explorer and <a href="https://www.voidtools.com/">Everything</a> before incorporating this extension in my workflow. The biggest advantage is having to to search within the workspace folder - have all other files open in context of current work.</p>
<p>Of course, it helps immensely that you can also replace the searched text with something else. You can replace text by revealing the hidden field as depicted in the picture, or just do a <code>Ctrl + Shift + H</code> to directly open find/replace dialog.</p>
<h3 id="2-copy-path-of-current-file">2. Copy path of current file</h3>
<p>Copy file path of the file currently being edited (while in editor).</p>
<pre tabindex="0"><code>Shift + Alt + C
</code></pre><p>Sometimes (and specifically on one of my machines) this does not work. And, I could not figure out why.</p>
<p>There are two quick ways to work-around -</p>
<ul>
<li>Use alternative.
<pre tabindex="0"><code>Ctrl + K P
</code></pre>Do not press <code>P</code> while still holding <code>Ctrl</code>.</li>
<li>Use command palette
<pre tabindex="0"><code>Ctrl + Shift + P &gt; Start typing &#34;copy path&#34;
</code></pre></li>
<li>Go through file explorer
<pre tabindex="0"><code>Ctrl + Shift + E ... and then..
Shift + Alt + C
</code></pre></li>
</ul>
<p>Or, you could right click on tab of the file and copy the file path.</p>
<h3 id="3-reopen-closed-editor">3. Reopen closed editor</h3>
<p>I become anxious when too many editors are open - that is a direct indication of &ldquo;not in control&rdquo; mode. I tend to close editors quickly recklessly and the extension to reopen closed editor is quite handy.</p>
<pre tabindex="0"><code>Ctrl + Shift + T
</code></pre><p><img loading="lazy" src="/misc/vscode-shortcut-file-reopen-tab.gif" type="" alt="vscode-shortcut-file-reopen-tab"  /></p>
<h3 id="4-reveal-current-file-in-explorer">4. Reveal current file in Explorer</h3>
<p>There are just too many times I need to explore the folder of currently edited file. Use this shortcut to the parent folder in Explorer.</p>
<pre tabindex="0"><code>Ctrl + K R
</code></pre><p><img loading="lazy" src="/misc/vscode-shortcut-file-reveal-in-explorer.gif" type="" alt="vscode-shortcut-file-reveal-in-explorer"  /></p>
<h3 id="5-close-all-open-files">5. Close all open files</h3>
<p>For all those times when you are frustrated and just want to close everything..</p>
<pre tabindex="0"><code>Ctrl + K W
</code></pre><p>You can always open tabs one by one by hitting <code>Ctrl + Shift + T</code> :). Handy when you have to show yourself how busy you are and make some noise with the keyboard.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Git in VSCode</title>
      <link>https://techformist.com/git-in-vscode/</link>
      <pubDate>Thu, 01 Aug 2019 15:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/git-in-vscode/</guid>
      <description>&lt;p&gt;I have been a great admirer and user of command line tools. They reduce so much time and energy while getting things done. But, on the other hand I have not been a reasonably good user of Git by itself. I could never come to terms with typing in one too many statements to get to where I was going.&lt;/p&gt;
&lt;p&gt;For example -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Compare changes with previous version&lt;/li&gt;
&lt;li&gt;Check who did changes in a specific version&lt;/li&gt;
&lt;li&gt;Revert to previous version&lt;/li&gt;
&lt;li&gt;Check changes to stage / commit, and periodically commit&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These and many more require far too many commands. These commands were sometimes coded in batch files and copied/pasted whenever I needed them. I just could not remember everything - probably not as good a user of Git as I would like to believe.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I have been a great admirer and user of command line tools. They reduce so much time and energy while getting things done. But, on the other hand I have not been a reasonably good user of Git by itself. I could never come to terms with typing in one too many statements to get to where I was going.</p>
<p>For example -</p>
<ol>
<li>Compare changes with previous version</li>
<li>Check who did changes in a specific version</li>
<li>Revert to previous version</li>
<li>Check changes to stage / commit, and periodically commit</li>
</ol>
<p>These and many more require far too many commands. These commands were sometimes coded in batch files and copied/pasted whenever I needed them. I just could not remember everything - probably not as good a user of Git as I would like to believe.</p>
<p>VSCode changed all that.</p>
<p>VSCode takes GUI for Git to a whole new level. The source code tab along with features offered by a couple of plugins made me appreciate just how productive I could be using the humble version control.</p>
<p><img loading="lazy" src="/misc/git-version-control-vscode.jpg" type="" alt=""  /></p>
<ul>
<li>See changes made since last commit without leaving the main code editor</li>
<li>Check who made changes and when (<a href="https://gitlens.amod.io/">GitLens plugin</a>) with one click or shortcut key</li>
<li>Diff across versions within editor and quickly make changes</li>
<li>Selectively stage changes</li>
</ul>
<p>Previously I have been an infrequent user of GitHub Desktop - could never incorporate the tool in my development flow. VSCode has done an excellent job in keeping developer workflow at the centre of everything. Fast forward 6-8 months of using the Git features, I doubt if I ever go back to the previous way of doing things.</p>
<p>VSCode has been an excellent example of how GUI can supplement the power of command line and make development easier for all.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Server-side technology options and my hosting solutions</title>
      <link>https://techformist.com/hosting-server-technology-options/</link>
      <pubDate>Tue, 18 Jun 2019 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/hosting-server-technology-options/</guid>
      <description>&lt;p&gt;Last year I started focusing on web and application development to a greater extent than what I have done in the past. After having done my time with large enterprises, I now work primarily in a super cost-conscious market. All those things speak poorly about my budgeting and planning skills as far as server hosts are concerned.&lt;/p&gt;
&lt;p&gt;tldr;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;a href=&#34;https://m.do.co/c/c37f159a5967&#34;&gt;Digital Ocean&lt;/a&gt;*&lt;/li&gt;
&lt;li&gt;Use &lt;a href=&#34;https://www.hetzner.com/cloud&#34;&gt;Hetzner Cloud&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;problem&#34;&gt;Problem&lt;/h3&gt;
&lt;p&gt;I build applications that need a backend. I need that backend to be inexpensive but reliable.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Last year I started focusing on web and application development to a greater extent than what I have done in the past. After having done my time with large enterprises, I now work primarily in a super cost-conscious market. All those things speak poorly about my budgeting and planning skills as far as server hosts are concerned.</p>
<p>tldr;</p>
<ul>
<li>Use <a href="https://m.do.co/c/c37f159a5967">Digital Ocean</a>*</li>
<li>Use <a href="https://www.hetzner.com/cloud">Hetzner Cloud</a></li>
</ul>
<h3 id="problem">Problem</h3>
<p>I build applications that need a backend. I need that backend to be inexpensive but reliable.</p>
<h3 id="solutions">Solutions</h3>
<p>Typically, I have deployed server-side solutions on Node and Laravel, and using MySQL and Postgres. But the work spans to static sites, Wordpress, and ASP.NET.</p>
<p>The initial part of starting up a business and establishing credentials through fast and reliable applications was difficult. But, what made it more difficult than the bugs I introduced on my own, was the server infrastructure.</p>
<p>I have been partial to NodeJS, and my natural tendency is to use Virtual Private Servers (VPS). I do not quite need dedicated hardware since I hardly run applications that deserve <em>that</em> kind of hardware, but I was not able to sustain applications on shared hosting.</p>
<p>The good thing - it has never been as good as it is today.</p>
<p>I continue to be amazed at free (GitHub, Netlify, GitLab - thank you), or inexpensive infrastructure solutions. Those solutions have made possible for me to run a highly nimble shop that focuses on client-specific solutions at highly reasonable costs.</p>
<p>But, I have been seriously frustrated by my initial decisions. I have paid for products and services that have gone south, crippling my sense of self-worth and that of humanity in general.</p>
<p>So, a summary of what to do follows.</p>
<h5 id="digital-ocean">Digital Ocean</h5>
<p><a href="https://m.do.co/c/c37f159a5967">Choose Digital Ocean</a>* for your VPS.</p>
<p>Digital Ocean provides the max leverage when it comes to providing reliable, inexpensive infrastructure. Starting at $5, Digital Ocean has enabled me to stand up servers within no time - be it development, production or for dedicated demos.</p>
<p>More over, Digital Ocean has been a big boon since they have excellent connectivity and servers available in multiple regions.</p>
<p>The availability of templates have made it much easier to setup servers with pre-installed software. This is particularly useful for development and initial testing, and also because I suck at Docker, Ansible, Terraform et. al. - I am lazy enough to learn them thoroughly and stop wasting time setting up environments.</p>
<p>Pros -</p>
<ul>
<li>Excellent infrastructure</li>
<li>Minimal ping times at multiple locations</li>
<li>Reasonable price</li>
<li>Templates!</li>
</ul>
<p>Cons -</p>
<ul>
<li>DIY. Databases can go down, Web servers can get messed up, external attacks can be a big problem</li>
<li>&ldquo;Cost conscious&rdquo; customers may still find that expensive for smaller solutions (when you cannot share servers with others)</li>
</ul>
<h5 id="use-hetzner-cloud">Use Hetzner Cloud</h5>
<p>I did not quite know Hetzner Cloud for a long, long time. I had favoured cheap-ass VPS solutions to burn fingers and a bit of my brain more than once - and came to know about them by chance.</p>
<p>But now, every other of my application goes to Hetzner Cloud. Starting at ~$3, Hetzner Cloud is a great VPS solution that is cheap, and reliable.</p>
<p>See <a href="https://github.com/hetznercloud/awesome-hcloud">multiple tools on Hetzner platform</a> that can make your life easier.</p>
<p>Pros -</p>
<ul>
<li>Reliable</li>
<li>Inexpensive</li>
<li>Support for Terraform &amp; Ansible (not an active user)</li>
</ul>
<p>Cons -</p>
<ul>
<li>Extremely limited data centre locations - not a problem if you are targeting Europe</li>
<li>Be aware that very cheap costs = cheaper hardware. Hetzner Cloud is good, but there is no dark magic involved to make anything cheaper than what it is</li>
</ul>
<p>I understand that <a href="https://contabo.com">Contabo</a> is a comparable solution to Hetzner Cloud, but I have not used that as much to comment.</p>
<h3 id="alternatives">Alternatives</h3>
<p>I had seriously considered switching back to Laravel just for the ease of deployment and the ability to use cheaper hardware.</p>
<p>I am still going back and forth on that in darker corners of my mind, but Node (and frameworks like NestJS, AdonisJS, PostGraphile etc.) has this ability to ensnare you and not allowing you to go anywhere else.</p>
<h5 id="laravel">Laravel</h5>
<p>If you are using Laravel and trying to bring up gently-used applications, consider shared hosting. They are easier to manage (see VPS considerations above) and someone else does all the work required to maintain servers. You can access your infrastructure through CPANEL, create databases and setup your application with few clicks, and in general, do as less work as possible.</p>
<p>But, in return, you also lose flexibility and power. You may not get as much RAM / CPU that you need, your hardware may fail you since someone else on the same infrastructure decides to establish a new record in expanding known fraction numbers of Pi.</p>
<p>Shared hosting has been a hit or miss for me. From my own experience and that of other kind souls sharing valuable information on Internet, I believe one of the following can be a good choice.</p>
<ul>
<li><a href="http://www.a2hosting.com/?aid=techformist">A2 hosting</a>*</li>
<li><a href="https://siteground.com/">Site Ground</a></li>
<li><a href="https://crocweb.com">Crocweb</a></li>
</ul>
<h5 id="wordpress">Wordpress</h5>
<p>If you are using Wordpress (in whole[really?], or as back-end), I still think shared hosting is a better option unless you have a decent sized application.</p>
<h5 id="static-sites">Static sites</h5>
<p>Choose <a href="https://github.com">GitHub</a> or <a href="https://netlify.com">Netlify</a> for hosting static sites. Move up the tiers as you build traffic or size of your application - it does not make sense for anything else.</p>
<p>This blog is a static site and is hosted on Netlify.</p>
<h3 id="conclusion">Conclusion</h3>
<p><a href="https://m.do.co/c/c37f159a5967">Use Node on Digital Ocean</a></p>
<p>:)</p>
<blockquote>
<p>* Affiliate links that earn me a few bucks if you choose to buy by clicking on the links. That has in no way altered what how I have written / discussed about the said products or services.</p>
</blockquote>
]]></content:encoded>
    </item>
    
    <item>
      <title>Install Scoop for Command-line Nirvana</title>
      <link>https://techformist.com/2019/05/06/install-scoop-for-command-line-nirvana/</link>
      <pubDate>Mon, 06 May 2019 10:04:00 +0000</pubDate>
      
      <guid>https://techformist.com/2019/05/06/install-scoop-for-command-line-nirvana/</guid>
      <description>&lt;p&gt;Command line in Windows.&lt;/p&gt;
&lt;p&gt;You love it when there are Powershell, Cmder and friends. And, you hate it when you cannot install simple programs quickly.&lt;/p&gt;
&lt;p&gt;Well, hate may be a strong word - but you get the gist.&lt;/p&gt;
&lt;p&gt;I have tried chocolatey and have a like-dislike relationship with that program. I have also experimented with VMs and anything that exposes more of the command line. None of the programs stuck in my day-to-day flow. For a few projects, I dedicatedly use WSL - but could not quite switch over everywhere.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Command line in Windows.</p>
<p>You love it when there are Powershell, Cmder and friends. And, you hate it when you cannot install simple programs quickly.</p>
<p>Well, hate may be a strong word - but you get the gist.</p>
<p>I have tried chocolatey and have a like-dislike relationship with that program. I have also experimented with VMs and anything that exposes more of the command line. None of the programs stuck in my day-to-day flow. For a few projects, I dedicatedly use WSL - but could not quite switch over everywhere.</p>
<p>In the meantime, I now use <a href="https://github.com/lukesampson/scoop">Scoop</a>. Scoop is different.</p>
<ul>
<li>Install Scoop</li>
<li>Install developer apps/configurations (e.g. curl)</li>
<li>Use apps</li>
</ul>
<p>I faced installation issues to begin with - but none that could stand the test of a good Google search.</p>
<p>Here&rsquo;s what you do -</p>
<ol>
<li>
<p>Open Powershell in Windows 10. Execute the following command to bypass the execution policy for the session.</p>
<p>Set-ExecutionPolicy Bypass -Scope Process</p>
</li>
<li>
<p>Set directory for Scoop and install it.</p>
</li>
</ol>
<pre tabindex="0"><code>   $env:SCOOP=&#39;e:\scoop&#39;
       [environment]::setEnvironmentVariable(&#39;SCOOP&#39;,$env:SCOOP,&#39;User&#39;)
   iex (new-object net.webclient).downloadstring(&#39;https://get.scoop.sh&#39;)
</code></pre><ol start="3">
<li>Install apps using <code>scoop install curl</code> or install apps globally. You can set directory for global apps using Powershell admin</li>
</ol>
<pre tabindex="0"><code>   $env:SCOOP_GLOBAL=&#39;c:\apps&#39;
       [environment]::setEnvironmentVariable(&#39;SCOOP_GLOBAL&#39;,$env:SCOOP_GLOBAL,&#39;Machine&#39;)
   scoop install -g curl
</code></pre><p>Now, just hit commands in Powershell to install local/global apps.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Most Valuable Site of the Month - May 2019</title>
      <link>https://techformist.com/movsom-may-2019/</link>
      <pubDate>Sat, 04 May 2019 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/movsom-may-2019/</guid>
      <description>&lt;p&gt;Featured for the millionth time as a most valuable website - a site that generates all icons for free, and for real.&lt;/p&gt;
&lt;p&gt;I am sick of tired of Google results returning &amp;ldquo;free&amp;rdquo; sites that collect all information including my dog&amp;rsquo;s name and the declare that I need to pay $99 to get darn icon with the darn size.&lt;/p&gt;
&lt;p&gt;I need to be able to get anything for free. So, why should I pay to generate icons that would take an hour to resize in a free program like &lt;a href=&#34;https://www.getpaint.net/&#34;&gt;Paint.NET&lt;/a&gt; or &lt;a href=&#34;https://www.irfanview.com/&#34;&gt;IrfanView&lt;/a&gt;? After all, I need to feed this ego that I create value and people totally should pay me for the value delivered through the free for all programs.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Featured for the millionth time as a most valuable website - a site that generates all icons for free, and for real.</p>
<p>I am sick of tired of Google results returning &ldquo;free&rdquo; sites that collect all information including my dog&rsquo;s name and the declare that I need to pay $99 to get darn icon with the darn size.</p>
<p>I need to be able to get anything for free. So, why should I pay to generate icons that would take an hour to resize in a free program like <a href="https://www.getpaint.net/">Paint.NET</a> or <a href="https://www.irfanview.com/">IrfanView</a>? After all, I need to feed this ego that I create value and people totally should pay me for the value delivered through the free for all programs.</p>
<p>Well, that&rsquo;s that. But featured today is this super awesome website called &ldquo;<a href="http://www.favicomatic.com/">favic-o-matic</a>&rdquo;.</p>
<p><img loading="lazy" src="/misc/favicomatic-awesome-website.jpg" type="" alt="favicomatic-awesome-site-shot"  /></p>
<p>Favicomatic is so awesome that I started this whole new series to feature the most awesome websites out there (including the one here - I do an bloody awesome job if I may say so myself). And, I decided to crown Favicomatic since I am sure I will not meet such an web for the rest of this month.</p>
<h3 id="what-is-it">What is it?</h3>
<p>If you are creating a mobile app, a desktop app, or a progressive web application, you would surely need icons. You know - those thingies on which you expect your users to click.</p>
<p>It turns out that different companies want you to use different sizes of icons so that you can look good on them - because they can. You could potentially start resizing them to fit every whimsical need, but who has the time when there are so many video games lying around and so much stuff to get that.</p>
<p>Enter favomatic.</p>
<h3 id="how-to-work-with-it">How to work with it?</h3>
<ul>
<li>Feed in your icon image</li>
<li>Get 19 different formats of your image that are correctly sized for different uses. You can use all 19 in one go in a PWA :)</li>
</ul>
<p>The files are zipped and accompanied by a text file with the include statements.</p>
<h3 id="why-so-valuable">Why so valuable?</h3>
<ul>
<li>Free to use (<a href="http://www.favicomatic.com/donate">do donate</a>)</li>
<li>Consistent - always available</li>
<li>Fast</li>
</ul>
<p>It is just what every doctor would order if the doctor was a web app engineer.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Can a clipboard editor save the day?</title>
      <link>https://techformist.com/ditto-clipboard-editor/</link>
      <pubDate>Tue, 30 Apr 2019 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/ditto-clipboard-editor/</guid>
      <description>&lt;p&gt;A clipboard editor of all the things? How can it be useful in this day and age?&lt;/p&gt;
&lt;p&gt;I have tried to automate some of the most common things that I do on a regular basis. There are a bunch of tools that I use to do just that - these save keystrokes (AutoHotkey), automate regular tasks (e.g. take a screenshot, optimize size and upload to imgur), or connect my one useless social media account to the other (IFTTT).&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>A clipboard editor of all the things? How can it be useful in this day and age?</p>
<p>I have tried to automate some of the most common things that I do on a regular basis. There are a bunch of tools that I use to do just that - these save keystrokes (AutoHotkey), automate regular tasks (e.g. take a screenshot, optimize size and upload to imgur), or connect my one useless social media account to the other (IFTTT).</p>
<ul>
<li><a href="https://www.autohotkey.com/">AutoHotkey</a></li>
<li><a href="https://ifttt.com/">IFTTT</a></li>
<li><a href="https://getsharex.com/">ShareX</a></li>
</ul>
<p>But for all my life, I could never think that I would need a clipboard editor. Sure, an editor can provide powerful functions to remember the last one million strings I had copied, but what&rsquo;s the point?</p>
<p>I will just copy the thing again if at all I lose it. How can I lose something that I copied a second ago anyway?</p>
<p>Without answering all those smart questions, I installed me-self <a href="https://ditto-cp.sourceforge.io/">Ditto</a>. Ditto promises to hold the text or image content you copied a while back. That&rsquo;s all there is to it - no more.</p>
<p>And, it turned out that&rsquo;s what was missing in my life.</p>
<p>Searching for and re-copying content that I had copied 25 seconds back can shave whole minutes in your super productive day.</p>
<p><img loading="lazy" src="/misc/ditto-clipboard.jpg" type="" alt=""  /></p>
<p>I can now -</p>
<ul>
<li>Press <code>Ctrl + Shift + `</code> to access clipboard</li>
<li>Do a <code>Ctrl + 1</code> to <code>Ctrl + 0</code> to quickly recopy the last 10 strings / images</li>
<li>Start typing in after pressing the shortcut key to quickly filter whatever stuff you had copied to clipboard</li>
<li>Hit enter or click to copy the content again</li>
</ul>
<p>Ditto also has this feature to sync between computers over network (which I don&rsquo;t use). Since the application maintains your clipboard entries in a SQLite DB, you can also put the DB on a shared drive if you want to live dangerously in your LAN.</p>
<p>Ditto is free and open source (GPLv3 if you care for such a thing), very light on resources, and very very quick to use. Try it by all means, but be warned - you will get addicted.</p>
<p><a href="https://ditto-cp.sourceforge.io/">Download Ditto</a>.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Create your Own Javascript Playground</title>
      <link>https://techformist.com/create-your-own-javascript-playground/</link>
      <pubDate>Sat, 23 Feb 2019 15:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/create-your-own-javascript-playground/</guid>
      <description>&lt;p&gt;I write quite a bit of Javascript on a day to day basis. But, I have a poor memory and keep forgetting things.&lt;/p&gt;
&lt;p&gt;Things like how I should be using a certain function the right way.&lt;/p&gt;
&lt;p&gt;This is where web applications like &lt;a href=&#34;https://jscomplete.com/playground&#34;&gt;https://jscomplete.com/playground&lt;/a&gt; help. But it is not a pleasant experience to have blocks of incomplete code lying around in jscomplete, and keep executing few other parts of the program.&lt;/p&gt;
&lt;p&gt;I use the following tools to quickly know how to write a piece of functionality, or quickly test parts of code/components.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I write quite a bit of Javascript on a day to day basis. But, I have a poor memory and keep forgetting things.</p>
<p>Things like how I should be using a certain function the right way.</p>
<p>This is where web applications like <a href="https://jscomplete.com/playground">https://jscomplete.com/playground</a> help. But it is not a pleasant experience to have blocks of incomplete code lying around in jscomplete, and keep executing few other parts of the program.</p>
<p>I use the following tools to quickly know how to write a piece of functionality, or quickly test parts of code/components.</p>
<h5 id="use-nodemon">Use Nodemon</h5>
<p>Nodemon automatically restarts node server and enable us to test code changes without the need to restart node manually. I use nodemon to test individual javascript files as well.</p>
<p>Install nodemon globally - <code>npm i -g nodemon</code>.</p>
<p>Start testing:</p>
<ol>
<li>Create hello.js</li>
<li>Open terminal within VS Code. Type <code>nodemon hello.js</code></li>
<li>nodemon will start printing any output statements. Do changes, save and boom - you have the output</li>
</ol>
<p>The only inconvenience is the need for <code>console</code> statements - but I have actually gone <code>console</code> blind.</p>
<h5 id="quokkajs">QuokkaJS</h5>
<p>Quokka JS evaluates your Javascript in real-time and shows the results. Quokka has a VSCode plugin and can play well with Typescript or Javascript files.</p>
<p>Install Quokka plugin and start typing away for real-time evaluation.</p>
<p><img loading="lazy" src="/misc/quokka-js-playground-vscode.gif" type="" alt=""  /></p>
<p>Now, I can have a whole folder of stupid code blocks just because I can.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Spin up your own local GraphQL server within 15 min</title>
      <link>https://techformist.com/spin-up-your-own-local-graphql-server-within-15-min/</link>
      <pubDate>Thu, 21 Feb 2019 15:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/spin-up-your-own-local-graphql-server-within-15-min/</guid>
      <description>&lt;p&gt;Create your own GraphQL APIs in 15 min flat using Postgres database and a bit of help from PostGraphile. No GraphQL server configuration needed.&lt;/p&gt;
&lt;p&gt;No frontend beginner developer ever said - &amp;ldquo;I want to play around with servers to understand their internals byheart before I venture forth with my beautiful Vue application&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;If you are building on REST APIs, you have public services like &lt;a href=&#34;https://jsonplaceholder.typicode.com/&#34;&gt;JSONPlaceholder&lt;/a&gt;. These services provide quick access to much loved sample APIs for to-do, posts, users etc.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Create your own GraphQL APIs in 15 min flat using Postgres database and a bit of help from PostGraphile. No GraphQL server configuration needed.</p>
<p>No frontend beginner developer ever said - &ldquo;I want to play around with servers to understand their internals byheart before I venture forth with my beautiful Vue application&rdquo;.</p>
<p>If you are building on REST APIs, you have public services like <a href="https://jsonplaceholder.typicode.com/">JSONPlaceholder</a>. These services provide quick access to much loved sample APIs for to-do, posts, users etc.</p>
<p>There are not a lot of choices if you are building on GraphQL. There have been efforts towards providing such an API in the past but none last long. The solution - create them locally.</p>
<p>Local GraphQL can be cumbersome.</p>
<p>When you start, one may be left wondering on Express + GraphQL + a bit of configuration + write more than few lines of code to get started to serve any new API. There are tools like <a href="https://github.com/marmelab/json-graphql-server">json-graphql-server</a> that claim to speed up this process. However, they are not kept up to date, and seemingly are not meant for Windows(?).</p>
<p>So, I did the next logical thing that was easy and quick. Create an environment of your own using <a href="https://www.postgresql.org/">PostgreSQL</a> and <a href="https://www.graphile.org/postgraphile/">PostGraphile</a>.</p>
<h3 id="initial-setup">Initial Setup</h3>
<ol>
<li>
<p><a href="https://www.postgresql.org/download/">Download and install PostgreSQL</a>.<br>
Alternatively use <a href="https://laragon.org/download/">Laragon with Postgres</a> - it is a really good control centre for local development.</p>
</li>
<li>
<p>Open pgAdmin - the DB admin application for Postgres. Use an existing database or create a new one. Right click on Schema &gt; Tables and click on &lsquo;New Table&rsquo;. I will assume that you will use a database called &rsquo;test&rsquo;. Create a table called &rsquo;todo&rsquo;.
<img loading="lazy" src="/misc/postgres-create-table.png" type="" alt=""  /></p>
</li>
<li>
<p>Create few columns
<img loading="lazy" src="/misc/pgadmin-create-table-columns.png" type="" alt=""  /></p>
</li>
<li>
<p>Start your very own GraphQL server. The server uses port 5000 by default, but we will change it to 5050 for the heck of it (also because 5000 is used by a few other front-end apps)</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cmd" data-lang="cmd"><span class="line"><span class="cl">npx postgraphile -c test --watch -p 5050
</span></span></code></pre></div><p><img loading="lazy" src="/misc/postgraphile-server-start.png" type="" alt=""  /></p>
</li>
</ol>
<h3 id="start-playing-around">Start playing around</h3>
<p>Go to [http://localhost:5050/graphiql]. Copy/paste the GraphQL statements to perform different operations.</p>
<h5 id="query-data">Query data</h5>
<p>Query for data. Of course you will not find anything at this time.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-graphql" data-lang="graphql"><span class="line"><span class="cl"><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="py">allTodos</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="py">nodes</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="py">id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="py">title</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="py">done</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><p>The output will be -</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-graphql" data-lang="graphql"><span class="line"><span class="cl"><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="s">&#34;data&#34;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="s">&#34;allTodos&#34;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="s">&#34;nodes&#34;</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><p><img loading="lazy" src="/misc/graphiql-graphql-server-simple.png" type="" alt=""  /></p>
<h5 id="insert-data">Insert data</h5>
<p>Insert &rsquo;to-do&rsquo; data in your database.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-graphql" data-lang="graphql"><span class="line"><span class="cl"><span class="kd">mutation</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nc">createTodo</span><span class="p">(</span><span class="kd">input</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nc">todo</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nc">title</span><span class="p">:</span><span class="w"> </span><span class="s">&#34;Create GraphQL server&#34;</span><span class="p">,</span><span class="w"> </span><span class="nc">done</span><span class="p">:</span><span class="w"> </span><span class="nc">true</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">})</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nc">todo</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="py">id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="py">title</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="py">done</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><p>This statement will create a single to-do, query back <code>id</code>, <code>title</code>, &amp; <code>done</code> fields, and display them at the right hand side of the screen.</p>
<p><img loading="lazy" src="/misc/graphiql-graphql-mutation.png" type="" alt=""  /></p>
<p>Output -</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-graphql" data-lang="graphql"><span class="line"><span class="cl"><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="s">&#34;data&#34;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="s">&#34;createTodo&#34;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="s">&#34;todo&#34;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="s">&#34;id&#34;</span><span class="p">:</span><span class="w"> </span><span class="nc">10</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="s">&#34;title&#34;</span><span class="p">:</span><span class="w"> </span><span class="s">&#34;Create GraphQL server&#34;</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="s">&#34;done&#34;</span><span class="p">:</span><span class="w"> </span><span class="nc">true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><p>You can repeat the <code>query</code> operation and find that it can display data too!</p>
<h3 id="configure-additional-apis">Configure additional APIs</h3>
<p>By now you have a full-fledged server that is serving to-dos. You can add filters, do magic on inserts/updates using functions, and eventually find that the world is the limit.</p>
<p>But, what about additional APIs? Similar to to-dos, you can start creating entities and find them available to your GraphQL without any additional effort. That is the magic of PostGraphile.</p>
<h3 id="why-use-this-setup-for-local-graphql-environment">Why use this setup for local GraphQL environment?</h3>
<ul>
<li>Quicker setup. Type in a few commands + configure DB table - and you are done</li>
<li>Minimal effort to setup new APIs - you are not limited to standard APIs but can go all wild</li>
<li>You can take this to your production environment too. I have used Postgraphile for projects and it rocks!</li>
<li>PostGraphile uses your friendly, neighbourhood Javascript. So we are right at home</li>
</ul>
<h3 id="comments">Comments..?</h3>
<p>What do you say about this folks? Super..? Stupid? Somewhere in between?
Or, simply &ldquo;what am I doing on this planet when people like this exist&rdquo;..?</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Optimize Images for Web</title>
      <link>https://techformist.com/optimize-images-for-web/</link>
      <pubDate>Mon, 18 Feb 2019 15:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/optimize-images-for-web/</guid>
      <description>&lt;p&gt;I had been a big user of SmushIt! Wordpress plugin in its heyday. After slowing down my sites too often, I switched to offline solutions.&lt;/p&gt;
&lt;p&gt;None of the tools I used have been as easy to use as &lt;a href=&#34;https://nikkhokkho.sourceforge.io/static.php?page=FileOptimizer&#34;&gt;FileOptimizer&lt;/a&gt;. Also: find this handy &lt;a href=&#34;https://sourceforge.net/projects/nikkhokkho/files/FileOptimizer/&#34;&gt;download link&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://techformist.com/misc/file-optimizer-image-optimization-for-web-windows.jpg&#34; type=&#34;&#34; alt=&#34;&#34;  /&gt;&lt;/p&gt;
&lt;p&gt;FileOptimizer is a free, open-source tool to optimize files. It is in fact a wrapper for a bunch of open source tools that work great individually, but absolutely rock as a collection.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I had been a big user of SmushIt! Wordpress plugin in its heyday. After slowing down my sites too often, I switched to offline solutions.</p>
<p>None of the tools I used have been as easy to use as <a href="https://nikkhokkho.sourceforge.io/static.php?page=FileOptimizer">FileOptimizer</a>. Also: find this handy <a href="https://sourceforge.net/projects/nikkhokkho/files/FileOptimizer/">download link</a>.</p>
<p><img loading="lazy" src="/misc/file-optimizer-image-optimization-for-web-windows.jpg" type="" alt=""  /></p>
<p>FileOptimizer is a free, open-source tool to optimize files. It is in fact a wrapper for a bunch of open source tools that work great individually, but absolutely rock as a collection.</p>
<p>While FileOptimizer site does not look all shiny, I can vouch for it after about ~5 years of usage (as if that matters - go figure).</p>
<p>I primarily use it for JPG and PNG images that are intended for consumption over web. It can do lossy compression of image files individually or in batch.</p>
<p>Ordinarily, I combine FileOptimizer with <a href="https://getsharex.com/">ShareX</a> - a great, under-appreciated screenshot taking tool. Configure ShareX to allow editing of images after taking a screenshot and later, run FileOptimizer to compress edited images.</p>
<p>Now, just using the default shortcut keys I can take screenshot, manipulate image, and optimize it in one go.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>VS Code Shortcuts that Level Up Developer Productivity</title>
      <link>https://techformist.com/vs-code-shortcuts-that-level-up-developer-productivity/</link>
      <pubDate>Sat, 09 Feb 2019 15:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/vs-code-shortcuts-that-level-up-developer-productivity/</guid>
      <description>&lt;p&gt;VS Code is the most useful thing discovered after sliced bread. The extension ecosystem kicks up the productivity in VS Code many notches higher. Here are a few shortcuts that you must include in your toolset to get into God-mode.&lt;/p&gt;
&lt;h5 id=&#34;1-prettier-on-save-quicker-format&#34;&gt;1. Prettier on Save: Quicker format&lt;/h5&gt;
&lt;p&gt;Install &lt;a href=&#34;https://github.com/prettier/prettier-vscode&#34;&gt;prettier&lt;/a&gt;. Enable &amp;lsquo;Format on Save&amp;rsquo; in Settings&amp;rsquo;.
Rock and roll.
&lt;img loading=&#34;lazy&#34; src=&#34;https://techformist.com/misc/vscode-shortcut-prettier-on-save.gif&#34; type=&#34;&#34; alt=&#34;&#34;  /&gt;&lt;/p&gt;
&lt;p&gt;I have never seen any tool save so much of my time.&lt;/p&gt;
&lt;h5 id=&#34;2-ctrl--d-select-word-repeat-selection-and-edit-in-one-go&#34;&gt;2. Ctrl + D: Select Word, repeat selection and edit in one go&lt;/h5&gt;
&lt;p&gt;Ctrl + D (repeat to select multiple instances). Multiple edits in one-go if you have selected multiple instances.
&lt;img loading=&#34;lazy&#34; src=&#34;https://techformist.com/misc/vscode-shortcut-ctrl-d.gif&#34; type=&#34;&#34; alt=&#34;&#34;  /&gt;&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>VS Code is the most useful thing discovered after sliced bread. The extension ecosystem kicks up the productivity in VS Code many notches higher. Here are a few shortcuts that you must include in your toolset to get into God-mode.</p>
<h5 id="1-prettier-on-save-quicker-format">1. Prettier on Save: Quicker format</h5>
<p>Install <a href="https://github.com/prettier/prettier-vscode">prettier</a>. Enable &lsquo;Format on Save&rsquo; in Settings&rsquo;.
Rock and roll.
<img loading="lazy" src="/misc/vscode-shortcut-prettier-on-save.gif" type="" alt=""  /></p>
<p>I have never seen any tool save so much of my time.</p>
<h5 id="2-ctrl--d-select-word-repeat-selection-and-edit-in-one-go">2. Ctrl + D: Select Word, repeat selection and edit in one go</h5>
<p>Ctrl + D (repeat to select multiple instances). Multiple edits in one-go if you have selected multiple instances.
<img loading="lazy" src="/misc/vscode-shortcut-ctrl-d.gif" type="" alt=""  /></p>
<p>You could also do a Ctrl + F2 to select all instances of any word (not case sensitive).</p>
<h5 id="3-alt--shift--click--drag-select-column-of-content-rather-than-whole-lines">3. Alt + Shift + Click + Drag: Select column of content rather than whole lines.</h5>
<p>Hold Alt + Shift and drag to select a column of content. Multiple edits possible.
<img loading="lazy" src="/misc/vscode-shortcut-alt-shift-drag.gif" type="" alt=""  /></p>
<p>Select a portion of your screen to select a column of content without selecting whole lines.</p>
<h5 id="4-ctrl--shift--alt--direction-arrows-multi-select">4. Ctrl + Shift + Alt + Direction arrows: Multi-select</h5>
<p>Select multiple lines of text that can be edited in one go.
<img loading="lazy" src="/misc/vscode-shortcut-ctrl-shift-direction-select-multiple.gif" type="" alt=""  /></p>
<p>You can also press and hold Alt and click away to achieve the same effect (+ click anywhere to multi-select adhoc words without using direction keys)</p>
<h5 id="5-ctrl--e-quickly-open-files-in-same-project">5. Ctrl + E: Quickly open files in same project</h5>
<p>Projects have confusing structure. Just open the project folder in VSCode, and hit Ctrl + E or Ctrl + P to quickly open files.
For best results, start typing in the file name in the quick open menu.</p>
<p><img loading="lazy" src="/misc/vscode-shortcut-ctrl&#43;e-quick-open.gif" type="" alt=""  /></p>
<h5 id="6-emmet--balance-outward-select-entire-code-block">6. Emmet + Balance Outward: Select entire code block</h5>
<p>One of the powerful features of Vim is to select blocks of code with a single shortcut key. You can emulate the same within VSCode using Emmet - Balance Outward.</p>
<p><img loading="lazy" src="/misc/vscode-shortcut-emmet-balance-outward.gif" type="" alt=""  /></p>
<p>Map this function to a shortcut key if you use this sort of thing often. Btw, I am using Ctrl + Shift + P to open the command menu prompt.</p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
