<?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>jq on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/jq/</link>
    <description>Recent content in jq on S Anand</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 05 Apr 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/jq/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Things I Learned - 05 Apr 2026</title>
      <link>https://www.s-anand.net/blog/things-i-learned-05-apr-2026/</link>
      <pubDate>Sun, 05 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-05-apr-2026/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It&amp;rsquo;s pretty convenient (on Ubuntu) to be able to move windows around desktops. Apart from the usual Super + Arrow keys to manage windows within a desktop, you can use:
&lt;ul&gt;
&lt;li&gt;Ctrl + Alt + Left/Right Arrow: Move desktops&lt;/li&gt;
&lt;li&gt;Ctrl + Alt + Shift + Left/Right Arrow: Move window to desktop&lt;/li&gt;
&lt;li&gt;Super + Shift + Arrow: Move window to another monitor&lt;/li&gt;
&lt;li&gt;Super + Drag: Drag window from anywhere&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;jq . file.json&lt;/code&gt; is an efficient way to pretty-print JSON files in the terminal. (Or &lt;code&gt;jaq . file.json&lt;/code&gt;, which is ~30% faster.)&lt;/li&gt;
&lt;li&gt;GitHub Copilot monthly premium requests were &lt;em&gt;not&lt;/em&gt; reset at 12 am UTC&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://social.jvns.ca/@b0rk/116297197345549083&#34;&gt;How Diffie Hellman Key Exchange Works&lt;/a&gt; by Julia Evans is an &lt;em&gt;excellent&lt;/em&gt; explanation. Share a random number. A multiplies it by their private key and shares S&lt;em&gt;A. B multiplies it by their private key and shares S&lt;/em&gt;B. They multiply the others&amp;rsquo; key with their secret key and they get S&lt;em&gt;A&lt;/em&gt;B = S&lt;em&gt;B&lt;/em&gt;A. Now &lt;em&gt;both&lt;/em&gt; of them have the same &lt;em&gt;new&lt;/em&gt; secret they can encrypt/decrypt with, but no one else knows, even though they shared everything publicly! This may be one of the &lt;strong&gt;best&lt;/strong&gt; cool uses of math I&amp;rsquo;ve seen in a long time.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/&#34;&gt;Shell tricks&lt;/a&gt; I didn&amp;rsquo;t know:
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# ALT + . cycles through the last arguments typed&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mv file.&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;txt,md&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;    &lt;span class=&#34;c1&#34;&gt;# Move file.txt to file.md&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ls &lt;span class=&#34;p&#34;&gt;|&amp;amp;&lt;/span&gt; tee file.txt  &lt;span class=&#34;c1&#34;&gt;# Pipe both stdout and stderr to tee&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>How to review trending GitHub repos on VS Code</title>
      <link>https://www.s-anand.net/blog/how-to-review-trending-github-repos-on-vs-code/</link>
      <pubDate>Sat, 27 Sep 2025 13:17:50 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/how-to-review-trending-github-repos-on-vs-code/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;How to review trending GitHub repos on VS Code&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/trending-repos.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;Here’s how I track trending &lt;a href=&#34;https://github.com/&#34;&gt;GitHub&lt;/a&gt; repos each week. I run a &lt;a href=&#34;https://github.com/sanand0/til/blob/43628ba72400451d20076df12dec823f08482c5b/trending-repos.sh&#34;&gt;scheduled script&lt;/a&gt; that saves a &lt;a href=&#34;https://github.com/sanand0/til/blob/43628ba72400451d20076df12dec823f08482c5b/trending-repos.tsv&#34;&gt;clean TSV&lt;/a&gt; I can scan fast.&lt;/p&gt;
&lt;p&gt;It uses &lt;a href=&#34;https://pypi.org/project/gtrending&#34;&gt;&lt;code&gt;uvx gtrending&lt;/code&gt;&lt;/a&gt; to fetch &lt;strong&gt;weekly&lt;/strong&gt; trending repos for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Rust&lt;/strong&gt;: High-quality system tools. (Anything in Rust seems cool.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Go&lt;/strong&gt;: Reliable CLI/infra tools. (Like Rust, most Go code seems good.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python&lt;/strong&gt;: Most AI/ML stuff&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TypeScript&lt;/strong&gt;: Most modern JS codebases&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;JavaScript&lt;/strong&gt;: Most front-end utilities&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Shell&lt;/strong&gt;: Productivity scripts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I pipe results through &lt;a href=&#34;https://jqlang.org/&#34;&gt;&lt;code&gt;jq&lt;/code&gt;&lt;/a&gt; to extract:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Language&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stars&lt;/strong&gt;: for popularity&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Current period stars&lt;/strong&gt;: for growth&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Date&lt;/strong&gt;: when I run it&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Full name&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I use &lt;a href=&#34;https://en.wikipedia.org/wiki/AWK&#34;&gt;&lt;code&gt;awk&lt;/code&gt;&lt;/a&gt; to de-duplicate by repo and save into a &lt;a href=&#34;https://github.com/sanand0/til/blob/main/trending-repos.tsv&#34;&gt;TSV file&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then I review the TSV in &lt;a href=&#34;https://code.visualstudio.com/&#34;&gt;VS Code&lt;/a&gt;. I stopped using Excel. &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=mechatroner.rainbow-csv&#34;&gt;Rainbow CSV&lt;/a&gt; and &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=janisdd.vscode-edit-csv&#34;&gt;Edit CSV&lt;/a&gt; make large TSVs easy to scan, sort, and re-structure. (I&amp;rsquo;m quite excited at the new tricks I&amp;rsquo;m learning to replace Excel!)&lt;/p&gt;
&lt;p&gt;I tag the first column with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;🟣 &lt;strong&gt;pending&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;🔴 &lt;strong&gt;ignore&lt;/strong&gt; (with reason in the last column)&lt;/li&gt;
&lt;li&gt;🟢 &lt;strong&gt;active&lt;/strong&gt; (I currently use it)&lt;/li&gt;
&lt;li&gt;⏺️ &lt;strong&gt;review&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I picked these icons carefully. A &lt;strong&gt;descending sort&lt;/strong&gt; puts 🟣 on top (to scan quickly) and ⏺️ at the bottom (for closer review). This also puts top-starred repos in each language first.&lt;/p&gt;
&lt;p&gt;The payoff for the right tools is high. This process makes it easy. I found &lt;a href=&#34;http://flameshot.org/&#34;&gt;Flameshot&lt;/a&gt;, &lt;a href=&#34;https://github.com/muesli/duf&#34;&gt;duf&lt;/a&gt; and &lt;a href=&#34;https://github.com/bahdotsh/wrkflw&#34;&gt;wrkflw&lt;/a&gt; this way.&lt;/p&gt;
&lt;p&gt;To try it, download and run &lt;a href=&#34;https://github.com/sanand0/til/blob/43628ba72400451d20076df12dec823f08482c5b/trending-repos.sh&#34;&gt;&lt;code&gt;bash trending-repos.sh&lt;/code&gt;&lt;/a&gt; and open the TSV it generates.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>
