<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Intro on Prithu Goswami</title>
    <link>https://prithu.dev/</link>
    <description>Recent content in Intro on Prithu Goswami</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <managingEditor>prithu@prithu.dev (Prithu Goswami)</managingEditor>
    <webMaster>prithu@prithu.dev (Prithu Goswami)</webMaster>
    <lastBuildDate>Sat, 25 Oct 2025 16:04:46 +0530</lastBuildDate>
    <atom:link href="https://prithu.dev/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>context engineering using links</title>
      <link>https://prithu.dev/notes/context-engineering-using-links/</link>
      <pubDate>Sat, 25 Oct 2025 16:04:46 +0530</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/context-engineering-using-links/</guid>
      <description>&lt;p&gt;I came across &lt;a href=&#34;https://mbleigh.dev/posts/context-engineering-with-links/&#34;&gt;this interesting post&lt;/a&gt;. Some notes after reading it:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Context engineering involves the process of activily making the context window work for the given task. Since LLMs have a bias to information close to the end of the context window, it&amp;rsquo;s important to optimize for this and remove all noise as the conversation progresses.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Fresh invocations of LLMs with context perform better than stale, long running conversation.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Author reminds us of HATEOAS where we link resources in responses too. Example:&lt;/p&gt;</description>
    </item>
    <item>
      <title>a2a protocol</title>
      <link>https://prithu.dev/notes/a2a-protocol/</link>
      <pubDate>Sun, 19 Oct 2025 15:47:58 +0530</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/a2a-protocol/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://a2a-protocol.org/latest/&#34;&gt;https://a2a-protocol.org/latest/&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It is primarily for agents to collaborate on long running tasks. A primary agent could leverage many agents to complete tasks.&lt;/li&gt;&#xA;&lt;li&gt;This is useful because the primary agent doesn&amp;rsquo;t have to polute it&amp;rsquo;s context with other tasks that can be handled in a seperate &amp;ldquo;thread&amp;rdquo;.&lt;/li&gt;&#xA;&lt;li&gt;The primary agent is responsible to steer the conversation with the secondary agent to get the task done.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://discuss.google.dev/t/agents-are-not-tools/192812&#34;&gt;Why can&amp;rsquo;t agents just be tools?&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It&amp;rsquo;s because tools are mostly actions you perform and there&amp;rsquo;s a start and an end to it and it&amp;rsquo;s a concrete task with an output you expect to get quickly. Eg. Create a new resources, update a resource with id 123, read the resource with id 123, etc. Tools don&amp;rsquo;t allow for multi-turn interactions, whereas a separate agent can follow up with quetsions, clarifications and alternatives to solve a task.&lt;/li&gt;&#xA;&lt;li&gt;That being said you still can have an agent as a tool for one-shot answers that don&amp;rsquo;t require back and forth communication. Things like &amp;ldquo;translate this block of text to Spanish&amp;rdquo;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>installing nixos on oracle cloud arm instance</title>
      <link>https://prithu.dev/notes/installing-nixos-on-oracle-cloud-arm-instance/</link>
      <pubDate>Wed, 06 Nov 2024 12:03:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/installing-nixos-on-oracle-cloud-arm-instance/</guid>
      <description>&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Download netboot efi&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;wget https://boot.netboot.xyz/ipxe/netboot.xyz-arm64.efi&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Move it to &lt;code&gt;/boot/efi/&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Open cloud shell connection from the instance page. On the instance page it&amp;rsquo;s labeled &amp;ldquo;Console Connection&amp;rdquo; under &amp;ldquo;Resources&amp;rdquo;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&amp;ldquo;Reboot&amp;rdquo; the instance&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Continuously press Esc in the cloud shell. EFI boot manager pops up. Then open the EFI shell and type &lt;code&gt;fs0:netboot.xyz-arm64.efi&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Select NixOS from the netboot menu&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Install nix os (follow wiki)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
    <item>
      <title>access cloudflare r2 using aws cli</title>
      <link>https://prithu.dev/notes/access-cloudflare-r2-using-aws-cli/</link>
      <pubDate>Tue, 05 Nov 2024 23:07:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/access-cloudflare-r2-using-aws-cli/</guid>
      <description>&lt;ol&gt;&#xA;&lt;li&gt;Create R2 tokens from the r2 Overview page. &amp;ldquo;Manage r2 API Tokens&amp;rdquo; -&amp;gt; &amp;ldquo;Create API Token&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;Copy the access key id and secret access key values&lt;/li&gt;&#xA;&lt;li&gt;Copy the endpoint url. It&amp;rsquo;s of the form &lt;code&gt;&amp;lt;cloudflare_account_id&amp;gt;.r2.cloudflarestorage.com&lt;/code&gt;. Cloudflare account id is present in the url bar too when you are accessing the cloudflare dashboard and is also displayed in overview page of r2&lt;/li&gt;&#xA;&lt;li&gt;~/.aws/config:&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[profile cloudflare]&#xA;endpoint_url = https://&amp;lt;cloudlare_account_id&amp;gt;.r2.cloudflarestorage.com&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;~/.aws/credentials&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[cloudflare]&#xA;aws_access_key_id = &amp;lt;&amp;gt; &#xA;aws_secret_access_key = &amp;lt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;test with:&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;aws s3 ls&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
    <item>
      <title>python logging in aws lambda</title>
      <link>https://prithu.dev/notes/python-logging-in-aws-lambda/</link>
      <pubDate>Thu, 07 Mar 2024 21:34:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/python-logging-in-aws-lambda/</guid>
      <description>&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;LOG_LEVEL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;os&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;getenv&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;LOG_LEVEL&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;INFO&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;upper&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;logger&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;logging&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;getLogger&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;logger&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;setLevel&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;level&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LOG_LEVEL&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;logger&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Info log&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;logger&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Error log&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;also-see&#34;&gt;Also see&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://stackoverflow.com/questions/37703609/using-python-logging-with-aws-lambda&#34;&gt;amazon web services - Using python Logging with AWS Lambda - Stack Overflow&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>make lambda.zip using python poetry</title>
      <link>https://prithu.dev/notes/make-lambda-zip-using-python-poetry/</link>
      <pubDate>Thu, 07 Mar 2024 21:04:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/make-lambda-zip-using-python-poetry/</guid>
      <description>&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;poetry build&#xA;poetry run pip install --upgrade -t dist/lambda dist/reporter*.whl&#xA;cd dist/lambda; zip -r ../lambda.zip . -x &amp;#39;*.pyc&amp;#39;; cd ../../&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;If there are problems with some dependencies (GLIBC version mismatch) use&#xA;&lt;code&gt;--platform manylinux2014_x86_64&lt;/code&gt; (or another type of linux pypi package) and&#xA;&lt;code&gt;--only-binary=:all:&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;poetry run pip install --platform manylinux2014_x86_64 --only-binary=:all: -t dist/lambda dist/reporter*.whl&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;without-poetry&#34;&gt;without poetry&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;pip install --platform manylinux2014_x86_64 --only-binary=:all: -r requirements.txt -t /build/lambda&#xA;&#xA;# add your python package /build/lambda&#xA;&#xA;cd /build/lambda; zip -r /build/lambda.zip . -x &amp;#39;*.pyc&amp;#39;; cd ../../&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>https for local development</title>
      <link>https://prithu.dev/notes/https-for-local-development/</link>
      <pubDate>Thu, 07 Mar 2024 08:31:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/https-for-local-development/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Use &lt;a href=&#34;https://github.com/FiloSottile/mkcert&#34;&gt;mkcert&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mkcert -install&#xA;mkcert localhost # creates two localhost.pem (cert) and localhost-key.pem (key) file&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;provide the key and cert file to the http server program. For example in python if using uvicorn:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;uvicorn.run(&amp;#34;api.main:app&amp;#34;, host=&amp;#34;0.0.0.0&amp;#34;, ssl_keyfile=key_path, ssl_certfile=cert_path, reload=True)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;also-read&#34;&gt;Also read&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development/&#34;&gt;How to Create Your Own SSL Certificate Authority for Local HTTPS Development&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://akshitb.medium.com/how-to-run-https-on-localhost-a-step-by-step-guide-c61fde893771&#34;&gt;How to Run HTTPS on Localhost: A Step-by-Step Guide&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
    <item>
      <title>python module search path in aws lambda</title>
      <link>https://prithu.dev/notes/python-module-search-path-in-aws-lambda/</link>
      <pubDate>Tue, 05 Mar 2024 15:48:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/python-module-search-path-in-aws-lambda/</guid>
      <description>&lt;p&gt;When you use an import statement in your code, the Python runtime searches the directories in its search path until it finds the module or package. By default, the runtime searches the &lt;code&gt;$LAMBDA_TASK_ROOT&lt;/code&gt; (&lt;code&gt;/var/task&lt;/code&gt;) directory first. If you include a version of a runtime-included library in your image, your version will take precedence over the version that&amp;rsquo;s included in the runtime.&lt;/p&gt;&#xA;&lt;p&gt;Other steps in the search path depend on which version of the Lambda base image for Python you&amp;rsquo;re using:&lt;/p&gt;</description>
    </item>
    <item>
      <title>localhost not resolving for some programs</title>
      <link>https://prithu.dev/notes/til-localhost-not-resolving-for-lnd/</link>
      <pubDate>Mon, 04 Mar 2024 22:25:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/til-localhost-not-resolving-for-lnd/</guid>
      <description>&lt;h1 id=&#34;check-your-etchosts&#34;&gt;Check your &lt;code&gt;/etc/hosts&lt;/code&gt;&lt;/h1&gt;&#xA;&lt;p&gt;So ran into this stupid error where lnd was not starting because it was trying to lookup &lt;code&gt;localhost&lt;/code&gt; and it couldn&amp;rsquo;t resolve it so it asks the DNS server (1.1.1.1) and obviously can&amp;rsquo;t resolve it either.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;failed to load config: lookup localhost on 1.1.1.1:53: no such host&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Add this to  &lt;code&gt;/etc/hosts&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;127.0.0.1 localhost&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>cloudfront proxied dns redirect loop issue</title>
      <link>https://prithu.dev/notes/cloudfront-prxied-dns-redirect-loop-issue/</link>
      <pubDate>Mon, 19 Feb 2024 21:50:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/cloudfront-prxied-dns-redirect-loop-issue/</guid>
      <description>&lt;p&gt;Faced an issue where I would get stuck in a redirect loop when configured a cloudflare dns as &amp;lsquo;proxied&amp;rsquo;. Turns out the solution is to set SSL/TLS mode to &amp;lsquo;Full&amp;rsquo; and that solves it.&lt;/p&gt;&#xA;&lt;h1 id=&#34;ref&#34;&gt;Ref&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://community.cloudflare.com/t/enabling-cloudflare-dns-proxy-results-in-redirect-loop/510465&#34;&gt;https://community.cloudflare.com/t/enabling-cloudflare-dns-proxy-results-in-redirect-loop/510465&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Debugging dwm to fix an annoying bug</title>
      <link>https://prithu.dev/posts/debugging-dwm/</link>
      <pubDate>Sat, 17 Feb 2024 18:19:23 +0530</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/posts/debugging-dwm/</guid>
      <description>&lt;p&gt;I use &lt;a href=&#34;https://dwm.suckless.org&#34;&gt;dwm&lt;/a&gt; as my window manager and I always wanted&#xA;to hack on it ever since I started using it and I have taken my first step&#xA;towards that by debugging it and understanding the codebase a little. This post is&#xA;just going to be a lot of snippets from dwm source code with my explanation on&#xA;it as I understand it myself and sharing what I learnt while debugging dwm&#xA;along the way. I wanted to fix an annoying issue I was facing with dwm and&#xA;through this post I want to document the process of how I fixed it. It&amp;rsquo;s also a&#xA;reason for me to practice writing.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A bash gotcha - command substitution in bashrc</title>
      <link>https://prithu.dev/notes/bash-gotcha-command-substitution-backticks-and-dollar-braces-in-bashrc/</link>
      <pubDate>Wed, 14 Feb 2024 12:53:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/bash-gotcha-command-substitution-backticks-and-dollar-braces-in-bashrc/</guid>
      <description>&lt;p&gt;I have this alias in my bashrc:&lt;/p&gt;&#xA;&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;nb&#34;&gt;alias&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;qn&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;cd ~/docs/org/0-inbox/ &amp;amp;&amp;amp; vim `date +%Y-%m-%d-%H%M`.md&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;which uses Command-Substitution&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; and basically just makes a &amp;ldquo;quick note&amp;rdquo; which I can refer later and move it&#xA;a more appropriate place in my organized notes when I have the time.&#xA;But when I run this alias it always opens the same note even if I run it at another time.&lt;/p&gt;&#xA;&lt;p&gt;TIL that using ` (backticks) or even &lt;code&gt;$()&lt;/code&gt; in alias this way makes it output&#xA;the value when the alias is initialized. So it essentially freezes it&amp;rsquo;s value&#xA;when the alias is first sourced. So, If I run this command again at another&#xA;time it will still open the same file. Not what is intended.&#xA;The solution? Escape the command substitution&lt;/p&gt;</description>
    </item>
    <item>
      <title>useful git tidbits</title>
      <link>https://prithu.dev/notes/usuful-git-tidbits/</link>
      <pubDate>Sat, 10 Feb 2024 13:05:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/usuful-git-tidbits/</guid>
      <description>&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;--force-with-lease&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;code&gt;git push --force-with-lease&lt;/code&gt; &amp;ndash; safer than just &lt;code&gt;--force&lt;/code&gt; since if it doesn&amp;rsquo;t expect the same commit before the force push to be there as yours, it doesn&amp;rsquo;t push it.&lt;/p&gt;&#xA;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;&lt;code&gt;git maintenance start&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;makes things faster. Does a bunch of stuff in the config that does automatic stuff in the background using systemd timers&lt;/p&gt;&#xA;&lt;ol start=&#34;3&#34;&gt;&#xA;&lt;li&gt;&lt;code&gt;git blame -w -C -C -C&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;much better than just git blame cause it&amp;rsquo;s smarter about moving of the lines and ignores whitespaces.&lt;/p&gt;</description>
    </item>
    <item>
      <title>TIL: Cloudfront has a limit on URL length</title>
      <link>https://prithu.dev/notes/til-cloudfront-has-a-limit-on-url-length/</link>
      <pubDate>Thu, 25 Jan 2024 08:51:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/til-cloudfront-has-a-limit-on-url-length/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;Make sure that URL lengths are within range 8192 bytes&lt;/li&gt;&#xA;&lt;li&gt;Some other services might follow a generic 2000 character limit.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers&#34;&gt;http - What is the maximum length of a URL in different browsers? - Stack Overflow&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Setting up wireguard VPN</title>
      <link>https://prithu.dev/notes/wireguard-vpn-setup/</link>
      <pubDate>Mon, 27 Nov 2023 15:23:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/wireguard-vpn-setup/</guid>
      <description>&lt;h3 id=&#34;server-setup&#34;&gt;Server Setup&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[Interface]&#xA;PrivateKey = yMvNoQjJrhKBi9BM1GVDOgp12002CBsafprcucOLNXM=&#xA;Address = 10.0.0.1/24&#xA;PostUp = iptables -A FORWARD -i wg1 -j ACCEPT; iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE&#xA;PostDown = iptables -D FORWARD -i wg1 -j ACCEPT; iptables -t nat -D POSTROUTING -o ens3 -j MASQUERADE&#xA;ListenPort = 52498&#xA;&#xA;[Peer]&#xA;PublicKey = VikFbA8ELVftC2Hzz7ukYCxTT229g2GxkwXmXMwqZhw=&#xA;AllowedIPs = 10.0.0.2/32&#xA;&#xA;[Peer]&#xA;PublicKey = oIHBz1u1kCu+5UnDmPCQ5kyQmGpHup3YIISPOK1B21Y=&#xA;AllowedIPs = 10.0.0.3/32&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;client-setup&#34;&gt;Client Setup&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[Interface]&#xA;Address = 10.0.0.2/32&#xA;PrivateKey = GY37SEG1RHkdxaxoj+fz3GwE/EqJxDbRK/684pRS13M=&#xA;DNS = 1.1.1.1&#xA;&#xA;# Server info&#xA;[Peer]&#xA;PublicKey = Xwf/2RaaGu4rvvMxJx8oebFMx1LPSU49bUtYsAhGQUU= &#xA;Endpoint = {SERVER_PUBLIC_IP}:52498&#xA;# Reach out to the Wireguard Server for every IPv4 address&#xA;# All our IPv4 traffic will be &amp;#34;routed&amp;#34; through the server&#xA;AllowedIPs = 0.0.0.0/0, ::/0&#xA;PersistentKeepalive = 25&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;ListenPort&lt;/code&gt; can be any random port number. Make sure the UDP port is allowed by the firewall on the server&lt;/li&gt;&#xA;&lt;li&gt;replace &lt;code&gt;ens3&lt;/code&gt; with an actual interface name available on the server&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>TIL: AWS s3 folders</title>
      <link>https://prithu.dev/notes/aws-s3-folders/</link>
      <pubDate>Wed, 15 Nov 2023 22:46:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/aws-s3-folders/</guid>
      <description>&lt;p&gt;Although s3 has a flat structure—unlike a filesystem—it has a concept of &amp;ldquo;folders&amp;rdquo;. Folders are 0-byte objects whose key&#xA;names end with a &amp;lsquo;/&amp;rsquo; When you create a folder from the s3 console it creates&#xA;this object automatically and you can manually create it using cli with an&#xA;object key ending in &amp;lsquo;/&amp;rsquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-folders.html&#34;&gt;https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-folders.html&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>using different python version with pyenv and poetry</title>
      <link>https://prithu.dev/notes/using-different-python-version-with-pyenv-and-poetry/</link>
      <pubDate>Fri, 29 Sep 2023 14:04:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/using-different-python-version-with-pyenv-and-poetry/</guid>
      <description>&lt;ol&gt;&#xA;&lt;li&gt;install pyenv&lt;/li&gt;&#xA;&lt;li&gt;install a python version using &lt;code&gt;pyenv install 3.9&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;this should have created a directory &lt;code&gt;~/.pyenv&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;tell poetry to use a specific python version - &lt;code&gt;poetry env use /home/prithu/.pyenv/versions/3.9.18/bin/python&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;then run &lt;code&gt;poetry install&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
    <item>
      <title>good computer engineering videos</title>
      <link>https://prithu.dev/notes/good-computer-engineering-videos/</link>
      <pubDate>Thu, 28 Sep 2023 21:40:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/good-computer-engineering-videos/</guid>
      <description>&lt;h2 id=&#34;software&#34;&gt;Software&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=mCM6QVHD08c&#34;&gt;How to &amp;ldquo;think&amp;rdquo; (and design) like a Software Architect at Silicon Valley Code Camp 2019&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;hardware&#34;&gt;Hardware&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=olXire09ZnE&#34;&gt;The Future of Microprocessors — Sophie Wilson&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>docker tags with repo name must match the actual image</title>
      <link>https://prithu.dev/notes/docker-tags-with-repo-name-must-match-the-actual-image/</link>
      <pubDate>Sun, 09 Jul 2023 15:12:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/docker-tags-with-repo-name-must-match-the-actual-image/</guid>
      <description>&lt;p&gt;These are not the same&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker tag api-service:latest 123456789012.dkr.ecr.eu-west-1.amazonaws.com/api:latest&#xA;docker push 123456789012.dkr.ecr.eu-west-1.amazonaws.com/api:latest&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker tag api-service:latest 123456789012.dkr.ecr.eu-west-1.amazonaws.com/api-service:latest&#xA;docker push 123456789012.dkr.ecr.eu-west-1.amazonaws.com/api-service:latest&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Maybe this is obvious for future me. But this is the stupid thing I was doing expecting the first command to work when I docker pushed. Need to further investigate what was actually being pushed in the first case?&lt;/p&gt;</description>
    </item>
    <item>
      <title>RPi server behind VPS using wireguard and iptables NAT</title>
      <link>https://prithu.dev/posts/rpi-wireguard-iptables/</link>
      <pubDate>Wed, 01 Feb 2023 09:23:53 +0530</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/posts/rpi-wireguard-iptables/</guid>
      <description>&lt;p&gt;A few months ago, I wanted to host files stored on a portable hard disk on the&#xA;public internet. These files were just some photos and videos that I wanted to&#xA;share with some of my cousins. Nothing fancy, just a webdav server using&#xA;&lt;a href=&#34;https://rclone.org/commands/rclone_serve_webdav/&#34;&gt;rclone&lt;/a&gt; would&#xA;suffice—a very ad-hoc setup as you can see. I wanted it to be reachable&#xA;at &lt;code&gt;share.prithu.dev&lt;/code&gt; to give it a short and friendly rememberable name. I used&#xA;the RPi 4 to be the host machine, attached the hard drive to one of it&amp;rsquo;s usb&#xA;ports, &lt;code&gt;mount&lt;/code&gt;&amp;rsquo;d the drive at &lt;code&gt;/mount/hdd&lt;/code&gt; and ran:&lt;/p&gt;</description>
    </item>
    <item>
      <title>example.com equivalent of IP addresses</title>
      <link>https://prithu.dev/notes/example-com-equivalent-of-ip-addresses/</link>
      <pubDate>Wed, 18 Jan 2023 00:45:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/example-com-equivalent-of-ip-addresses/</guid>
      <description>&lt;p&gt;The example.com equivalent of IP address is the block of 192.0.2.0/24.&lt;/p&gt;&#xA;&lt;p&gt;From rfc-3330&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;192.0.2.0/24 - This block is assigned as &amp;ldquo;TEST-NET&amp;rdquo; for use in&#xA;documentation and example code.  It is often used in conjunction with&#xA;domain names example.com or example.net in vendor and protocol&#xA;documentation.  Addresses within this block should not appear on the&#xA;public Internet.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>API security</title>
      <link>https://prithu.dev/notes/api-security/</link>
      <pubDate>Mon, 14 Nov 2022 20:14:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/api-security/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://owasp.org/www-project-api-security/&#34;&gt;https://owasp.org/www-project-api-security/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/playlist?list=PLbyncTkpno5HqX1h2MnV6Qt4wvTb8Mpol&#34;&gt;https://www.youtube.com/playlist?list=PLbyncTkpno5HqX1h2MnV6Qt4wvTb8Mpol&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/shieldfy/API-Security-Checklist&#34;&gt;https://github.com/shieldfy/API-Security-Checklist&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/OWASP/crAPI&#34;&gt;https://github.com/OWASP/crAPI&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>programming books and articles</title>
      <link>https://prithu.dev/notes/programming-books-and-articles/</link>
      <pubDate>Mon, 03 Oct 2022 12:47:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/programming-books-and-articles/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://workingwithruby.com/downloads/Working%20With%20Unix%20Processes.pdf&#34;&gt;Working with Unix Processes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://workingwithruby.com/downloads/Working%20With%20TCP%20Sockets.pdf&#34;&gt;Working with TCP Sockets&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://beej.us/guide/bgnet/&#34;&gt;Beej&amp;rsquo;s Guide&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://use-the-index-luke.com/&#34;&gt;Use the Index Luke&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>CSRF Cookie</title>
      <link>https://prithu.dev/notes/csrf-cookie/</link>
      <pubDate>Thu, 29 Sep 2022 23:27:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/csrf-cookie/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;Complete this note with auth methods and how they are&#xA;implemented are resources.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://security.stackexchange.com/questions/166724/should-i-use-csrf-protection-on-rest-api-endpoints&#34;&gt;https://security.stackexchange.com/questions/166724/should-i-use-csrf-protection-on-rest-api-endpoints&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Actually good youtube channels</title>
      <link>https://prithu.dev/notes/actually-good-youtube-channels/</link>
      <pubDate>Tue, 06 Sep 2022 08:07:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/actually-good-youtube-channels/</guid>
      <description>&lt;h2 id=&#34;computer-science&#34;&gt;Computer Science&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/c/Reducible/videos&#34;&gt;Reducible&lt;/a&gt; - 3b1b type videos of CS topics&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/c/BenEater/videos&#34;&gt;Ben Eater&lt;/a&gt; - Computer architecture and electronics&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/c/computerphile/videos&#34;&gt;Computerphile&lt;/a&gt; - Computer science explained&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/@ZeroToASICcourse&#34;&gt;Zero To ASIC Course&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;science&#34;&gt;Science&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/c/nilsberglund&#34;&gt;Nils Berglund - YouTube&lt;/a&gt;&#xA;Makes cool simulations&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;infotainment&#34;&gt;Infotainment&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/@Asianometry&#34;&gt;Asianometry - YouTube&lt;/a&gt;&#xA;Video essays on business, economics, and history. Sometimes about Asia, but not always.&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
    <item>
      <title>packages, utils and tools</title>
      <link>https://prithu.dev/notes/packages-utils-and-tools/</link>
      <pubDate>Thu, 01 Sep 2022 14:16:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/packages-utils-and-tools/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/Canop/broot&#34;&gt;broot&lt;/a&gt; - A new way to see and navigate directory trees&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/dvorka/hstr&#34;&gt;hstr&lt;/a&gt; - shell history suggest box - easily view, navigate, search and manage your command history.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/christophgysin/pasystray&#34;&gt;pasystray&lt;/a&gt; - A nice pulse audio system tray written in c&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/Canop/rhit&#34;&gt;GitHub - Canop/rhit: A nginx log explorer&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>noise generators</title>
      <link>https://prithu.dev/notes/noise-generators/</link>
      <pubDate>Mon, 08 Aug 2022 21:55:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/noise-generators/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://mynoise.net/&#34;&gt;https://mynoise.net/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://brainaural.com/&#34;&gt;https://brainaural.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://asoftmurmur.com/&#34;&gt;https://asoftmurmur.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>the go programming language book notes</title>
      <link>https://prithu.dev/notes/learning-golang/</link>
      <pubDate>Thu, 04 Aug 2022 20:26:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/learning-golang/</guid>
      <description>&lt;div class=&#34;_aside&#34;&gt;These are notes that I took while reading the &lt;a href=&#34;https://www.gopl.io/&#34;&gt;The Go Prgogramming Language book&lt;/a&gt; &lt;/div&gt;&#xA;&#xA;&lt;h3 id=&#34;interesting-points&#34;&gt;Interesting points&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Go has some strictness when it comes to compiling&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;if packages are imported but not used - don&amp;rsquo;t compile&lt;/li&gt;&#xA;&lt;li&gt;if a newline is placed incorrectly - don&amp;rsquo;t compile. Newlines follwing certain tokens are converted to semicolons automatically&lt;/li&gt;&#xA;&lt;li&gt;Semicolons are used only when statements are to be written in one line one after another.&lt;/li&gt;&#xA;&lt;li&gt;if local variables are not used - don&amp;rsquo;t compile&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Go also has strict code formatting rules built-in, which makes it standard everywhere.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Freedom of Monetary Transaction</title>
      <link>https://prithu.dev/notes/freedom-of-monetary-transaction/</link>
      <pubDate>Tue, 19 Jul 2022 19:59:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/freedom-of-monetary-transaction/</guid>
      <description>&lt;p&gt;Wrote the following in the FOSS United Telegram group, might expand this later&#xA;as a blog post.&lt;/p&gt;&#xA;&lt;div class=&#34;_aside&#34;&gt;&lt;h4 id=&#34;context&#34;&gt;Context&lt;/h4&gt;&#xA;&lt;p&gt;Razorpay was put under scrutiny for accepting donation for&#xA;a news org (altnews I believe?) from foreign sources. The discussion in the group was&#xA;that whether or not it should have been allowed. I just chipped in.&lt;/p&gt; &lt;/div&gt;&#xA;&#xA;&lt;p&gt;But, is it right to curb the inflow of money from foreign sources in some cases&#xA;but allow it for others? Money should be free and neutral. It&amp;rsquo;s a tool for&#xA;humans to use to communicate value, just like how data is used to communicate&#xA;information. If you believe humans should be free to communicate privately with&#xA;whomever they wish to, for any reason whatsoever, be it illegal or legal&#xA;(remember again, you can&amp;rsquo;t be selective, either everyone has encrypted p2p&#xA;private communication or no one does), then why curb money? This goes with FOSS&#xA;as well, you should be free to use any software out there for whatever you want&#xA;&amp;ndash; only you will be liable for how you use it; the software itself doesn&amp;rsquo;t care&#xA;and need not know what you are using it for. One could sell illicit goods using&#xA;magento and tor - none of those two pieces of software care about it, they are&#xA;neutral to the use case. If you believe the government has no business looking&#xA;into our chats then I fail to understand why most people here don&amp;rsquo;t mind the&#xA;government having a tab on our financial activities. Richard Stallman himself&#xA;doesn&amp;rsquo;t use a credit card nor does he have a bank account (might have one for&#xA;official use, cause he has no option), he likes cash, cause it&amp;rsquo;s private. Also,&#xA;I am not a fan of today&amp;rsquo;s &amp;ldquo;crypto&amp;rdquo;, &amp;ldquo;web3&amp;rdquo; ecosystem either, most of it is just&#xA;ponzi and get rich quick schemes. Don&amp;rsquo;t bash me for &amp;ldquo;supporting&amp;rdquo; it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>AWS S3 access policy nuances</title>
      <link>https://prithu.dev/notes/aws-s3-access-policy-nuances/</link>
      <pubDate>Sat, 09 Jul 2022 19:17:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/aws-s3-access-policy-nuances/</guid>
      <description>&lt;p&gt;If you want to give access to everything in the bucket (objects) make sure the&#xA;resource arn for the s3 bucket must also have a &lt;code&gt;/*&lt;/code&gt; indicating all objects in the bucket&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;#34;Resource&amp;#34;: [&#xA;  &amp;#34;arn:aws:s3:::BUCKET-NAME&amp;#34;,&#xA;]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This one won&amp;rsquo;t give access to objects in the bucket, the following one will.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;#34;Resource&amp;#34;: [&#xA;  &amp;#34;arn:aws:s3:::BUCKET-NAME&amp;#34;,&#xA;  &amp;#34;arn:aws:s3:::BUCKET-NAME/*&amp;#34;&#xA;]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;There is a difference between these two resources. One is the bucket&#xA;itself (&lt;code&gt;arn:aws:s3:::BUCKET-NAME&lt;/code&gt;) and tthe other refers to the objects in&#xA;the bucket &lt;code&gt;arn:aws:s3:::BUCKET-NAME/*&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>AWS Resource policies</title>
      <link>https://prithu.dev/notes/aws-resource-policies/</link>
      <pubDate>Sat, 09 Jul 2022 15:20:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/aws-resource-policies/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;There are two ways to manage access of a bucket - user policies or resources&#xA;policies. Access policies that you attach to your resources (buckets and&#xA;objects) are referred to as resource-based policies. You can also attach&#xA;polcies to your users in your account, called user policies.&lt;/li&gt;&#xA;&lt;li&gt;Resources policies are attached to the resource (in s3 for eg. buckets or&#xA;even objects). Resource policy dictates who is allowed to access the resource&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;principals&#34;&gt;Principals&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;Principal&lt;/code&gt; element is used in resource-based policies. The Principal element&#xA;specifies the user, account, service, or other entity that is allowed or denied&#xA;access to a resource.&lt;/p&gt;</description>
    </item>
    <item>
      <title>EKS vs ECS vs Fargate</title>
      <link>https://prithu.dev/notes/eks-vs-ecs-vs-fargate/</link>
      <pubDate>Tue, 07 Jun 2022 22:02:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/eks-vs-ecs-vs-fargate/</guid>
      <description>&lt;p&gt;tldr; ECS is just AWS&amp;rsquo;s proprietary orchestration solution. EKS is their kubernetes&#xA;service - you don&amp;rsquo;t have to manage the kubernetes control plane (don&amp;rsquo;t have&#xA;access to master node, but you do get the kubernetes API). Fargate can be used&#xA;with ECS or EKS and basically abstracts away the compute nodes on which&#xA;containers run.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://cast.ai/blog/aws-eks-vs-ecs-vs-fargate-where-to-manage-your-kubernetes&#34;&gt;https://cast.ai/blog/aws-eks-vs-ecs-vs-fargate-where-to-manage-your-kubernetes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://aws.amazon.com/blogs/containers/the-role-of-aws-fargate-in-the-container-world&#34;&gt;https://aws.amazon.com/blogs/containers/the-role-of-aws-fargate-in-the-container-world&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>using xxd to create binary data</title>
      <link>https://prithu.dev/notes/using-xxd-to-create-binary-data/</link>
      <pubDate>Tue, 03 May 2022 15:11:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/using-xxd-to-create-binary-data/</guid>
      <description>&lt;p&gt;&lt;code&gt;xxd&lt;/code&gt; is a great tool. I have seen it be use in so many places. For some weird&#xA;reason though it seems to come packaged with &lt;code&gt;vim&lt;/code&gt;?. Don&amp;rsquo;t know about other&#xA;distros, but that&amp;rsquo;s the case with Arch. Seems like &lt;code&gt;xxd&lt;/code&gt; was created by Bram&#xA;and is a part of vim source code. Haven&amp;rsquo;t looked into it further, but that&amp;rsquo;s&#xA;what I concluded.&lt;/p&gt;&#xA;&lt;p&gt;Anyways here&amp;rsquo;s a small example:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -en &lt;span class=&#34;s2&#34;&gt;&amp;#34;89504e470d0a1a0a0000000d4948445200000001000000010100000000376ef9240000000a4944415478016360000000020001737501180000000049454e44ae426082&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; xxd -r -p&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;-r&lt;/code&gt; does the reverse of what xxd is meant to normally do, i.e&#xA;print hexdump of a binary data. The &lt;code&gt;-p&lt;/code&gt; just tells it to treat the input as&#xA;&amp;lsquo;plain hexdump&amp;rsquo; (which is a single line of hex digits without any other&#xA;formatting)&lt;/p&gt;</description>
    </item>
    <item>
      <title>playwright is really good for browser automation</title>
      <link>https://prithu.dev/notes/playwright-is-really-good-for-browser-automation/</link>
      <pubDate>Sun, 01 May 2022 01:31:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/playwright-is-really-good-for-browser-automation/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://playwright.dev/docs/intro&#34;&gt;playwright&lt;/a&gt; is really good for browser&#xA;automation. It is a re-write of puppeteer, I believe, and is maintained by the&#xA;same devs and has tons of improvements, maybe because it was&#xA;supported/sponsored by microsoft.&lt;/p&gt;&#xA;&lt;p&gt;It also has a wonderful feature of automatically recording your actions and&#xA;converting them to a script. Running this would open a browser window and you&#xA;can then record your actions.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;npx playwright codegen https://netbanking.hdfcbank.com/netbanking/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>TIL: literal ipv6 in URLs</title>
      <link>https://prithu.dev/notes/literal-ipv6-in-urls/</link>
      <pubDate>Thu, 28 Apr 2022 01:14:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/literal-ipv6-in-urls/</guid>
      <description>&lt;p&gt;TIL from &lt;a href=&#34;https://www.ietf.org/rfc/rfc2732.txt&#34;&gt;RFC2732&lt;/a&gt; that the way you&#xA;access an ipv6 address in a browser is by enclosing it in square brackets&#xA;&lt;code&gt;http://[2401:4900:f00b:dead:2f2d:48ac:9fdb:b7ff]:8080/path/file.txt&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>setting up cgit with nginx</title>
      <link>https://prithu.dev/notes/setting-up-cgit-with-nginx/</link>
      <pubDate>Thu, 28 Apr 2022 00:27:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/setting-up-cgit-with-nginx/</guid>
      <description>&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nginx&#34; data-lang=&#34;nginx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;server&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kn&#34;&gt;server_name&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;git.prithu.dev&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kn&#34;&gt;listen&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;80&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kn&#34;&gt;access_log&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;/var/log/nginx/git.prithu.dev/access.log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kn&#34;&gt;error_log&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;/var/log/nginx/git.prithu.dev/error.log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;#auth_basic &amp;#34;Git Login&amp;#34;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;c1&#34;&gt;#auth_basic_user_file &amp;#34;/srv/git/.htpasswd&amp;#34;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kn&#34;&gt;location&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;/static&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kn&#34;&gt;alias&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;/var/www/cgit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kn&#34;&gt;try_files&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$uri&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;404&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kn&#34;&gt;location&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kn&#34;&gt;fastcgi_pass&lt;/span&gt;  &lt;span class=&#34;s&#34;&gt;unix:/run/fcgiwrap.socket&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kn&#34;&gt;fastcgi_param&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;SCRIPT_FILENAME&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;/usr/lib/cgit/cgit.cgi&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kn&#34;&gt;fastcgi_param&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;PATH_INFO&lt;/span&gt;       &lt;span class=&#34;nv&#34;&gt;$uri&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kn&#34;&gt;fastcgi_param&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;QUERY_STRING&lt;/span&gt;    &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kn&#34;&gt;listen&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;443&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;ssl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# managed by Certbot&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;kn&#34;&gt;ssl_certificate&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;/etc/letsencrypt/live/git.prithu.dev/fullchain.pem&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# managed by Certbot&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;kn&#34;&gt;ssl_certificate_key&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;/etc/letsencrypt/live/git.prithu.dev/privkey.pem&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# managed by Certbot&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;kn&#34;&gt;include&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;/etc/letsencrypt/options-ssl-nginx.conf&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# managed by Certbot&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;kn&#34;&gt;ssl_dhparam&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;/etc/letsencrypt/ssl-dhparams.pem&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# managed by Certbot&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>resources to learn about aws vpc</title>
      <link>https://prithu.dev/notes/resources-to-learn-about-aws-vpc/</link>
      <pubDate>Wed, 27 Apr 2022 20:25:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/resources-to-learn-about-aws-vpc/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Videos&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=8toveAOL5eA&#34;&gt;Exploring the Fundamentals of AWS Networking (SVC211)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=hiKPPy584Mg&#34;&gt;AWS Networking Fundamentals&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=rg2BTWVCQlY&#34;&gt;Working with AWS Networking and Amazon VPC&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>nginx reverse proxy and url rewrite</title>
      <link>https://prithu.dev/notes/nginx-reverse-proxy-and-url-rewrite/</link>
      <pubDate>Tue, 26 Apr 2022 21:21:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/nginx-reverse-proxy-and-url-rewrite/</guid>
      <description>&lt;p&gt;Was just setting up &lt;a href=&#34;https://github.com/go-shiori/shiori&#34;&gt;shiori&lt;/a&gt; behind nginx and I wanted it such that&#xA;&lt;a href=&#34;https://prithu.dev/shiori&#34;&gt;https://prithu.dev/shiori&lt;/a&gt; passess the request to port 8001. I have been in this&#xA;situation before as well where a path needs to be sent to a another host or application server.&lt;/p&gt;&#xA;&lt;p&gt;Just doing the following wont work:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nginx&#34; data-lang=&#34;nginx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;location&lt;/span&gt;  &lt;span class=&#34;s&#34;&gt;/app&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kn&#34;&gt;proxy_pass&lt;/span&gt;         &lt;span class=&#34;s&#34;&gt;http://localhost:8001&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kn&#34;&gt;proxy_set_header&lt;/span&gt;   &lt;span class=&#34;s&#34;&gt;Host&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$host&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;nginx forwards the client request (&lt;code&gt;http://root.com/app&lt;/code&gt;) to our app server&#xA;(assuming running locally) as &lt;code&gt;http://localhost:8001/app&lt;/code&gt;, but there is no&#xA;route defined as &lt;code&gt;/app&lt;/code&gt;. Our app expects a request to be sent to &lt;code&gt;/&lt;/code&gt;. And this&#xA;app might just be an api. So the client making a request like&#xA;&lt;code&gt;http://root.com/app/users&lt;/code&gt; would be recieved by the app server as&#xA;&lt;code&gt;http://127.0.0.1/app/users&lt;/code&gt; instead of &lt;code&gt;http://127.0.0.1/users&lt;/code&gt;. There are two&#xA;ways to solve this, though both of the methods are not exactly equivalent, and&#xA;other use cases and situations might warrant the use of either of them:&lt;/p&gt;</description>
    </item>
    <item>
      <title>keeping it simple dense and precise</title>
      <link>https://prithu.dev/notes/keeping-it-simple-dense-and-precise/</link>
      <pubDate>Mon, 25 Apr 2022 23:08:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/keeping-it-simple-dense-and-precise/</guid>
      <description>&lt;p&gt;I am going to try to keep this as dense and precise as possible and only store&#xA;&amp;ldquo;usefull&amp;rdquo; knowledge. I am going keep this for things like &amp;ldquo;how was I supposed&#xA;to run a webdav server using rclone again&amp;rdquo;; well maybe not that, because that&amp;rsquo;s&#xA;just a one line and belongs in the snippets.md file. But more like &amp;ldquo;how do I&#xA;setup weechat on android using an ssh tunnel and a weechat relay?&amp;rdquo;. I can&#xA;imagine forgetting that. Or perhaps some sort of small tutorial or something?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using server-side git hooks to auto publish blog posts</title>
      <link>https://prithu.dev/posts/git-remote-hooks/</link>
      <pubDate>Wed, 28 Oct 2020 00:20:37 +0530</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/posts/git-remote-hooks/</guid>
      <description>&lt;p&gt;Git hooks are great to automate your software development workflow. They can be&#xA;used to implement CI/CD workflows. Many PaaS services like&#xA;&lt;a href=&#34;https://netlify.com&#34;&gt;Netlify&lt;/a&gt; and &lt;a href=&#34;https://heroku.com&#34;&gt;Heroku&lt;/a&gt; trigger a build&#xA;process of your app or website when you push to a remote repository. In this&#xA;post I want to go through how one could implement that automated process using&#xA;git hooks for a static blog using just a bash script with nginx serving the&#xA;files on a VPS.&lt;/p&gt;</description>
    </item>
    <item>
      <title>python one-liners using list composoition</title>
      <link>https://prithu.dev/notes/python-one-liners-using-list-composoition/</link>
      <pubDate>Wed, 13 May 2020 11:34:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/python-one-liners-using-list-composoition/</guid>
      <description>&lt;p&gt;TIL that there are really good ways of writing one-liners in python. I knew&#xA;they existed but today I took a closer look at them. Most of the iterations can&#xA;be done using list composition. You don&amp;rsquo;t even have to be composing a list,&#xA;you could be just executing a normal function call like in the example below&#xA;uses &amp;ldquo;print&amp;rdquo;&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;curl -s https://www.imdb.com/list/ls020046354/export  |\&#xA;    python -c &amp;#39;import csv,sys;[print (a[&amp;#34;Genres&amp;#34;]) for a in csv.DictReader(sys.stdin)]&amp;#39;&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>reversing a firmware of security camera and squashfs</title>
      <link>https://prithu.dev/notes/reversing-a-firmware-of-security-camera-and-squashfs/</link>
      <pubDate>Thu, 30 Apr 2020 21:50:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/reversing-a-firmware-of-security-camera-and-squashfs/</guid>
      <description>&lt;p&gt;I saw a &lt;a href=&#34;https://youtu.be/hV8W4o-Mu2o&#34;&gt;cool video&lt;/a&gt; by ghidra ninja on yt that went over firmware reversing&#xA;for an a small security camera. He got the firmware from the site of the&#xA;manufacturer and went over binwalk and showed how there&amp;rsquo;s a linux&#xA;filesystem on it in squashfs form. This was really amusing — the&#xA;fact that there is a whole file system in a single binary. He then goes on&#xA;to to see a rc script that runs on the device (this is after separating the&#xA;filesystem and unsquashing it) and edits that code to include a reverse&#xA;shell using nc. Some version of nc do not have the &lt;code&gt;-e&lt;/code&gt; flag though and there&amp;rsquo;s a&#xA;workaround for that in the man page of nc itself. I find that kind of&#xA;ironic.&lt;/p&gt;</description>
    </item>
    <item>
      <title>dependency chain attack on magneto</title>
      <link>https://prithu.dev/notes/dependency-chain-attack-on-magneto/</link>
      <pubDate>Tue, 28 Apr 2020 14:35:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/dependency-chain-attack-on-magneto/</guid>
      <description>&lt;p&gt;There are hardware skimmers that collect card data when swiped but there can&#xA;also be code written that can skim cards in an online checkout screen using&#xA;code injection techniques. There was this incident where a group of hackers got&#xA;access to a Magneto site and they modified a js library used in the checkout&#xA;page and added a skimming code that would capture the card data entered in the&#xA;forms of the page and send it to their servers.&lt;/p&gt;</description>
    </item>
    <item>
      <title>physical pen testers</title>
      <link>https://prithu.dev/notes/physical-pen-testers/</link>
      <pubDate>Mon, 06 Apr 2020 19:46:00 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/notes/physical-pen-testers/</guid>
      <description>&lt;p&gt;I was listening to an episode of darknet diaries and learnt that there is this&#xA;profession called a &amp;ldquo;physical penetration tester&amp;rdquo; where basically a person&#xA;works for a institution who wants to test the security of their physical infrastructure&#xA;(buildings). A client could be a bank or some other financial firm.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://darknetdiaries.com/episode/59&#34;&gt;episode&lt;/a&gt; interviews two such people that worked for the security firm&#xA;coalfire. They tell a story of when they were hired by the Iowa state to pen&#xA;test their courthouses. And then later while they were on their job doing the&#xA;pen testing on the building they get arrested and are prosecuted with felony&#xA;charges. This gets out of hand as there is a lot of misunderstanding between&#xA;officials, the judges, the sheriff who arrested them during the night. This goes&#xA;to show that you are just not safe no matter what you are doing. Although they&#xA;were bailed out by their company, coalfire, they will have to live the lasting&#xA;consequences of the whole ordeal. Every time they get background checked, or&#xA;every time an officer pulls them over or when they apply for a job, there will&#xA;always be the stamp of &amp;ldquo;Oh this guy was once charged for burglary&amp;rdquo;, even though&#xA;those men were doing their job that night.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The beauty of Unix pipelines</title>
      <link>https://prithu.dev/posts/unix-pipeline/</link>
      <pubDate>Sun, 02 Feb 2020 17:45:30 +0530</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/posts/unix-pipeline/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;View discussion on &lt;a href=&#34;https://news.ycombinator.com/item?id=23420786&#34;&gt;Hacker News&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The Unix philosophy lays emphasis on building software that is simple and&#xA;extensible. Each piece of software must do one thing and do it well. And that&#xA;software should be able to work with other programs through a common interface&#xA;&amp;ndash; a text stream. This is one of the core philosophies of Unix which makes it&#xA;so powerful and intuitive to use.&lt;/p&gt;&#xA;&lt;p&gt;This is an excerpt from &lt;a href=&#34;https://en.wikipedia.org/wiki/The_UNIX_Programming_Environment&#34;&gt;The Unix Programming&#xA;Envirnonment&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>The joys of using configurable programs like vim and i3</title>
      <link>https://prithu.dev/posts/joys-of-configurable-programs/</link>
      <pubDate>Mon, 02 Dec 2019 14:15:30 +0530</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/posts/joys-of-configurable-programs/</guid>
      <description>&lt;p&gt;I see configurable software like vim and i3 really good tools to work with. I&#xA;strongly believe you should have control over how something works in your&#xA;toolset. Tools like vim and i3 allow for users to customize their workings in&#xA;order fit their needs - this is what makes them so powerful and a joy to use.&#xA;There are many instances where one feels the need to tweak their tools so that&#xA;they could do things which would make their lives a little more easier. Most of&#xA;the times these are small ad-hoc tweaks and this is where programs like vim and&#xA;i3 shine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using jq to display cricket scores on i3bar</title>
      <link>https://prithu.dev/posts/jq/</link>
      <pubDate>Sun, 07 Apr 2019 13:19:12 +0000</pubDate><author>prithu@prithu.dev (Prithu Goswami)</author>
      <guid>https://prithu.dev/posts/jq/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://prithu.dev/posts/jq/screen.png&#34; width=&#34;100%&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;h4&gt;i3bar screenshot&lt;/h4&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;It&amp;rsquo;s the IPL season and I thought why not keep a track of the score of the&#xA;matches that are in progress. I have two tests tomorrow and I don&amp;rsquo;t want to be&#xA;wasting time looking at the scores every now and then; instead let&amp;rsquo;s spend some&#xA;&lt;em&gt;more&lt;/em&gt; time looking into an utility that I haven&amp;rsquo;t used before and test and play&#xA;around with it. I don&amp;rsquo;t even like cricket that much.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
