<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[p.k.'s echo]]></title><description><![CDATA[I’m Prasanna Kumar Gollangi, experienced software engineer, a full stack developer, code quality oriented, thrilled about AI and other computer science technolo]]></description><link>https://me.p11r.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 13:58:00 GMT</lastBuildDate><atom:link href="https://me.p11r.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Google Firestore Data Source plugin for Grafana]]></title><description><![CDATA[firestore-grafana-datasource
Google Firestore Data Source Plugin for Grafana.
Grafana Firestore Data Source Plugin enables integrating data on Firestore on to Grafana dashboards.
It uses FireQL to capture user query that translated to issue queries o...]]></description><link>https://me.p11r.dev/google-firestore-data-source-plugin-for-grafana</link><guid isPermaLink="true">https://me.p11r.dev/google-firestore-data-source-plugin-for-grafana</guid><category><![CDATA[Programming Blogs]]></category><category><![CDATA[google cloud]]></category><category><![CDATA[General Programming]]></category><category><![CDATA[Grafana]]></category><category><![CDATA[firestore]]></category><dc:creator><![CDATA[Prasanna Kumar]]></dc:creator><pubDate>Mon, 20 Nov 2023 03:36:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1671789638741/abdc9e75-0d25-4781-a85c-d3b998d903df.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-firestore-grafana-datasource">firestore-grafana-datasource</h1>
<p><a target="_blank" href="https://cloud.google.com/firestore">Google Firestore</a> Data Source Plugin for <a target="_blank" href="https://grafana.com/">Grafana</a>.</p>
<p>Grafana Firestore Data Source Plugin enables integrating data on Firestore on to Grafana dashboards.</p>
<p>It uses <a target="_blank" href="https://github.com/pgollangi/FireQL">FireQL</a> to capture user query that translated to issue queries on Firestore and construct results.</p>
<blockquote>
<p><a target="_blank" href="https://github.com/pgollangi/FireQL">FireQL</a> is a Go library to query Google Firestore database using SQL syntax.</p>
</blockquote>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://github.com/pgollangi/firestore-grafana-datasource">https://github.com/pgollangi/firestore-grafana-datasource</a></div>
<p> </p>
<h2 id="heading-features">Features</h2>
<ul>
<li><p>Use Google Firestore as a data source for Grafana dashboards</p>
</li>
<li><p>Configure Firestore data source with GCP <code>Project Id</code> and <a target="_blank" href="https://cloud.google.com/firestore/docs/security/iam"><code>Service Account</code></a> for authentication</p>
</li>
<li><p>Store <code>Service Account</code> data source configuration in Grafana encrypted storage <a target="_blank" href="https://grafana.com/docs/grafana/latest/developers/plugins/create-a-grafana-plugin/extend-a-plugin/add-authentication-for-data-source-plugins/#encrypt-data-source-configuration">Secure JSON Data</a></p>
</li>
<li><p>Query Firestore <a target="_blank" href="https://firebase.google.com/docs/firestore/data-model#collections">collections</a> and path to collections</p>
</li>
<li><p>Auto detect data types: <code>string</code>, <code>number</code>, <code>boolean</code>, <code>json</code>, <code>time.Time</code></p>
</li>
<li><p>Query selected fields from the collection</p>
</li>
<li><p>Order query results</p>
</li>
<li><p>Limit query results</p>
</li>
<li><p>Query <a target="_blank" href="https://firebase.blog/posts/2019/06/understanding-collection-group-queries">Collection Groups</a></p>
</li>
</ul>
<h3 id="heading-firestore-data-source-configuration">Firestore data source configuration</h3>
<p><img src="https://github.com/pgollangi/firestore-grafana-datasource/raw/main/src/screenshots/firestore-datasource-configuration.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-using-datasource">Using datasource</h3>
<p><img src="https://github.com/pgollangi/firestore-grafana-datasource/raw/main/src/screenshots/query-with-firestore-datasource.png" alt class="image--center mx-auto" /></p>
]]></content:encoded></item><item><title><![CDATA[FireQL - Query Google Firestore database using SQL syntax.]]></title><description><![CDATA[FireQL is the Golang library and interactive CLI tool to query the Google Firestore database using SQL syntax.
It is built on top of the official Google Firestore Client SDK that will allow running queries Cloud Firestore database using SQL syntax.
h...]]></description><link>https://me.p11r.dev/fireql</link><guid isPermaLink="true">https://me.p11r.dev/fireql</guid><category><![CDATA[firestore]]></category><category><![CDATA[google cloud]]></category><category><![CDATA[Go Language]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[Developer]]></category><dc:creator><![CDATA[Prasanna Kumar]]></dc:creator><pubDate>Tue, 03 Jan 2023 12:49:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1672743918786/613d51b7-a5f7-49f5-a49e-6ae221c7eeaa.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a target="_blank" href="https://github.com/pgollangi/FireQL"><code>FireQL</code></a> is the Golang library and interactive CLI tool to query the Google Firestore database using SQL syntax.</p>
<p>It is built on top of the official <a target="_blank" href="https://pkg.go.dev/cloud.google.com/go/firestore">Google Firestore Client SDK</a> that will allow running queries Cloud Firestore database using SQL syntax.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://youtu.be/IUCuFmcRCWs">https://youtu.be/IUCuFmcRCWs</a></div>
<p> </p>
<h2 id="heading-usage">Usage</h2>
<p><code>FireQL</code> can be used as a Go library or interactive command-line tool.</p>
<h3 id="heading-go-library">Go Library</h3>
<p>An example of querying collections using SQL syntax:</p>
<pre><code class="lang-go"><span class="hljs-keyword">import</span> (
    <span class="hljs-string">"github.com/pgollangi/fireql"</span>
)

<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span> {
    fql, err := fireql.New(<span class="hljs-string">"&lt;GCP_PROJECT_ID&gt;"</span>)
    <span class="hljs-comment">//OR</span>
    fql, err = fireql.New(<span class="hljs-string">"&lt;GCP_PROJECT_ID&gt;"</span>, fireql.OptionServiceAccount(<span class="hljs-string">"&lt;SERVICE_ACCOUNT_JSON&gt;"</span>))
    <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
        <span class="hljs-built_in">panic</span>(err)
    }

    <span class="hljs-comment">// Now, execute SELECT query</span>
    result, err := fql.Execute(<span class="hljs-string">"SELECT * `users` order by id desc limit 10"</span>)
    <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
        <span class="hljs-built_in">panic</span>(err)
    }
    _ = result
}
</code></pre>
<h3 id="heading-command-line">Command-Line</h3>
<pre><code class="lang-bash">fireql [flags]
</code></pre>
<h4 id="heading-example">Example:</h4>
<pre><code class="lang-bash">$ fireql --project <span class="hljs-variable">$PROJECT_ID</span>
Welcome! Use SQL to query Firestore.
Use Ctrl+D, <span class="hljs-built_in">type</span> <span class="hljs-string">"exit"</span> to <span class="hljs-built_in">exit</span>.
Visit github.com/pgollangi/FireQL <span class="hljs-keyword">for</span> more details.
fireql&gt;select id, name from users <span class="hljs-built_in">limit</span> 2
+------+------------+
|  ID  |    NAME    |
+------+------------+
| 1046 | bob        |
| 1047 | smith      |
+------+------------+
(2 rows)
fireql&gt;
</code></pre>
<p>Read the <a target="_blank" href="https://pgollangi.github.io/FireQL/">documentation</a> for more information on CLI usage.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://github.com/pgollangi/FireQL">https://github.com/pgollangi/FireQL</a></div>
<p> </p>
<h2 id="heading-examples">Examples</h2>
<p>Some cool <code>SELECT</code> queries that are possible with <code>FireQL</code>:</p>
<pre><code class="lang-sql"><span class="hljs-keyword">select</span> * <span class="hljs-keyword">from</span> <span class="hljs-keyword">users</span>
<span class="hljs-keyword">select</span> *, <span class="hljs-keyword">id</span> <span class="hljs-keyword">as</span> user_id <span class="hljs-keyword">from</span> <span class="hljs-keyword">users</span>
<span class="hljs-keyword">select</span> <span class="hljs-keyword">id</span>, email <span class="hljs-keyword">as</span> email_address, <span class="hljs-string">`address.city`</span> <span class="hljs-keyword">AS</span> city <span class="hljs-keyword">from</span> <span class="hljs-string">`users`</span>
<span class="hljs-keyword">select</span> * <span class="hljs-keyword">from</span> <span class="hljs-keyword">users</span> <span class="hljs-keyword">order</span> <span class="hljs-keyword">by</span> <span class="hljs-string">'address.city'</span> <span class="hljs-keyword">desc</span> <span class="hljs-keyword">limit</span> <span class="hljs-number">10</span>
<span class="hljs-keyword">select</span> * <span class="hljs-keyword">from</span> <span class="hljs-string">`users`</span> <span class="hljs-keyword">where</span> <span class="hljs-keyword">id</span> &gt; <span class="hljs-number">50</span>
<span class="hljs-keyword">select</span> <span class="hljs-keyword">id</span>, <span class="hljs-keyword">LENGTH</span>(contacts) <span class="hljs-keyword">as</span> total_contacts <span class="hljs-keyword">from</span> <span class="hljs-string">`users`</span>
</code></pre>
<p>See <a target="_blank" href="https://github.com/pgollangi/FireQL/wiki">Wiki</a> for more examples.</p>
<h2 id="heading-installation">Installation</h2>
<h3 id="heading-homebrew">Homebrew</h3>
<pre><code class="lang-bash">brew install pgollangi/tap/fireql
</code></pre>
<p>Updating:</p>
<pre><code class="lang-bash">brew upgrade fireql
</code></pre>
<h3 id="heading-scoop-for-windows">Scoop (for windows)</h3>
<pre><code class="lang-sql">scoop bucket add pgollangi-bucket https://github.com/pgollangi/scoop-bucket.git
scoop <span class="hljs-keyword">install</span> fireql
</code></pre>
<h3 id="heading-docker">Docker</h3>
<pre><code class="lang-bash">docker run pgollangi/fireql
</code></pre>
<h3 id="heading-go">Go</h3>
<pre><code class="lang-bash">go install github.com/pgollangi/fireql@latest
</code></pre>
<h3 id="heading-manual">Manual</h3>
<p>You can alternately download a suitable binary for your OS at the <a target="_blank" href="https://github.com/pgollangi/fireql/releases">releases page</a>.</p>
<h2 id="heading-limitations">Limitations</h2>
<p>All of <a target="_blank" href="https://firebase.google.com/docs/firestore/query-data/queries#query_limitations">firestore query limitations</a> are applicable when running queries using <code>FireQL</code>.</p>
<p>In addition to that:</p>
<ul>
<li><p>Only <code>SELECT</code> queries for now. Support for <code>INSERT</code>, <code>UPDATE</code>, and <code>DELETE</code> might come in the future.</p>
</li>
<li><p>Only <code>AND</code> conditions supported in <code>WHERE</code> clause.</p>
</li>
<li><p>No support for <code>JOIN</code>s.</p>
</li>
<li><p><code>LIMIT</code> doesn't accept an <code>OFFSET</code>, only a single number.</p>
</li>
<li><p>No support of <code>GROUP BY</code> and aggregate function <code>COUNT</code>.</p>
</li>
</ul>
<h2 id="heading-future-scope">Future scope</h2>
<ul>
<li><p>Expand support for all logical conditions in <code>WHERE</code> clause by internally issuing multiple query requests to Firestore and merging results locally before returning.</p>
</li>
<li><p><code>GROUP BY</code> support</p>
</li>
<li><p>Support other DML queries: <code>INSERT</code>, <code>UPDATE</code>, and <code>DELETE</code></p>
</li>
</ul>
<p>Thanks for the read! Try using this if you are working with Firestore and share feedback.</p>
]]></content:encoded></item><item><title><![CDATA[India: Covid19 hospitals on Map]]></title><description><![CDATA[Hello!
I have created a site to locate covid19 hospitals in India on map with details like beds availability, contact information and directions to the hospitals.
Idea is to bring all hospitals on the map so that any one quickly search nearby hospita...]]></description><link>https://me.p11r.dev/india-covid19-hospitals-on-map</link><guid isPermaLink="true">https://me.p11r.dev/india-covid19-hospitals-on-map</guid><category><![CDATA[React]]></category><category><![CDATA[Netlify]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Prasanna Kumar]]></dc:creator><pubDate>Fri, 07 May 2021 04:28:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1668776958766/i2f3vGOEi.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hello!</p>
<p>I have created a site to locate covid19 hospitals in India on map with details like beds availability, contact information and directions to the hospitals.</p>
<p>Idea is to bring all hospitals on the map so that any one quickly search nearby hospitals or search hospitals near to an address. And be able to navigate to it using the directions.</p>
<p>Site: https://covidhospitals.online/
GitHub: https://github.com/covidhospitals/covidhospitals</p>
<h2 id="heading-features">Features:</h2>
<ul>
<li>Explore nearby hospitals using current device location</li>
<li>Search address to look at hospitals around that.</li>
<li>See hospitals contact details like phone, address along with beds availability</li>
<li>Get directions to navigate to hospital location</li>
</ul>
<h2 id="heading-built-with">Built With</h2>
<ul>
<li><a target="_blank" href="https://leafletjs.com/">Leaflet</a></li>
<li><a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a></li>
<li>ReactJS</li>
<li><a target="_blank" href="https://www.mapquest.com/">MapQuest</a></li>
</ul>
<h2 id="heading-source-of-data">Source of Data</h2>
<p>Currently hospital location, and beds information is being collected for AP, Delhi and most of the states in India. Feel free to volunteer to contribute the data adhering the JSON format. </p>
<h2 id="heading-credits">Credits</h2>
<ul>
<li>A big thanks <a target="_blank" href="https://netlify.com/">Netlify</a> for hosting the <a target="_blank" href="https://covidhospitals.online/">covidhospitals.online</a></li>
<li>Thanks to <a target="_blank" href="https://npoint.io">npoint.io</a> for hosting the AP hospital location data.</li>
</ul>
<p>Please feel to make changes to the site and add more data sources to it. Any contributions are most welcome. </p>
]]></content:encoded></item><item><title><![CDATA[go-portfinder]]></title><description><![CDATA[Go implementation of npm portfinder. A simple tool to find an open port on the current machine.
Repository
pgollangi/go-portfinder
Installation
$ go get github.com/pgollangi/go-portfinder
Usage
package main

import (  
    "github.com/pgollangi/go-po...]]></description><link>https://me.p11r.dev/go-portfinder-aa961ee78263</link><guid isPermaLink="true">https://me.p11r.dev/go-portfinder-aa961ee78263</guid><category><![CDATA[Go Language]]></category><category><![CDATA[cli]]></category><category><![CDATA[library]]></category><category><![CDATA[portfinder]]></category><category><![CDATA[Programming Blogs]]></category><dc:creator><![CDATA[Prasanna Kumar]]></dc:creator><pubDate>Fri, 16 Apr 2021 09:27:15 GMT</pubDate><content:encoded><![CDATA[<p>Go implementation of npm <a target="_blank" href="https://www.npmjs.com/package/portfinder">portfinder</a>. A simple tool to find an open port on the current machine.</p>
<h3 id="heading-repository">Repository</h3>
<p><a target="_blank" href="https://github.com/pgollangi/go-portfinder">pgollangi/go-portfinder</a></p>
<h3 id="heading-installation">Installation</h3>
<pre><code>$ go get github.com/pgollangi/go-portfinder
</code></pre><h3 id="heading-usage">Usage</h3>
<pre><code class="lang-go"><span class="hljs-keyword">package</span> main

<span class="hljs-keyword">import</span> (  
    <span class="hljs-string">"github.com/pgollangi/go-portfinder"</span>  
)

<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span>{  
     <span class="hljs-comment">// scans and returns first open port on all network interfaces of current machine.  </span>
     openPort, err := portfinder.GetPort(PortFinderOptions {  
         StartPort: <span class="hljs-number">9090</span>,  
         StopPort: <span class="hljs-number">9099</span>  
     })

    <span class="hljs-comment">// Check if a port is open  </span>
    isOpen, err := portfinder.IsOpen(<span class="hljs-number">8080</span>)  
}
</code></pre>
]]></content:encoded></item><item><title><![CDATA[fastget - ultra fast download files over HTTP(S)]]></title><description><![CDATA[⚡ fastget is an open source CLI tool as well as Go library to ultra fast download files over HTTP(S).
DISCLAIMER: FastGet performance heavily reliant on the network and CPU performance of the client machine. More importantly HTTP(s) endpoint must all...]]></description><link>https://me.p11r.dev/fastget-ultra-fast-download-files-over-https</link><guid isPermaLink="true">https://me.p11r.dev/fastget-ultra-fast-download-files-over-https</guid><category><![CDATA[fastget]]></category><category><![CDATA[Go Language]]></category><category><![CDATA[cli]]></category><category><![CDATA[cobra-cli]]></category><category><![CDATA[Programming Blogs]]></category><dc:creator><![CDATA[Prasanna Kumar]]></dc:creator><pubDate>Thu, 10 Sep 2020 18:30:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1668778588248/Lq5sez_1o.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>⚡ <a target="_blank" href="https://github.com/pgollangi/fastget"><code>fastget</code></a> is an open source CLI tool as well as Go library to ultra fast download files over HTTP(S).</p>
<p><strong>DISCLAIMER</strong>: FastGet performance heavily reliant on the network and CPU performance of the client machine. More importantly HTTP(s) endpoint must allow partial requests presenting <code>Accept-Ranges</code> and accepting <code>Range</code> headers.</p>
<h2 id="heading-features">Features</h2>
<ul>
<li>Concurrent download of files over HTTP(S) if server supports Accept-Ranges. Otherwise, fallback to single thread download.</li>
<li>Increase no. of concurrent workers to speed up download. Use flag <code>--workers</code>.</li>
<li>Add curl like custom headers to authentifacte HTTP(S) requests. Use flag <code>--header</code>.</li>
<li>Specify output file to write downloads. Default to file name of URL.<blockquote>
<p>Repo: https://github.com/pgollangi/fastget</p>
<ul>
<li>Star if you find this tool useful.</li>
<li>Open an Issue if you come accross any problem using tool.</li>
<li>Submit a PR if you would like an improvement</li>
</ul>
</blockquote>
</li>
</ul>
<h2 id="heading-usage">Usage</h2>
<p><code>fastget</code> available as Commnad-Line tool and Go library.</p>
<h3 id="heading-commnad-line">Commnad-Line</h3>
<pre><code>fastget [options] &lt;URL_TO_DOWNLOAD&gt;
</code></pre><h4 id="heading-examples">Examples</h4>
<pre><code>$ fastget http:<span class="hljs-comment">//speedtest.tele2.net/10MB.zip</span>
Download started..
<span class="hljs-number">3.50</span> MB / <span class="hljs-number">3.50</span> MB <span class="hljs-number">100</span> % [====================================================| <span class="hljs-number">0</span>s ] <span class="hljs-number">267.59</span> KB/s
<span class="hljs-number">3.50</span> MB / <span class="hljs-number">3.50</span> MB <span class="hljs-number">100</span> % [====================================================| <span class="hljs-number">0</span>s ] <span class="hljs-number">165.65</span> KB/s
<span class="hljs-number">3.50</span> MB / <span class="hljs-number">3.50</span> MB <span class="hljs-number">100</span> % [====================================================| <span class="hljs-number">0</span>s ] <span class="hljs-number">116.10</span> KB/s
Download finished <span class="hljs-keyword">in</span> <span class="hljs-number">3</span>s. File: E:\<span class="hljs-number">10</span>MB.zip
</code></pre><p>For more information on CLI usage, please refer <a target="_blank" href="pgollangi.github.io/fastget">pgollangi.github.io/fastget</a>.</p>
<h3 id="heading-go-library">Go Library</h3>
<p>Here is a simple example that finds fastest hosts:</p>
<pre><code>fg, <span class="hljs-attr">err</span> := fastget.NewFastGetter(<span class="hljs-string">"http://speedtest.tele2.net/10MB.zip"</span>)
<span class="hljs-keyword">if</span> err != nil {
    panic(err)
}

result, <span class="hljs-attr">err</span> := fg.Get()
<span class="hljs-keyword">if</span> err != nil {
    panic(err)
}
<span class="hljs-attr">file</span> := result.OutputFile
<span class="hljs-attr">elapsedTime</span> := result.ElapsedTime
</code></pre><p>For more information on library usage, please refer API documentation on <a target="_blank" href="https://pkg.go.dev/github.com/pgollangi/fastget">pkg.go.dev</a>.</p>
<h2 id="heading-installation">Installation</h2>
<h3 id="heading-scoop">Scoop</h3>
<pre><code>$ scoop bucket add pgollangi-bucket https:<span class="hljs-comment">//github.com/pgollangi/scoop-bucket.git</span>
$ scoop install fastget
</code></pre><p>Updating:</p>
<pre><code>$ scoop update fastget
</code></pre><h2 id="heading-homebrew">Homebrew</h2>
<pre><code>$ brew install pgollangi/tap/fastget
</code></pre><p>Updating:</p>
<pre><code>$ brew upgrade fastget
</code></pre><h3 id="heading-go">Go</h3>
<pre><code>$ go get github.com/pgollangi/fastget/cmd/fastget
$ fastget
</code></pre><h3 id="heading-manual">Manual</h3>
<ol>
<li>Download and install binary from the <a target="_blank" href="https://github.com/pgollangi/fastget/releases/latest">latest release</a>.</li>
<li>Recommended: add fastget executable to your $PATH.</li>
</ol>
<h3 id="heading-building-from-source">Building from source</h3>
<p><code>fastget</code> CLI is written in the <a target="_blank" href="https://golang.org/">Go programming language</a>, so to build the CLI yourself, you first need to have Go installed and configured on your machine.</p>
<h3 id="heading-install-go">Install Go</h3>
<p>To download and install Go, please refer to the <a target="_blank" href="https://golang.org/doc/install">Go documentation</a>. Please download Go 1.14.x or above.</p>
<h3 id="heading-clone-this-repository">Clone this repository</h3>
<pre><code>$ git clone https:<span class="hljs-comment">//gitlab.com/pgollangi/fastget.git</span>
$ cd fastget
</code></pre><h3 id="heading-build">Build</h3>
<pre><code>$ go build cmd/fastget/main.go
$ fastget
</code></pre><p>Happy <code>fastget</code>!!</p>
]]></content:encoded></item><item><title><![CDATA[netselect — find fastest site based on lowest ICMP latency]]></title><description><![CDATA[💻 netselect is an open source CLI tool as well as Go library to find the fastest host(s) based on the lowest ICMP latency.
It’s a handy tool to choose a mirror for apt, or just to compare sites to each other. Under the hood it’s just an ICMP ping.
$...]]></description><link>https://me.p11r.dev/netselect-find-fastest-site-based-on-lowest-icmp-latency-9cdf4369d13e</link><guid isPermaLink="true">https://me.p11r.dev/netselect-find-fastest-site-based-on-lowest-icmp-latency-9cdf4369d13e</guid><category><![CDATA[Go Language]]></category><category><![CDATA[cli]]></category><category><![CDATA[library]]></category><category><![CDATA[Programming Blogs]]></category><dc:creator><![CDATA[Prasanna Kumar]]></dc:creator><pubDate>Mon, 31 Aug 2020 03:05:06 GMT</pubDate><content:encoded><![CDATA[<p>💻 <a target="_blank" href="https://github.com/pgollangi/netselect"><code>netselect</code></a> is an open source CLI tool as well as Go library to find the fastest host(s) based on the lowest ICMP latency.</p>
<p>It’s a handy tool to choose a mirror for apt, or just to compare sites to each other. Under the hood it’s just an ICMP ping.</p>
<pre><code>$ netselect google.com google.in google.us  
google.com       <span class="hljs-number">55</span> ms  <span class="hljs-number">100</span>% ok         ( <span class="hljs-number">3</span>/ <span class="hljs-number">3</span>)  
google.in        <span class="hljs-number">56</span> ms  <span class="hljs-number">100</span>% ok         ( <span class="hljs-number">3</span>/ <span class="hljs-number">3</span>)  
google.us        <span class="hljs-number">59</span> ms  <span class="hljs-number">100</span>% ok         ( <span class="hljs-number">3</span>/ <span class="hljs-number">3</span>)
</code></pre><p>Github repo — <a target="_blank" href="https://github.com/pgollangi/netselect">pgollangi/netselect</a></p>
<p>Try it and let me know your feedback. I would greatly appreciate it.</p>
<h3 id="heading-features">Features</h3>
<ul>
<li>Finds the fastest host(s) in terms of network connectivity.</li>
<li>Run desired concurrent findings to get faster results. Use flag <code>--concurrent</code>.</li>
<li>Customize no. of ping attempt to perform for each host to get accurate mean response time. Use flag <code>--attempts</code>.</li>
<li>Display only top <code>n</code> results on output. Use flag <code>--output</code>.</li>
<li>Optionally, direct <code>netselect</code> to send “unprivileged” pings via UDP for non-sudo users. Use <code>--privileged=false</code></li>
</ul>
<h3 id="heading-usage">Usage</h3>
<p><code>netselect</code> available as Commnad-Line tool and Go library.</p>
<p>$ netselect <strong>[</strong>options] **<br />$ netselect -v<br />$ netselect --help</p>
<p>For more information on CLI usage, please refer <a target="_blank" href="https://pgollangi.github.io/netselect">pgollangi.github.io/netselect</a>.</p>
<h3 id="heading-installation">Installation</h3>
<h4 id="heading-scoop">Scoop:</h4>
<pre><code>$ scoop bucket add pgollangi-bucket https:<span class="hljs-comment">//github.com/pgollangi/scoop-bucket.git  </span>
$ scoop install netselect
</code></pre><h4 id="heading-homebrew">Homebrew:</h4>
<pre><code>brew install pgollangi/tap/netselect
</code></pre><h4 id="heading-manual">Manual:</h4>
<ol>
<li>Download and install binary from the <a target="_blank" href="https://github.com/pgollangi/netselect/releases/latest">latest release</a>.</li>
<li>Recommended: add netselect executable to your $PATH.</li>
</ol>
<blockquote>
<p><em>Github Repo:</em> <a target="_blank" href="https://github.com/pgollangi/netselect"><em>https://github.com/pgollangi/netselect</em></a></p>
<p><em>Star if you find this tool useful. Open an Issue if you come across any problem using tool. Submit a PR if you would like an improvement.</em></p>
</blockquote>
]]></content:encoded></item></channel></rss>