<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Jagan&#39;s blog</title>
    <link>https://jagan.be/blog/</link>
    <description>Recent content on Jagan&#39;s blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</managingEditor>
    <webMaster>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</webMaster>
    <lastBuildDate>Tue, 02 Feb 2021 21:08:10 +0100</lastBuildDate>
    
	<atom:link href="https://jagan.be/blog/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Return True Only When One of the Three Inputs Is True</title>
      <link>https://jagan.be/blog/post/shorts/Return-true-only-when-one-of-the-three-inputs-are-true/</link>
      <pubDate>Tue, 02 Feb 2021 21:08:10 +0100</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/Return-true-only-when-one-of-the-three-inputs-are-true/</guid>
      <description>&lt;p&gt;At the &lt;code&gt;$DAYJOB&lt;/code&gt; I was trying to figure out how to have a contract for a function that ensures that only one of the three conditionals needed is true.
Given that I had come from an electrical engineering background, my first thought was to write a boolean expression.
One goes about this by first constructing a truth table and either forming an expressing with a &amp;ldquo;Sum of Products&amp;rdquo; (SOP) or a &amp;ldquo;Product of Sums&amp;rdquo; expression from the table.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;A&lt;/th&gt;
&lt;th&gt;B&lt;/th&gt;
&lt;th&gt;C&lt;/th&gt;
&lt;th&gt;F&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;SOP expression seems to look like the appropriate option here and you get,
$$
F = A\bar{B}\bar{C} + \bar{A}B\bar{C} + \bar{A}\bar{B}C
$$&lt;/p&gt;
&lt;p&gt;I thought that writing it in C++ will look weird given the long descriptive variable names I had and it didn&amp;rsquo;t convey the intention of the assert right away.
On Stack Overflow, I found a more C++ solution to the problem that looked a bit easier to justify which suggested just summing up the conditionals after casting them.
After converting them to something nicer with &lt;code&gt;static_cast&lt;/code&gt;, I thought this was acceptable.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-c++&#34; data-lang=&#34;c++&#34;&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;bool&lt;/span&gt; only_one_has_changed = (&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;static_cast&lt;/span&gt;&amp;lt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;int&lt;/span&gt;&amp;gt;(the_first_conditional) +
                                   &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;static_cast&lt;/span&gt;&amp;lt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;int&lt;/span&gt;&amp;gt;(the_second_conditional) +
                                   &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;static_cast&lt;/span&gt;&amp;lt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;int&lt;/span&gt;&amp;gt;(the_third_conditional) == &lt;span style=&#34;color:#3677a9&#34;&gt;1&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the end after writing this post, I am not sure if the code solution is any better than just translating the SOP expression into a C++ statement.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Small Python Snipet to Export Firefox Bookmarks To Markdown</title>
      <link>https://jagan.be/blog/post/shorts/Small-snipet-to-export-Firefox-bookmarks.json-to-markdown/</link>
      <pubDate>Tue, 29 Dec 2020 21:57:18 +0100</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/Small-snipet-to-export-Firefox-bookmarks.json-to-markdown/</guid>
      <description>&lt;p&gt;Firefox allows you to backup your bookmarks to a JSON file.
I wanted to quickly export it to markdown rather than the HTML offered by Firefox itself.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;import&lt;/span&gt; &lt;span style=&#34;color:#447fcf;text-decoration:underline&#34;&gt;json&lt;/span&gt;
bdict = json.load(&lt;span style=&#34;color:#24909d&#34;&gt;open&lt;/span&gt;(&lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;bookmarks-2020-12-29.json&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;r&amp;#39;&lt;/span&gt;))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#447fcf&#34;&gt;parse_firefox_bookmark&lt;/span&gt;(bdict, header=&lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;):
    &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;children&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;not&lt;/span&gt; &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;in&lt;/span&gt; bdict.keys():
        &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;try&lt;/span&gt;:
            &lt;span style=&#34;color:#999;font-style:italic&#34;&gt;# There are some nodes with no uri and string comparisons slows&lt;/span&gt;
            &lt;span style=&#34;color:#999;font-style:italic&#34;&gt;# the program so just ignore the exceptions.&lt;/span&gt;
            &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;print&lt;/span&gt;(&lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;[&amp;#39;&lt;/span&gt; + bdict[&lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;title&amp;#39;&lt;/span&gt;] + &lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;]&amp;#39;&lt;/span&gt; + &lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;(&amp;#39;&lt;/span&gt; + bdict[&lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;uri&amp;#39;&lt;/span&gt;] + &lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;)&amp;#39;&lt;/span&gt;) 
        &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;except&lt;/span&gt;:
            &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;pass&lt;/span&gt;
        &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;return&lt;/span&gt;
    &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;print&lt;/span&gt;(header, bdict[&lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;title&amp;#39;&lt;/span&gt;])
    &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;for&lt;/span&gt; children &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;in&lt;/span&gt; bdict[&lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;children&amp;#39;&lt;/span&gt;]:
        parse_firefox_bookmark(children, header+&lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;#&amp;#39;&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;parse_firefox_bookmark(bdict)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Sample output.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt; 
&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;# Bookmarks Menu
&lt;/span&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#fff;text-decoration:underline&#34;&gt;## Mozilla Firefox
&lt;/span&gt;&lt;span style=&#34;color:#fff;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;*&lt;/span&gt; [&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;Help and Tutorials&lt;/span&gt;](&lt;span style=&#34;color:#bbb&#34;&gt;http://www.mozilla.com/en-US/firefox/help/&lt;/span&gt;)
&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;*&lt;/span&gt; [&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;Customize Firefox&lt;/span&gt;](&lt;span style=&#34;color:#bbb&#34;&gt;http://www.mozilla.com/en-US/firefox/customize/&lt;/span&gt;)
&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;*&lt;/span&gt; [&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;Get Involved&lt;/span&gt;](&lt;span style=&#34;color:#bbb&#34;&gt;http://www.mozilla.com/en-US/firefox/community/&lt;/span&gt;)
&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;*&lt;/span&gt; [&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;About Us&lt;/span&gt;](&lt;span style=&#34;color:#bbb&#34;&gt;http://www.mozilla.com/en-US/about/&lt;/span&gt;)
&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;*&lt;/span&gt; [&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;About Us&lt;/span&gt;](&lt;span style=&#34;color:#bbb&#34;&gt;https://www.mozilla.org/en-US/about/&lt;/span&gt;)
&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;*&lt;/span&gt; [&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;Customize Firefox&lt;/span&gt;](&lt;span style=&#34;color:#bbb&#34;&gt;https://www.mozilla.org/en-US/firefox/customize/&lt;/span&gt;)
&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;*&lt;/span&gt; [&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;Help and Tutorials&lt;/span&gt;](&lt;span style=&#34;color:#bbb&#34;&gt;https://www.mozilla.org/en-US/firefox/help/&lt;/span&gt;)
&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;*&lt;/span&gt; [&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;Get Involved&lt;/span&gt;](&lt;span style=&#34;color:#bbb&#34;&gt;https://www.mozilla.org/en-US/contribute/&lt;/span&gt;)
&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;*&lt;/span&gt; [&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;Help and Tutorials&lt;/span&gt;](&lt;span style=&#34;color:#bbb&#34;&gt;https://support.mozilla.org/en-US/products/firefox&lt;/span&gt;)
&lt;span style=&#34;color:#fff;text-decoration:underline&#34;&gt;## Software
&lt;/span&gt;&lt;span style=&#34;color:#fff;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;*&lt;/span&gt; [&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;The Last Statusline For Vim • kade killary&lt;/span&gt;](&lt;span style=&#34;color:#bbb&#34;&gt;https://kadekillary.work/post/statusline/&lt;/span&gt;)
&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;*&lt;/span&gt; [&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;vimperator cheat sheet&lt;/span&gt;](&lt;span style=&#34;color:#bbb&#34;&gt;http://sheet.shiar.nl/vimperator:&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Reading List</title>
      <link>https://jagan.be/blog/books/</link>
      <pubDate>Tue, 23 Jun 2020 20:17:33 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/books/</guid>
      <description>&lt;p&gt;I see that it is common to have a reading list.
This gives people recommendations of what to read under your own website.
I should thank &lt;a href=&#34;https://mjbraganza.com/books-ive-read/&#34;&gt;Jason&lt;/a&gt; and the &lt;a href=&#34;https://monday.micro.blog/2019/06/24/episode-greg-mcverry.html&#34;&gt;micro.blog&lt;/a&gt; podcast where &lt;a href=&#34;https://micro.blog/jgmac1106&#34;&gt;Greg McVerry&lt;/a&gt; talks about the IndieWeb which I have been trying to imbibe.
You can see that even at this page where it asks for &lt;a href=&#34;https://indieweb.org/Webmention&#34;&gt;webmentions&lt;/a&gt;.
So my plan is to list the books I&amp;rsquo;ve read and try to do reviews if possible.&lt;/p&gt;
&lt;h1 id=&#34;currently-reading&#34;&gt;Currently Reading&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;All About Love, New Visions by Bell Hooks.&lt;/li&gt;
&lt;li&gt;How to Read a Book by Mortimer J. Adler and Charles Van Doren.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://theateraz.be/onewebmedia/Romeo%20en%20Julia%20Affiche%20definitief.pdf&#34;&gt;Romeo and Julia by Peter Schoenaerts&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Persepolis by Marjane Satrapi.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;read&#34;&gt;Read&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://www.shakthimaan.com/what-to-do.html&#34;&gt;i want 2 do project. tell me wat 2 do&lt;/a&gt; by Shakthi Kannan.&lt;/li&gt;
&lt;li&gt;Learning Optimism by Martin E. P. Seligman.&lt;/li&gt;
&lt;li&gt;Beloved by Toni Morrison.&lt;/li&gt;
&lt;li&gt;Cinderella Liberator by Rebecca Solnit.&lt;/li&gt;
&lt;li&gt;Whose Story Is This? by Rebecca Solnit.&lt;/li&gt;
&lt;li&gt;My life on the road by &lt;a href=&#34;https://www.gloriasteinem.com/about&#34;&gt;Gloria Steinem&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Infectious Greed by Frank Partnoy.
A good summary of events that led up to how companies cooked books in the end of 20th century.
It is amazing that the fraudulent schemes described in the book are still being repeated in various forms.
See the games played by WeWork for example.&lt;/li&gt;
&lt;li&gt;The Women Who Walked Into Doors by Roddy Doyle.&lt;/li&gt;
&lt;li&gt;Emotional Intelligence by Daniel Coleman.&lt;/li&gt;
&lt;li&gt;How To Be a Woman by Caitlin Moran.&lt;/li&gt;
&lt;li&gt;Atomic Habits by James Clear.&lt;/li&gt;
&lt;li&gt;Fast Food Nation by Eric Schlosser.&lt;/li&gt;
&lt;li&gt;The Argonauts by Maggie Nelson.&lt;/li&gt;
&lt;li&gt;The Total Money Makeover by Dave Ramsey.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;shelved&#34;&gt;Shelved&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;The Sigma Protocol by Robert Ludlum. (Gotten bored with the genre for now)&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>TIL Git: Add Untracked File to Index</title>
      <link>https://jagan.be/blog/post/shorts/TIL-Use-git-to-add-untracked-file-to-index/</link>
      <pubDate>Wed, 14 Aug 2019 16:10:24 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/TIL-Use-git-to-add-untracked-file-to-index/</guid>
      <description>&lt;p&gt;Recently I was browsing through &lt;code&gt;git add&lt;/code&gt;&amp;rsquo;s manual to find out how to split hunks and stage them.
I found that there is an option called &lt;code&gt;--intent-to-add&lt;/code&gt; which is pretty useful.
Like it says, one can use it to add an untracked file to git&amp;rsquo;s index but not stage the file.&lt;/p&gt;
&lt;h1 id=&#34;why-is-it-useful&#34;&gt;Why is it useful?&lt;/h1&gt;
&lt;p&gt;An untracked file doesn&amp;rsquo;t show up in diffs and cannot be staged by hunks since nothing is in the index yet.
So by adding it to the index, we just track it and can stage when ready.&lt;/p&gt;
&lt;h1 id=&#34;example&#34;&gt;Example&lt;/h1&gt;
&lt;p&gt;This blog is in a git repo, so lets track the current post.
When the file is not yet tracked, we see&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-git&#34; data-lang=&#34;git&#34;&gt;$ git status
On branch master
Your branch is up to date with &#39;origin/master&#39;.

Untracked files:
  (use &amp;quot;git add &amp;lt;file&amp;gt;...&amp;quot; to include in what will be committed)

        content/post/shorts/TIL Use git to add untracked file to index.md
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now when you add it to the index,&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-git&#34; data-lang=&#34;git&#34;&gt;$ git add --intent-to-add content/post/shorts/TIL\ Use\ git\ to\ add\ untracked\ file\ to\ index.md
$ git status
On branch master
Your branch is up to date with &#39;origin/master&#39;.

Changes not staged for commit:
  (use &amp;quot;git add &amp;lt;file&amp;gt;...&amp;quot; to update what will be committed)
  (use &amp;quot;git checkout -- &amp;lt;file&amp;gt;...&amp;quot; to discard changes in working directory)

        new file:   content/post/shorts/TIL Use git to add untracked file to index.md

no changes added to commit (use &amp;quot;git add&amp;quot; and/or &amp;quot;git commit -a&amp;quot;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;With this you can look at a proper output of &lt;code&gt;git diff&lt;/code&gt;,&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-diff&#34; data-lang=&#34;diff&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;diff --git a/content/post/shorts/TIL Use git to add untracked file to index.md b/content/post/shorts/TIL Use git to add untracked file to index.md
&lt;/span&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;&lt;/span&gt;new file mode 100644
&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;index 0000000..ff5d586
&lt;/span&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#d22323&#34;&gt;--- /dev/null
&lt;/span&gt;&lt;span style=&#34;color:#d22323&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+++ b/content/post/shorts/TIL Use git to add untracked file to index.md 
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#fff;text-decoration:underline&#34;&gt;@@ -0,0 +1,45 @@
&lt;/span&gt;&lt;span style=&#34;color:#fff;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+---
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+title: &amp;#34;TIL Git: Add Untracked File to Index&amp;#34;
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+date: 2019-08-14T16:10:24+02:00
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+tags:
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+  - git
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+categories:
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+  - dgplug
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+---
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+Recently I was browsing through `git add`&amp;#39;s manual to find out how to split hunks and stage them.
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+I found that there is an option called `--intent-to-add` which is pretty useful.
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+Like it says, one can use it to add an untracked file to git&amp;#39;s index but not stage the file.
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+# Why is it useful?
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+An untracked file doesn&amp;#39;t show up in diffs and cannot be staged by hunks since nothing is in the index yet.
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+So by adding it to the index, we just track it and can stage when ready.
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+# Example
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+This blog is in a git repo, so lets track the current post.
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+When the file is not yet tracked, we see
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+```git
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+$ git status
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+On branch master
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+Your branch is up to date with &amp;#39;origin/master&amp;#39;.
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+Untracked files:
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+  (use &amp;#34;git add &amp;lt;file&amp;gt;...&amp;#34; to include in what will be committed)
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+        content/post/shorts/TIL Use git to add untracked file to index.md
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+```
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+Now to when you add it to the index,
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+```git
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+$ git add --intent-to-add content/post/shorts/TIL\ Use\ git\ to\ add\ untracked\ file\ to\ index.md
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+$ git status
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+On branch master
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+Your branch is up to date with &amp;#39;origin/master&amp;#39;.
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+Changes not staged for commit:
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+  (use &amp;#34;git add &amp;lt;file&amp;gt;...&amp;#34; to update what will be committed)
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+  (use &amp;#34;git checkout -- &amp;lt;file&amp;gt;...&amp;#34; to discard changes in working directory)
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+        new file:   content/post/shorts/TIL Use git to add untracked file to index.md
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+no changes added to commit (use &amp;#34;git add&amp;#34; and/or &amp;#34;git commit -a&amp;#34;)
&lt;/span&gt;&lt;span style=&#34;color:#589819&#34;&gt;+```
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I guess this has gone enough meta so lets wrap it up.
Enjoy and explore git, you will always find something new :)&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Using DNSOverTLS With Unbound</title>
      <link>https://jagan.be/blog/post/shorts/Using-DNSOverTLS-with-Unbound/</link>
      <pubDate>Wed, 10 Jul 2019 11:18:06 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/Using-DNSOverTLS-with-Unbound/</guid>
      <description>&lt;p&gt;Firstly, DNS is how web addresses are looked up to find their location in terms of IP addresses.
So it is actually surprising that this lookup has always been unencrypted.
The issue has become mainstream of sorts when UK&amp;rsquo;s Internet Service Provider&amp;rsquo;s Association nominated Firefox as an &lt;a href=&#34;https://techcrunch.com/2019/07/05/isp-group-mozilla-internet-villain-dns-privacy/&#34;&gt;internet villain&lt;/a&gt; for enabling DNSOverHTTPS (DoH).
This allowed people to bypass DNS based blocking performed by ISPs which further cemented the idea that one needs encrypted DNS to avoid being censored or worse &lt;a href=&#34;https://en.wikipedia.org/wiki/Man-in-the-middle_attack&#34;&gt;MITMed&lt;/a&gt; by an authoritarian government by using domain level blocking.
I prefer DoT over the DoH protocol simply because of latency issues caused by dependency on TCP for the latter.
DoT works similar to regular DNS over UDP but under a different port.
One reason for vendors to prefer DoH, is due to over eager firewalls blocking all ports except 80 and 443, used by HTTP and HTTPS by default.
In this post, I want to show you how easy it is to get a secure and private DNS at the OS level, so you can do what Firefox does, but for all applications.
Okay, lets get to the crux of the article!&lt;/p&gt;
&lt;h1 id=&#34;install-and-configure-unbound&#34;&gt;Install and configure unbound&lt;/h1&gt;
&lt;p&gt;Unbound is usually available in the repositories of operating systems, Linux and BSD.
Install it using your favourite package manager and we can begin!&lt;/p&gt;
&lt;p&gt;The next step is to configure unbound to use root servers to resolve DNS recursively.
This is useful to first get acquainted with unbound and also to rule out issues if DoT fails to work.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;# /etc/unbound/unbound.conf&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;server&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;verbosity&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#3677a9&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;use-syslog&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;yes&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;# outputs to systemd journal in our case&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;do-daemonize&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;no&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;# handled by systemd&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;username&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#34;unbound&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;# use separate user for security&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;directory&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#34;/etc/unbound&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;auto-trust-anchor-file&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;trusted-key.key&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;# Auto-update the trust anchors, used for DNSSEC&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;root-hints&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;root.hints&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;# download root.hints from https://www.internic.net/domain/named.cache&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It is important we take care of directory permissions so unbound can read and write to it.
You may have to manually change ownership of &lt;code&gt;/etc/unbound&lt;/code&gt; using &lt;code&gt;chown&lt;/code&gt;.
Before starting the service, make sure to change &lt;code&gt;/etc/resolv.conf&lt;/code&gt; to use the local nameserver run by unbound.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-conf&#34; data-lang=&#34;conf&#34;&gt;# /etc/resolv.conf
nameserver 127.0.0.1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This step also requires some care if your distribution is handling DNS using &lt;code&gt;NetworkManager&lt;/code&gt;, &lt;code&gt;systemd-resolved&lt;/code&gt; or &lt;code&gt;openresolvconf&lt;/code&gt;.
For &lt;code&gt;NetworkManager&lt;/code&gt;, refer to configuration related to DNS in the &lt;a href=&#34;https://developer.gnome.org/NetworkManager/stable/NetworkManager.conf.html&#34;&gt;“main section”&lt;/a&gt;.
In the case of &lt;code&gt;systemd-resolved&lt;/code&gt;, I would suggest you to just disable and import any local network related settings into unbound.
In &lt;code&gt;openresolvconf&lt;/code&gt;, we can use it with unbound as a &lt;a href=&#34;https://jlk.fjfi.cvut.cz/arch/manpages/man/core/openresolv/resolvconf.conf.5.en#SUBSCRIBER_OPTIONS&#34;&gt;subscriber&lt;/a&gt;.
After this is done, start the unbound service and check the logs for errors if any.
You can use &lt;code&gt;drill&lt;/code&gt; or &lt;code&gt;dig&lt;/code&gt; to do DNS testing from the terminal. For example,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; drill lobste.rs
;; -&amp;gt;&amp;gt;HEADER&amp;lt;&amp;lt;- opcode: QUERY, rcode: NOERROR, id: 42947
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; lobste.rs.   IN      A

;; ANSWER SECTION:
lobste.rs.      3600    IN      A       71.19.148.33

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 400 msec
;; SERVER: 127.0.0.1
;; WHEN: Wed Jul 10 11:52:06 2019
;; MSG SIZE  rcvd: 43
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Check &lt;code&gt;rcode&lt;/code&gt; and &lt;code&gt;SERVER&lt;/code&gt; in the output to confirm your configuration.&lt;/p&gt;
&lt;h1 id=&#34;dot-configuration&#34;&gt;DoT configuration&lt;/h1&gt;
&lt;p&gt;In the previous section unbound recursively resolved the DNS by querying the root servers.
But in most cases we would like to resolve them from a caching server close to us.
In this case we access the server using TLS like so,&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;# DNSOverTLS addition to unbound.conf&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;server&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;tls-cert-bundle&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;/etc/ssl/certs/ca-certificates.crt&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;# needed for verification of TLS&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;forward-zone&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#34;.&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;forward-tls-upstream&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;yes&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;#nic.cz&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;forward-addr&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#3677a9&#34;&gt;193.17.47.1&lt;/span&gt;@&lt;span style=&#34;color:#3677a9&#34;&gt;853&lt;/span&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;#odvr.nic.cz&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;forward-addr&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#3677a9&#34;&gt;185.43.135.1&lt;/span&gt;@&lt;span style=&#34;color:#3677a9&#34;&gt;853&lt;/span&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;#odvr.nic.cz&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;forward-addr&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#3677a9&#34;&gt;2001&lt;/span&gt;:148f:ffff::1@853#odvr.nic.cz&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;forward-addr&lt;/span&gt;:&lt;span style=&#34;color:#666&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#3677a9&#34;&gt;2001&lt;/span&gt;:148f:fffe::1@853#odvr.nic.cz&lt;span style=&#34;color:#666&#34;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As can be seen the format for &lt;code&gt;forward-addr&lt;/code&gt; in the case of DoT involves specifying the IP, port and name.
The name is checked against the host mentioned in the TLS certificate securing our connection.
In this example I am using the host from (cz.nic)[https://www.nic.cz/odvr/], but other alternative exists from Cloudflare, Google and Quad9 to name a few.
As before, check the configuration using &lt;code&gt;drill&lt;/code&gt; after restarting the service.
You can also check the syntax of the configuration file, before restarting, by using &lt;code&gt;unbound-checkconf&lt;/code&gt; to prevent unnecessary round trips.
Hopefully by the end of this post, you have a secure and private DNS setup!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Taking IM Back Using Prosody</title>
      <link>https://jagan.be/blog/post/Taking-IM-back-using-Prosody/</link>
      <pubDate>Sun, 26 May 2019 11:09:30 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/Taking-IM-back-using-Prosody/</guid>
      <description>&lt;p&gt;The common way for most people to chat is using an app on their phone which typically one of &lt;a href=&#34;https://whatsapp.com&#34;&gt;Whatsapp&lt;/a&gt;, &lt;a href=&#34;https://messenger.com&#34;&gt;Messenger&lt;/a&gt; or &lt;a href=&#34;https://telegram.org&#34;&gt;Telegram&lt;/a&gt;.
In the same vein we have apps like &lt;a href=&#34;https://threema.ch&#34;&gt;Threema&lt;/a&gt; and &lt;a href=&#34;https://signal.org&#34;&gt;Signal&lt;/a&gt; which are more popular in certain circles.
But the one consistent feature for all these services, is the centralization of accounts and forcing users to be trapped inside a silo.
It is true whether the services or clients themselves are open source or not.
In the case of Signal, the author doesn&amp;rsquo;t want to federate with people who want to run their own servers&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;.
Given that the Freedom of the Press Foundation recommends Signal as a secure communications tool&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;, I have nothing against the security of the service and the client.
It has audited by cryptographers and the underlying protocol for end-to-end encryption is used by other messaging services.
Given this, you would still want to have control over the service and client for various reasons including not wanting to be dependent on centralized services.&lt;/p&gt;
&lt;h1 id=&#34;xmpp&#34;&gt;XMPP&lt;/h1&gt;
&lt;p&gt;&lt;a href=&#34;https://xmpp.org/&#34;&gt;XMPP&lt;/a&gt; is an open standard for messaging.
Notably &lt;a href=&#34;https://developers.google.com/talk/&#34;&gt;GTalk&lt;/a&gt; and earlier iterations of Messenger supported XMPP and used to federate with other servers.
So, it has a proven track record of actually working at scale but being closed off to grow their own proprietary services and lock users into such platforms.
XMPP is generally extended by XEPs, XMPP Extension Protocols, that include features such as end-to-end encryption, file uploads, avatars etc.
Even the definition of the process XEPs is &lt;a href=&#34;https://xmpp.org/extensions/xep-0001.html&#34;&gt;XEP-0001&lt;/a&gt; :)&lt;/p&gt;
&lt;p&gt;To use XMPP, one can sign up for an account at one of the free services which need to be verified or you can run your own server.&lt;/p&gt;
&lt;h1 id=&#34;prosody&#34;&gt;Prosody&lt;/h1&gt;
&lt;p&gt;&lt;a href=&#34;https://prosody.im&#34;&gt;Prosody&lt;/a&gt; is an XMPP server that implements a lot of XEPs&lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt; and further has community modules which can be used just as easily&lt;sup id=&#34;fnref:4&#34;&gt;&lt;a href=&#34;#fn:4&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;4&lt;/a&gt;&lt;/sup&gt;.
I will be using Debian 9 on the server and the project provides repositories for installing the latest stable release to make installation simple.&lt;/p&gt;
&lt;p&gt;To install start by adding their repository to Debian&amp;rsquo;s sources list,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# /etc/apt/sources.list.d/prosody.list
deb https://packages.prosody.im/debian stretch main
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;add their key&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;wget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and finally install the package using &lt;code&gt;apt&lt;/code&gt;,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt install prosody
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;configuring-prosody&#34;&gt;Configuring Prosody&lt;/h2&gt;
&lt;p&gt;The configuration of Prosody is a single Lua file located in &lt;code&gt;/etc/prosody/prosody.cfg.lua&lt;/code&gt;.
If you are already configuring this on server, the first course of action is to change the domain under which you want to run the server.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;VirtualHost &amp;quot;myxmppserver.im&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Next is to specify the certificate used for SSL,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;https_certificate = &amp;quot;/etc/prosody/certs/myxmppserver.im.crt&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I use &lt;a href=&#34;https://letsencrypt.org/&#34;&gt;Lets Encrypt&lt;/a&gt; to obtain certificates for free and if you already use for the server, it can be linked to the current location.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo prosodyctl --root cert import /etc/letsencrypt/live
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At this point you can start the server using &lt;code&gt;systemctl&lt;/code&gt;,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo systemctl start prosody
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;By default it will log under &lt;code&gt;/var/logs/prosody/&lt;/code&gt;, so be sure to check there in case there are issues.
To test the installation, you need to add an account.
By default, the configuration prevents creating accounts by using clients as a safety feature but if you are planning to run a public server this can changed later.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo prosodyctl adduser test@myxmppserver.im
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Test the account using a Jabber client.
There are many programs but I find the android app &lt;a href=&#34;https://conversations.im&#34;&gt;Conversations&lt;/a&gt;, to be fully featured and a pleasure to use.
If all is well, we can move on to enabling some nice to have features in Prosody.&lt;/p&gt;
&lt;p&gt;In the &lt;code&gt;modules_enabled&lt;/code&gt; table, uncomment &lt;code&gt;mam&lt;/code&gt; and &lt;code&gt;csi_simple&lt;/code&gt;.
&lt;code&gt;mam&lt;/code&gt; allows one to access the archive and this allows Conversations to pull down the history when you were offline.
For using some community modules, it was recommended by &lt;a href=&#34;https://linkmauve.fr&#34;&gt;linkmauve&lt;/a&gt; to have a clone of the modules repository and link the required modules into modules library under prosody.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;hg clone https://hg.prosody.im/prosody-modules/ prosody-modules
sudo ln -s ~/prosody-modules/mod_smacks/mod_smacks.lua /usr/lib/prosody/modules
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can link these modules as required.
To enable them, add the module to the &lt;code&gt;modules_enabled&lt;/code&gt; table and restart the server.
You can check for compliance of your server on &lt;a href=&#34;https://compliance.conversations.im/&#34;&gt;https://compliance.conversations.im/&lt;/a&gt; which can be useful to see if you want to enable other modules according to your requirements.
Please remember to create a separate account to run these tests by using &lt;code&gt;prosodyctl&lt;/code&gt; since you will have to provide passwords to the compliance site.&lt;/p&gt;
&lt;p&gt;In conclusion, one can run their own XMPP server or use a trusted server, for example, &lt;a href=&#34;https://jabberfr.org/&#34;&gt;https://jabberfr.org/&lt;/a&gt; and chat with anyone on XMPP whether on your server or on their own islands.
You can meet me at xmpp:jagan@j605.tk, See ya :)&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id=&#34;fn:1&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://lwn.net/Articles/687294/&#34;&gt;https://lwn.net/Articles/687294/&lt;/a&gt; &lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:2&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://freedom.press/organizations/open-whisper-systems/&#34;&gt;https://freedom.press/organizations/open-whisper-systems/&lt;/a&gt; &lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:3&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://prosody.im/doc/modules&#34;&gt;https://prosody.im/doc/modules&lt;/a&gt; &lt;a href=&#34;#fnref:3&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:4&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://modules.prosody.im/&#34;&gt;https://modules.prosody.im/&lt;/a&gt; &lt;a href=&#34;#fnref:4&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
</description>
    </item>
    
    <item>
      <title>(Neo)vim Macro to Create Numbered Lists</title>
      <link>https://jagan.be/blog/post/shorts/neovim-macro-to-create-numbered-lists/</link>
      <pubDate>Sun, 17 Feb 2019 13:05:22 +0100</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/neovim-macro-to-create-numbered-lists/</guid>
      <description>&lt;p&gt;I usually encounter this when saving notes about list of items that are not numbered but are generally better off being itemized.
Since this is such a common scenario I did find a couple of posts&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; &lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt; that explained the method but they had edge cases which were not handled properly.&lt;/p&gt;
&lt;p&gt;Say you want to note down a shopping list and then decide to number it later,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Soy milk
Carrots
Tomatoes
Pasta
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Start off by numbering the first line and then move the cursor to the second line.
Then, the steps are&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Start recording the macro into a register, say &lt;code&gt;a&lt;/code&gt;, by using &lt;code&gt;qa&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;k&lt;/code&gt; to go one line up.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yW&lt;/code&gt; to copy one big word, in this case “1. ”.&lt;/li&gt;
&lt;li&gt;Then &lt;code&gt;j&lt;/code&gt; to come one line down and &lt;code&gt;|&lt;/code&gt; to go to the start of the line.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;[p&lt;/code&gt; to paste before and &lt;code&gt;|&lt;/code&gt; to go the beginning.&lt;/li&gt;
&lt;li&gt;To increment, &lt;code&gt;Ctrl+A&lt;/code&gt; and then &lt;code&gt;j&lt;/code&gt; and &lt;code&gt;|&lt;/code&gt; to set it up for subsequent runs.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To run the macro, go to the next line and execute &lt;code&gt;@a&lt;/code&gt;.
For repeating it 3 times, you can use &lt;code&gt;3@a&lt;/code&gt;.&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id=&#34;fn:1&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://stackoverflow.com/a/4224521&#34;&gt;https://stackoverflow.com/a/4224521&lt;/a&gt; &lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:2&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://techedemic.com/2013/04/15/using-vim-to-create-a-numbered-list-e-g-list-of-ip-addresses/&#34;&gt;https://techedemic.com/2013/04/15/using-vim-to-create-a-numbered-list-e-g-list-of-ip-addresses/&lt;/a&gt; &lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
</description>
    </item>
    
    <item>
      <title>Ansible 101 by trishnag</title>
      <link>https://jagan.be/blog/post/shorts/Ansible-101-by-trishnag/</link>
      <pubDate>Wed, 06 Feb 2019 20:15:11 +0100</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/Ansible-101-by-trishnag/</guid>
      <description>&lt;p&gt;We had an introductory session on Ansible in #dgplug and these are some notes from the class.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Learned about hosts file to create an inventory, &lt;a href=&#34;https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#hosts-and-groups&#34;&gt;https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#hosts-and-groups&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Different connections (ssh and local for now). I had also tested it against a server running CentOS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We then went on to create an &lt;code&gt;ansible.cfg&lt;/code&gt; file in the demo directory which takes precedence over the global configuration.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Learned to write a basic playbook which is a YAML file.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;/bin/echo using shell module&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ping using the ping module&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
</description>
    </item>
    
    <item>
      <title>Thoughts on Atomic Habits Commentary by Jason Braganza</title>
      <link>https://jagan.be/blog/post/shorts/Thoughts-on-Atomic-Habits-commentary-by-Jason-Braganza/</link>
      <pubDate>Sun, 20 Jan 2019 08:31:52 +0100</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/Thoughts-on-Atomic-Habits-commentary-by-Jason-Braganza/</guid>
      <description>&lt;p&gt;Original post at &lt;a href=&#34;https://mjbraganza.com/atomic-habits/&#34;&gt;https://mjbraganza.com/atomic-habits/&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Schedule and structure make or break the plan. Goals only show the direction of the task. Personally I would say this has brought all change I need.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Answer in the affirmative. You don’t try quitting smoking, you don’t smoke period. Personally I don’t identify as someone who can’t eat butter or meat but as someone who won’t. This confirms my resolve in what I believe to be done.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Environments are inherently associated with specific habits. I go to the department to work to make it possible to just concentrate on the task at hand instead of procrastinating. This has worked really well and it can be further improved but it is much better than being at home.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Jason mentions a more important point that I had realize earlier but failed to follow through. It is to always repeat and practice something even if one is not good at it. We can always improve on the parts of the task that are lacking rather than ditching the whole task.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I have made running more enjoyable by running with an acquittance and making them a friend. It is more interesting to interact with someone you don’t see everyday.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I will just leave the quote here, “Never miss twice. Missing once is an accident. Missing twice is the start of a new habit.”&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I think most of it boils down to building an identity and keep improving it to best serve our needs. For me, it is a matter of compounding the effort put in building up a schedule this month to make it smoother in the coming days. As a nice side effect I am getting 6km of biking done everyday for free :)&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>New Templates in Dolphin</title>
      <link>https://jagan.be/blog/post/shorts/new-templates-in-dolphin/</link>
      <pubDate>Tue, 23 Oct 2018 00:46:40 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/new-templates-in-dolphin/</guid>
      <description>&lt;p&gt;I was using &lt;code&gt;kio-gdrive&lt;/code&gt; to access my Google drive account using Dolphin (file manager).
Since these are mounted as a virtual filesystem, I was not able to save files in them directly from libreoffice or any external program.
So I thought creating a new document from dolphin and then editing an empty document would be easier to use.
But information was scant regarding how to put together.
I knew we needed a template which is just an empty file but I didn&amp;rsquo;t know how to put all this together to make it show up in Dolphin&amp;rsquo;s &amp;ldquo;Create New&amp;rdquo; context menu.&lt;/p&gt;
&lt;h1 id=&#34;steps-to-get-it-working&#34;&gt;Steps to get it working&lt;/h1&gt;
&lt;p&gt;The example assumes creation of an empty document (ODT file).
First create a template file by saving an empty document in &lt;code&gt;~/Templates&lt;/code&gt;. This is just a suggested directory but any place would be fine.
As of &lt;code&gt;kf5&lt;/code&gt;, the path for user templates is &lt;code&gt;~/.local/share/templates&lt;/code&gt; which can be got from &lt;code&gt;kf5-config --path templates&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So in &lt;code&gt;~/.local/share/templates&lt;/code&gt;, create an application file like so&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;color:#999;font-style:italic&#34;&gt;# ~/.local/share/templates/writer.desktop&lt;/span&gt;
&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;[Desktop Entry]&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Version&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;1.0&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Name&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;Writer Document&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Terminal&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;false&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Icon&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;libreoffice-writer&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Type&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;Link&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;URL&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;$HOME/Templates/Untitled 1.odt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After this Dolphin should pick this up and show this entry in the &amp;ldquo;Create new&amp;rdquo; menu.
&lt;img src=&#34;https://jagan.be/blog/2018-10-23-01:09:08.png&#34; alt=&#34;Context menu&#34;&gt;
One has to take care to give proper extension to the files when naming them though since Google Docs won&amp;rsquo;t like files without extension although they can opened from Drive into Docs.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Moving to systemd-networkd</title>
      <link>https://jagan.be/blog/post/shorts/systemd-networkd/</link>
      <pubDate>Fri, 27 Jul 2018 01:04:20 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/systemd-networkd/</guid>
      <description>&lt;p&gt;&lt;code&gt;systemd-networkd&lt;/code&gt; is a network manager that comes built in with Systemd. It has
features, similar to &lt;a href=&#34;https://wiki.archlinux.org/index.php/NetworkManager&#34;&gt;NetworkManager&lt;/a&gt; and
&lt;a href=&#34;https://wiki.archlinux.org/index.php/ConnMan&#34;&gt;ConnMan&lt;/a&gt; which are more commonly used in
distributions like Ubuntu and Fedora.&lt;/p&gt;
&lt;h1 id=&#34;my-old-system&#34;&gt;My old system&lt;/h1&gt;
&lt;p&gt;I had moved away from &lt;code&gt;NetworkManager&lt;/code&gt; one year back due to constant issues with connecting
to enterprise Wi-Fi with logs and errors that were difficult to debug or fix. It was also
difficult to see where the failures occurred prompted me to move towards a more modular
system.&lt;/p&gt;
&lt;p&gt;The hacked system did not have a manager on top and it was cobbled together with:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;wpa_supplicant&lt;/code&gt; for wireless.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dhcpcd&lt;/code&gt; for DHCP (wired and wireless).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dnscrypt-proxy&lt;/code&gt; for DNS over HTTPS and as a local cache.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Last week I started having problems when &lt;code&gt;dhcpcd&lt;/code&gt; was not setting the proper network
gateway and I couldn&amp;rsquo;t figure out what exactly was the issue since there were no
updates to any of the affected programs. I realized that decoupling DHCP caused
issues that can only be solved with a program that can react to network link changes properly.
To be honest, this system did not have any issues for a long time and I could&amp;rsquo;ve just
continued to use it after figuring out the problem but I thought it was time to try
&lt;code&gt;networkd&lt;/code&gt;.&lt;/p&gt;
&lt;h1 id=&#34;systemd-networkd&#34;&gt;&lt;code&gt;systemd-networkd&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;It works similarly to how Systemd handles services. &lt;code&gt;networkd&lt;/code&gt; uses INI style
&amp;ldquo;.network&amp;rdquo; configuration files. Look at the man page for
&lt;a href=&#34;https://jlk.fjfi.cvut.cz/arch/manpagesman/core/systemd/systemd.network.5.en&#34;&gt;&lt;code&gt;systemd.network&lt;/code&gt;&lt;/a&gt;
for more information.&lt;/p&gt;
&lt;p&gt;My motivation was to seamlessly handle wired and wireless interfaces without dropping
connection due to state changes. For this purpose I had two files,
&lt;code&gt;/etc/systemd/network/20-wired.network&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-INI&#34; data-lang=&#34;INI&#34;&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;[Match]&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Name&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;eno1&lt;/span&gt;

&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;[Network]&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;DHCP&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;yes&lt;/span&gt;

&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;[DHCP]&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;RouteMetric&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and &lt;code&gt;/etc/systemd/network/25-wireless.network&lt;/code&gt; with&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-INI&#34; data-lang=&#34;INI&#34;&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;[Match]&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Name&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;wlp2s0b1&lt;/span&gt;

&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;[Network]&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;DHCP&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;yes&lt;/span&gt;

&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;[DHCP]&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;RouteMetric&lt;/span&gt;=&lt;span style=&#34;color:#ed9d13&#34;&gt;20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You should start &lt;code&gt;systemd-networkd.service&lt;/code&gt; and it should work with your existing
&lt;code&gt;wpa_supplicant@wlp2s0b1.service&lt;/code&gt; which should be setup separately. Network interface
names &lt;code&gt;eno1&lt;/code&gt; and &lt;code&gt;wlp2s0b1&lt;/code&gt; are predictable and persistent across reboots,  and are
setup by &lt;a href=&#34;https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/&#34;&gt;Systemd&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;My DHCP issue was solved by &lt;code&gt;networkd&lt;/code&gt; knowing about both networks and handling them
properly. The other nice property is I can set route metrics in the configuration
which puts the kernel in charge of using the appropriate route when there are multiple
gateways. Example of &lt;code&gt;ip route&lt;/code&gt; with both interfaces connected:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;$ ip ro
default via 192.168.1.1 dev eno1 proto dhcp src 192.168.1.125 metric &lt;span style=&#34;color:#3677a9&#34;&gt;10&lt;/span&gt;
default via 10.46.255.254 dev wlp2s0b1 proto dhcp src 10.46.140.105 metric &lt;span style=&#34;color:#3677a9&#34;&gt;20&lt;/span&gt;
10.46.128.0/17 dev wlp2s0b1 proto kernel scope link src 10.46.140.105
10.46.255.254 dev wlp2s0b1 proto dhcp scope link src 10.46.140.105 metric &lt;span style=&#34;color:#3677a9&#34;&gt;20&lt;/span&gt;
192.168.1.0/24 dev eno1 proto kernel scope link src 192.168.1.125
192.168.1.1 dev eno1 proto dhcp scope link src 192.168.1.125 metric &lt;span style=&#34;color:#3677a9&#34;&gt;10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;handling-dns&#34;&gt;Handling DNS&lt;/h2&gt;
&lt;p&gt;Systemd also comes with &lt;code&gt;resolved&lt;/code&gt; which has a bunch of nice features and also integrates
with options in the network files. However tempting this might be I still wanted to
stick with my working &lt;code&gt;dnscrypt-proxy&lt;/code&gt; setup. This is easily done by asking &lt;code&gt;resolved&lt;/code&gt;
to use &lt;code&gt;127.0.0.1&lt;/code&gt; as its DNS server in &lt;code&gt;/etc/systemd/resolved.conf&lt;/code&gt;. Now resolv.conf
should have use &lt;code&gt;127.0.0.53&lt;/code&gt; which is the &lt;code&gt;resolved&lt;/code&gt; stub and it delegates the actual
work to &lt;code&gt;dnscrypt-proxy&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;While you may feel, this is similar to &lt;code&gt;NetworkManager&lt;/code&gt; I would point out that &lt;code&gt;wpa_supplicant&lt;/code&gt;
is handled separately and hence affords more ways to test your wireless connection before
getting caught in an endless loop. Although if &lt;code&gt;NetworkManager&lt;/code&gt; works for you, there isn&amp;rsquo;t a compelling reason to
leave it. In the end, this was pretty easy to set up and the system looks more robust now.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Privacy podcast, IRL</title>
      <link>https://jagan.be/blog/post/shorts/privacy_podcast/</link>
      <pubDate>Sat, 14 Jul 2018 14:30:44 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/privacy_podcast/</guid>
      <description>&lt;p&gt;Mozilla, the organization behind Firefox actually does more than just build software.
In its advocacy efforts, they roped in &lt;a href=&#34;https://twitter.com/Veronica&#34;&gt;Veronica Belmont&lt;/a&gt;
to make &lt;a href=&#34;https://irlpodcast.org/&#34;&gt;IRL: Online Life Is Real Life&lt;/a&gt;, a podcast that explores
various aspects of privacy in everyday life explained in a way that can be understood by
everyone. It is into the third season and the current episode takes a look at the dilemma
of sharing data with companies for free services and privacy.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;h1 id=&#34;nothing-to-hide&#34;&gt;Nothing to hide&lt;/h1&gt;
&lt;p&gt;I was privacy conscious before but documentaries like &lt;a href=&#34;https://vimeo.com/nothingtohide&#34;&gt;&amp;ldquo;Nothing to Hide&amp;rdquo;&lt;/a&gt;
has opened my eyes towards the historical significance of privacy as well. People
who are generally in the opinion that since I am a normal person, I don&amp;rsquo;t have to
fear surveillance should watch the documentary to gain more insight as to why
everyone has something to hide or at least would not be comfortable with it being public.&lt;/p&gt;
&lt;h1 id=&#34;grand-bargain&#34;&gt;Grand Bargain&lt;/h1&gt;
&lt;p&gt;Coming back to the topic of the IRL&amp;rsquo;s recent episode, we have become quite accustomed
to accepting long terms of service agreements for online services. This extends to
application permissions that can be overreaching. We move past those in the hopes of
getting something out of those applications and in some cases we do. The episode takes
a dive into whether this is worth it and how it can have an impact on someone&amp;rsquo;s life.&lt;/p&gt;
&lt;h2 id=&#34;paying-for-privacy&#34;&gt;Paying for privacy&lt;/h2&gt;
&lt;p&gt;Old methods and practices are always resurfaced as we find newfangled business models
are insufficient to handle privacy concerns. The question is if we pay for services,
will that buy us more privacy.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Platforms like &lt;a href=&#34;https://www.patreon.com&#34;&gt;patreon&lt;/a&gt; offer a way for creators to reach
their fans directly and sustainably.&lt;/li&gt;
&lt;li&gt;Paying for a mail host gives us the confidence that they will maintain our mail
and are not in it for extraneous purposes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It should be quite evident that paying for these services removes incentives for
companies to spy on users and concentrate on the product instead. To be honest,
I am not sure that everyone would be able to pay for every service we use for free
today. A lot of us use multiple news sources but paying for each of them can be
difficult.&lt;/p&gt;
&lt;h3 id=&#34;no-one-left-behind&#34;&gt;No one left behind&lt;/h3&gt;
&lt;p&gt;There is a real concern that the section of the internet users which is not able
to pay their way out of this will be disproportionately affected. Till now these
issues have not been looked at seriously because of online advertisement. But due
to increase in the use ad blockers we have had banners asking to disable the plugin
and allow tracking to view the content.&lt;/p&gt;
&lt;p&gt;A straightforward solution will be to allow people to share subscriptions and make
them cheaper; family plans comes to mind. We should also realise nothing comes for
free and accept some loss of functionality by limiting our use to essential services.
More importantly by paying for those essential services we get more privacy!&lt;/p&gt;
&lt;h2 id=&#34;middle-ground-between-self-hosting-and-advertisement-driven-services&#34;&gt;Middle ground between self hosting and advertisement driven services&lt;/h2&gt;
&lt;p&gt;Motivated individuals can maintain their own services on a personal server for a
small group of people. For example, personal mail servers was the norm in the 90s but it has
died out considerably due to amount of administrative burden and inherent complexity
of these services.&lt;/p&gt;
&lt;p&gt;To this extent, I have seen a couple of groups popping up offering free services
powered through donations and free software that can help people move from ad-driven
services. &lt;a href=&#34;https://disroot.org/en&#34;&gt;Disroot&lt;/a&gt; and &lt;a href=&#34;https://asymptote.club/&#34;&gt;Asymtote&lt;/a&gt; are
examples that I found online. I believe forming groups among like-minded people
and creating such small services is the way forward. Importantly the author behind
Asymtote is keeping the infrastructure open so people can create clones and stand up
their own versions. Sharing of infrastructure can help with reducing costs and burden
with regards administration and &lt;a href=&#34;https://en.wikipedia.org/wiki/Bus_factor&#34;&gt;bus factor&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This post has been braindump of sorts but hopefully the links here and the podcast
can help people to think about these issues before signing up for more services and think
about self hosting as a cheaper alternative. If you have money, please pay someone rather
than using an ad-driven service for your own privacy and safety.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Encrypting /home in place</title>
      <link>https://jagan.be/blog/post/encrypting-HOME-inplace/</link>
      <pubDate>Thu, 05 Jul 2018 20:55:57 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/encrypting-HOME-inplace/</guid>
      <description>&lt;h1 id=&#34;raison-dêtre&#34;&gt;Raison d&amp;rsquo;être&lt;/h1&gt;
&lt;p&gt;When I first installed this system, I was oblivious to disk encryption and didn&amp;rsquo;t
factor it in. This resulted in a non-&lt;a href=&#34;https://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29&#34;&gt;LVM&lt;/a&gt;
system with some haphazard partitions from subsequent resizing and nuking of Windows
in the past few years. One good decision I took when installing was to separate
&lt;code&gt;/&lt;/code&gt; and &lt;code&gt;/home&lt;/code&gt; so this turned out to be easier than I thought.&lt;/p&gt;
&lt;h1 id=&#34;preparation&#34;&gt;Preparation&lt;/h1&gt;
&lt;p&gt;I was apprehensive of ending up with a dead system before today&amp;rsquo;s DGPLUG session,
so I managed to get &lt;code&gt;weechat&lt;/code&gt; up and running inside &lt;code&gt;tmux&lt;/code&gt; in a virtual console.
Next I had the &lt;a href=&#34;https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption#Re-encrypting_devices&#34;&gt;wiki article&lt;/a&gt;
opened on &lt;code&gt;elinks&lt;/code&gt;, a TUI browser. I don&amp;rsquo;t want to repeat any commands that are
already available in the wiki. I would like to make a more cogent story mentioning some caveats
in the process. First the &lt;code&gt;resize2fs&lt;/code&gt; command to shrink &lt;code&gt;/home&lt;/code&gt; took some time.
This was done to make space for &lt;code&gt;LUKS&lt;/code&gt; header which would be written during encryption. I
wish there was warning in the wiki about how long this would take. At least I could&amp;rsquo;ve
enabled the progress option for &lt;code&gt;resize2fs&lt;/code&gt; 😀&lt;/p&gt;
&lt;h1 id=&#34;encrypting-the-disk-device&#34;&gt;Encrypting the disk device&lt;/h1&gt;
&lt;p&gt;After &lt;code&gt;resize2fs&lt;/code&gt; completes we can start encrypting the partition. It is interesting
to note that &lt;code&gt;cryptsetup-reencrypt&lt;/code&gt; is quite recent and I found another project that
was developed in parallel; &lt;a href=&#34;https://johndoe31415.github.io/luksipc/introduction.html&#34;&gt;&lt;code&gt;luiksipc&lt;/code&gt;&lt;/a&gt;,
which as the name suggests does &lt;code&gt;luks&lt;/code&gt; in-place. But since this functionality is
available upstream I didn&amp;rsquo;t explore the alternative.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cryptsetup-reencrypt&lt;/code&gt; doesn&amp;rsquo;t emit any warnings like the wiki alludes to and this gives me hope
that the functionality was stabilized recently. For the passphrase I took &lt;a href=&#34;https://kushaldas.in/&#34;&gt;Kushal&amp;rsquo;s&lt;/a&gt;
suggestion to use XKCD style passwords. &lt;code&gt;gopass&lt;/code&gt; includes an option to do it quite
easily and it generated a strong yet easy to remember password.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://imgs.xkcd.com/comics/password_strength.png&#34; alt=&#34;password comic from xkcd.com&#34;&gt;&lt;/p&gt;
&lt;p&gt;This step took more than 4 hours, but I was attending the class and doing something
productive in the meantime. The next steps were to grow the filesystem again and then
test it out.&lt;/p&gt;
&lt;h2 id=&#34;encrypted-swap&#34;&gt;Encrypted swap&lt;/h2&gt;
&lt;p&gt;Since swap holds the data when hibernating the system we have to secure this as well.
A &lt;code&gt;swapfile&lt;/code&gt; is the easiest approach in my case. Follow the &lt;a href=&#34;https://wiki.archlinux.org/index.php/Swap#Swap_file_creation&#34;&gt;wiki article&lt;/a&gt;
to create swap but do it under &lt;code&gt;/home&lt;/code&gt; since that is what we have encrypted.&lt;/p&gt;
&lt;h1 id=&#34;integrating-it-with-systemd-and-syslinux&#34;&gt;Integrating it with Systemd and Syslinux&lt;/h1&gt;
&lt;p&gt;I would like to skip all the mistakes and go straight to the wonderful solution.
The mistakes in this case would only confuse the reader. Thanks to Khorne from
#archlinux-newbie I was able to recover quickly after a few reboots.&lt;/p&gt;
&lt;h2 id=&#34;add-the-appropriate-hooks&#34;&gt;Add the appropriate hooks&lt;/h2&gt;
&lt;p&gt;I assume you are using a &lt;code&gt;systemd&lt;/code&gt; based initramfs, if not switch to it for the
fancy &lt;code&gt;systemd-analyze&lt;/code&gt; output.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;color:#40ffff&#34;&gt;HOOKS&lt;/span&gt;=(systemd autodetect keyboard sd-vconsole modconf block sd-encrypt sd-lvm2 resume filesystems fsck)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Things to lookout for:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;keyboard&lt;/code&gt; for early userspace functionality to enter the password.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sd-vconsole&lt;/code&gt; for different keymaps and fonts which is the &lt;code&gt;systemd&lt;/code&gt; equivalent
for the &lt;code&gt;keymap&lt;/code&gt; hook.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sd-encrpyt&lt;/code&gt; and &lt;code&gt;sd-lvm2&lt;/code&gt; are the respective equivalents for &lt;code&gt;encrpyt&lt;/code&gt; and &lt;code&gt;lvm2&lt;/code&gt;.
The former is what prompts for password when booting early on.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;modify-kernel-parameters-in-syslinuxcfg&#34;&gt;Modify kernel parameters in &lt;code&gt;syslinux.cfg&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;This should be boot loader agnostic but I just like &lt;code&gt;syslinux&lt;/code&gt; better after being
scarred by &lt;code&gt;grub-mkconfig&lt;/code&gt;. If you use grub, I highly suggest using your own &lt;code&gt;grub.cfg&lt;/code&gt;
&lt;a href=&#34;https://ptpb.pw/mk7y&#34;&gt;like so&lt;/a&gt; which was taken from #archlinux. Append the following
to kernel parameters,&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-conf&#34; data-lang=&#34;conf&#34;&gt;rd.luks.name=UIID=home resume=/dev/mapper/home resume_offset=OFFSET
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;resume_offset&lt;/code&gt; is obtained from&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;$ sudo filefrag -v /home/swapfile | awk &lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#39;{if($1==&amp;#34;0:&amp;#34;){print $4}}&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;taken from the wiki article on swap encryption.&lt;/p&gt;
&lt;h2 id=&#34;fstab-changes&#34;&gt;fstab changes&lt;/h2&gt;
&lt;p&gt;The previous section will add the device &lt;code&gt;/dev/mapper/home&lt;/code&gt; which we will use in
&lt;code&gt;/etc/fstab&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# mounting home
/dev/mapper/home  /home       ext4        rw,relatime,lazytime,data=ordered,nodev,nosuid  0 2

# swapfile
/home/swapfile    none        swap        defaults                                        0 0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Most of these settings are opinionated, so I would suggest looking at &lt;code&gt;fstab(5)&lt;/code&gt;
and &lt;code&gt;ext4(5)&lt;/code&gt; for explanations. This completes the loop to mount the encrypted device
opened by &lt;code&gt;sd-encrypt&lt;/code&gt; hook. Like most other things &lt;code&gt;systemd&lt;/code&gt; takes care of dependencies and
generates appropriate &lt;code&gt;.mount&lt;/code&gt; and &lt;code&gt;.device&lt;/code&gt; files.&lt;/p&gt;
&lt;h1 id=&#34;last-step&#34;&gt;Last step&lt;/h1&gt;
&lt;p&gt;Generate initramfs, reboot and rejoice!&lt;/p&gt;
&lt;p&gt;In Arch Linux,&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;$ sudo mkinitcpio -P
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;to get initramfs and initrd.&lt;/p&gt;
&lt;p&gt;At the end I would say my understanding of all the different systems made it
difficult to get it running quickly. Systemd probably made some of this bearable
by integrating disparate systems and providing much-needed dependency tracking.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>How to Blog Steadily</title>
      <link>https://jagan.be/blog/post/shorts/how_to_blog_steadily/</link>
      <pubDate>Fri, 29 Jun 2018 22:11:58 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/how_to_blog_steadily/</guid>
      <description>&lt;p&gt;Today&amp;rsquo;s session of summer training in &lt;a href=&#34;https://dgplug.org/summertraining18/&#34;&gt;#dgplug on freenode&lt;/a&gt;
is a follow up on writing and its importance. I wanted to share an answer to one
of my doubts given by &lt;a href=&#34;https://janusworx.com/categories/dgplug.html&#34;&gt;Jason&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It is established that one has to write regardless of its quality to kick
start the habit. The major roadblock is mostly on topic and specificity since
there are times when you are in no man&amp;rsquo;s land. With this laid out, lets get to the answer.&lt;/p&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li&gt;I read so there is always something I want to blab about.&lt;/li&gt;
&lt;li&gt;I keep an open mind during my bath, I get the most amazing ideas then.&lt;/li&gt;
&lt;li&gt;I try to synthesize to common or disparate points across media. For example,
something I read reminds me of something I saw or learnt.&lt;/li&gt;
&lt;li&gt;In my more productive moments, I make a list of things to write about and
then slowly tackle them one at a time later.&lt;/li&gt;
&lt;li&gt;I also batch posts if I&amp;rsquo;m in a good state and queue them up.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;All these instructions seem obvious but one keeps forgetting them since it is
not written down concretely to recall. Since I read a lot, the first suggestion
is always possible if I make notes of the things I read and make conscious effort
to formulate them properly. More than everything I am planning to post on a weekly
basis to keep my creative juices flowing.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Koch curves and fractals</title>
      <link>https://jagan.be/blog/post/koch_curves_and_fractals/</link>
      <pubDate>Tue, 26 Jun 2018 18:03:18 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/koch_curves_and_fractals/</guid>
      <description>&lt;p&gt;Fractals are never ending patterns found in nature that are impossible to
describe in classical geometry. I was intrigued by this topic after a long time
since I had programmed some &lt;code&gt;koch&lt;/code&gt; curves for an exercise in the Think Python
book.&lt;/p&gt;
&lt;p&gt;Some pictures,
&lt;img src=&#34;https://jagan.be/blog/creations/canvas.jpg&#34; alt=&#34;Example 1&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://jagan.be/blog/creations/creation2.jpg&#34; alt=&#34;Example 2&#34;&gt;
and the code can be found on &lt;a href=&#34;https://github.com/j605/creations&#34;&gt;github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The post on how to generate trees&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;
made me realise that the topic was very general not just related to the curves
I had done earlier. I looked into whether there were already libraries for such
systems and found out that Luxor.jl&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt; provided a great turtle programing&lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;
interface. After installing the library using &lt;code&gt;Pkg&lt;/code&gt; in &lt;code&gt;Julia&lt;/code&gt; and running some
example code, I went on to implement the H-tree shown in the post&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;.&lt;/p&gt;
&lt;p&gt;The formulation for a H-tree is written as
$$
L(g)→[rf(2^{g/2})L(g+1)][lf(2^{g/2})L(g+1)]
$$&lt;/p&gt;
&lt;p&gt;For a more detailed explanation please take a look at the post&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 on Lindenmayer
system&lt;sup id=&#34;fnref:4&#34;&gt;&lt;a href=&#34;#fn:4&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;4&lt;/a&gt;&lt;/sup&gt;. I will briefly explain the terms for the purpose of this post.&lt;/p&gt;
&lt;p&gt;The expression can be thought of as a recursive function in programming. So the
first generation, $L(g=0)$, is called the axiom. Actions of turning right and left
are defined as $r$ and $l$. The turtle going forward is represented as $f(n)$.
$[$ and $]$ in the formula refer to pushing and popping from a stack respectively.
So the expression is effectively decoded as&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;pushing the current position in the stack&lt;/li&gt;
&lt;li&gt;turning right&lt;/li&gt;
&lt;li&gt;going forward by $L/\sqrt{2}$&lt;/li&gt;
&lt;li&gt;recursing into the next generation which ends in a NOP&lt;/li&gt;
&lt;li&gt;popping from the stack and executing the next branch&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A stack is used here for the purpose of branching since state has to saved between
to come back and draw on the other side of the branch. The author of post&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; also
gives examples of how trees are generated in this way. Furthermore, the system is
parameterized to produced more realistic models of trees.&lt;/p&gt;
&lt;p&gt;This gives you a beautiful picture of an H-tree.
&lt;img src=&#34;https://jagan.be/blog/creations/htree.png&#34; alt=&#34;H-tree&#34;&gt;&lt;/p&gt;
&lt;p&gt;Instead of turning by 90° if you try 60°, a nice fractal is formed.
&lt;img src=&#34;https://jagan.be/blog/creations/htree-60.png&#34; alt=&#34;H-tree 60°&#34;&gt;&lt;/p&gt;
&lt;p&gt;Julia code for the above drawings is provided below.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-julia&#34; data-lang=&#34;julia&#34;&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;using&lt;/span&gt; Luxor, Colors
Drawing(&lt;span style=&#34;color:#3677a9&#34;&gt;1000&lt;/span&gt;, &lt;span style=&#34;color:#3677a9&#34;&gt;1000&lt;/span&gt;, &lt;span style=&#34;color:#ed9d13&#34;&gt;&amp;#34;htree.svg&amp;#34;&lt;/span&gt;)
origin()

🐢 = Turtle()

&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;function&lt;/span&gt; L(g, l=&lt;span style=&#34;color:#3677a9&#34;&gt;200&lt;/span&gt;, angle=&lt;span style=&#34;color:#3677a9&#34;&gt;90&lt;/span&gt;)
  &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;if&lt;/span&gt; g &amp;gt; &lt;span style=&#34;color:#3677a9&#34;&gt;200&lt;/span&gt;
    &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;return&lt;/span&gt;
  &lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;end&lt;/span&gt;

  Push(🐢)
  Turn(🐢, angle)
  Forward(🐢, l/sqrt(&lt;span style=&#34;color:#3677a9&#34;&gt;2&lt;/span&gt;))
  L(g+&lt;span style=&#34;color:#3677a9&#34;&gt;20&lt;/span&gt;, l/sqrt(&lt;span style=&#34;color:#3677a9&#34;&gt;2&lt;/span&gt;), angle)
  Pop(🐢)

  Push(🐢)
  Turn(🐢, &lt;span style=&#34;color:#3677a9&#34;&gt;360&lt;/span&gt;-angle)
  Forward(🐢, l/sqrt(&lt;span style=&#34;color:#3677a9&#34;&gt;2&lt;/span&gt;))
  L(g+&lt;span style=&#34;color:#3677a9&#34;&gt;20&lt;/span&gt;, l/sqrt(&lt;span style=&#34;color:#3677a9&#34;&gt;2&lt;/span&gt;), angle)
  Pop(🐢)
&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;end&lt;/span&gt;

L(&lt;span style=&#34;color:#3677a9&#34;&gt;0.0&lt;/span&gt;, &lt;span style=&#34;color:#3677a9&#34;&gt;200&lt;/span&gt;, &lt;span style=&#34;color:#3677a9&#34;&gt;60&lt;/span&gt;)
finish()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;section class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id=&#34;fn:1&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://gpfault.net/posts/generating-trees.txt.html&#34;&gt;https://gpfault.net/posts/generating-trees.txt.html&lt;/a&gt; &lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:2&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://juliagraphics.github.io/Luxor.jl/stable/&#34;&gt;https://juliagraphics.github.io/Luxor.jl/stable/&lt;/a&gt; &lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:3&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Turtle_graphics&#34;&gt;https://en.wikipedia.org/wiki/Turtle_graphics&lt;/a&gt; &lt;a href=&#34;#fnref:3&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:4&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/L-system&#34;&gt;https://en.wikipedia.org/wiki/L-system&lt;/a&gt; &lt;a href=&#34;#fnref:4&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
</description>
    </item>
    
    <item>
      <title>Importing from Medium</title>
      <link>https://jagan.be/blog/post/shorts/importing_from_medium/</link>
      <pubDate>Mon, 18 Jun 2018 17:59:09 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/importing_from_medium/</guid>
      <description>&lt;p&gt;I did not realize that I had an article and a draft stuck in &lt;a href=&#34;https://medium.com&#34;&gt;Medium&lt;/a&gt;
and  I thought how difficult would it be to yank it from there and import it to
Hugo. This post documents a short version of how to do it.&lt;/p&gt;
&lt;p&gt;First, export all your data from Medium. This contains posts as well as other content that
you have contributed to the site: claps, bookmarks, topics etc. Since I wanted to
export just one post I went in to posts directory and found an HTML file corresponding
to that article.&lt;/p&gt;
&lt;p&gt;Next, you would have to convert it to markdown to edit it suitably in Hugo&amp;rsquo;s format.
This &lt;a href=&#34;http://www.cantoni.org/2013/01/19/converting-html-to-text-markdown&#34;&gt;blog&lt;/a&gt;
showed me that it was easier to use &lt;code&gt;pandoc&lt;/code&gt; for converting to markdown. After
that conversion further edits have to be done to strip unnecessary formatting
text. I then proceeded to add a date to the post and added it to the site.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Migrated to hugo</title>
      <link>https://jagan.be/blog/post/shorts/migrated_to_hugo/</link>
      <pubDate>Mon, 11 Jun 2018 14:45:08 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/shorts/migrated_to_hugo/</guid>
      <description>&lt;p&gt;After a lot of thinking and trying out various static site generators I have
settled on using &lt;code&gt;hugo&lt;/code&gt;. To be honest there was no particular preference other
than it being available in the Arch repository and migration was made easier
since I was able to use a WordPress exporter, &lt;a href=&#34;https://github.com/thomasf/exitwp&#34;&gt;exitwp&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The post, &lt;a href=&#34;https://samaxes.com/2016/02/static-site-from-wordpress-to-hugo/&#34;&gt;https://samaxes.com/2016/02/static-site-from-wordpress-to-hugo/&lt;/a&gt; was
helpful in nudging me to &lt;code&gt;hugo&lt;/code&gt; as well. I did not bother with comments and other
complexities mentioned in that post although it can be useful for some. A somewhat
simpler solution can be engineered with &lt;code&gt;git hooks&lt;/code&gt; to build and copy the site.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>about</title>
      <link>https://jagan.be/blog/about/</link>
      <pubDate>Mon, 11 Jun 2018 14:08:58 +0200</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/about/</guid>
      <description>&lt;p&gt;I am a student in Leuven experiencing new things and enjoying the freedom of
living alone, which means I am struggling to manage everything going around me!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://jagan.be/blog/abbey.jpg&#34; alt=&#34;Park Kessel-Lo&#34;&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Getting a Belgium Long Term Visa in India (for study)</title>
      <link>https://jagan.be/blog/post/medium.com/Getting-a-Belgium-Long-Term-Visa-in-India-for-study/</link>
      <pubDate>Tue, 28 Jul 2015 00:00:00 +0000</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/medium.com/Getting-a-Belgium-Long-Term-Visa-in-India-for-study/</guid>
      <description>&lt;p&gt;After getting an admit I was elated and frankly never thought of the
arduous journey ahead. The process can be grouped into these steps:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn-images-1.medium.com/max/1000/1*Dwi2YO0hzfgs1DnXZcrR_Q.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Getting the required documents&lt;/li&gt;
&lt;li&gt;Legalisation&lt;/li&gt;
&lt;li&gt;Submitting the application&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;getting-the-required-documents&#34;&gt;Getting the required documents&lt;/h1&gt;
&lt;p&gt;If you have a degree certificate, then great. Most often, students
completing their studies in the same year don&amp;rsquo;t get it. Don&amp;rsquo;t wait for
the university convocation, instead get a &lt;em&gt;provisional certificate&lt;/em&gt;
after the results have been announced. Next is the admission letter from
the university.&lt;/p&gt;
&lt;p&gt;For getting the visa, you need to undergo a medical test from a facility
recognised by the embassy. You get the list of centres
&lt;a href=&#34;http://www.vfs-be-in.com/allaboutyourvisas.html#5&#34;&gt;here&lt;/a&gt;. It is a smallish test and depending upon the test
centre you might get the results the same day. Take care not to open the
medical record, you need to submit it as sealed document to
&lt;a href=&#34;http://vfs-be-in.com/&#34;&gt;VFS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To make sure you have no pending criminal cases, the embassy requires a
&lt;em&gt;Police Clearance Certificate (PCC).&lt;/em&gt; There are two ways of obtaining a
PCC: from the Passport Seva Kendra (PSK) and the Police. You have to
look for more information elsewhere if you want to try the latter
method. The former is trivial, apply in the passport seva website and go
to PSK according to your appointment. You will get it in an hour at
most.&lt;/p&gt;
&lt;p&gt;For proving your financial ability, you can produce a solvency
certificate from the university or someone can vouch for you. For
further details, &lt;a href=&#34;http://www.kuleuven.be/english/admissions/travelling/solvency&#34;&gt;this
page&lt;/a&gt; from the University of Leuven website is very
thorough. Recently they have introduced another contribution fee for the
visa, for a government funded university, €160 to the embassy. More
details at their &lt;a href=&#34;https://dofi.ibz.be/sites/dvzoe/EN/news/Pages/Contributioncoveringadministrativecostsofanapplication.aspx&#34;&gt;immigration
website&lt;/a&gt;.
Get a receipt from the bank confirming your wire
transfer. You need to attach this to your application.&lt;/p&gt;
&lt;h1 id=&#34;legalisation&#34;&gt;Legalisation&lt;/h1&gt;
&lt;p&gt;Degree certificate and PCC needs to have an apostille stamp. Your degree
certificate needs to be verified by the state department first. It will
take about 10 days. You can find their location
&lt;a href=&#34;http://mea.gov.in/apostille.htm&#34;&gt;here&lt;/a&gt;. If the PCC was obtained from the PSK, no state
verification is needed, since it is issued by the MEA itself. Now go to
the MEA to get it verified. This will take only a day.&lt;/p&gt;
&lt;p&gt;The medical certificate needs to be legalised by the embassy. Take it to
VFS and get it done before applying for visa.&lt;/p&gt;
&lt;h1 id=&#34;submitting-the-application&#34;&gt;Submitting the Application&lt;/h1&gt;
&lt;p&gt;Fill two visa application forms. You can find the copy
&lt;a href=&#34;https://dofi.ibz.be/sites/dvzoe/EN/Documents/Application_for_a_visa_for_a_long_stay_in_Belgium.pdf&#34;&gt;here&lt;/a&gt;. If you have any serious questions ask the embassy
and VFS and the VFS is generally reliable to provide correct
information. But be really cautious and ask the embassy to confirm. You
need to have two copies of all the documents.&lt;/p&gt;
&lt;p&gt;Go to the VFS centre early, possibly at 8 AM when it opens so you have
enough time to make changes to your application if needed. You also need
to wait for them to confirm with the embassy about visa fees.&lt;/p&gt;
&lt;p&gt;I will summarise the costs here,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Visa fees: ₹12960&lt;/li&gt;
&lt;li&gt;Legalisation fee: ₹1440&lt;/li&gt;
&lt;li&gt;VFS Global service charge: ₹1080&lt;/li&gt;
&lt;li&gt;Visa Contribution: €160&lt;/li&gt;
&lt;li&gt;Have extra ₹1000 for courier and misc fees.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;VFS only accepts cash, so be aware.&lt;/p&gt;
&lt;p&gt;Best of Luck!&lt;/p&gt;
&lt;p&gt;Exported from &lt;a href=&#34;https://medium.com&#34;&gt;Medium&lt;/a&gt; on June 18, 2018.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Low Pass Filter and Its frequency response</title>
      <link>https://jagan.be/blog/post/j605.wordpress.com/low-pass-filter-and-it-its-frequency-response/</link>
      <pubDate>Thu, 07 Nov 2013 10:35:36 +0000</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/j605.wordpress.com/low-pass-filter-and-it-its-frequency-response/</guid>
      <description>&lt;p&gt;After hours and hours of getting a simple low pass filter to work, I couldn&amp;rsquo;t help but share this. With a host of FOSS EDA tools in linux, I really couldn&amp;rsquo;t resist start using it.  I got to credit Ashwith, for the wonderful &lt;a href=&#34;http://ashwith.wordpress.com/category/tutorials/spice/&#34;&gt;SPICE tutorials&lt;/a&gt; without which my life would have been more miserable.&lt;/p&gt;
&lt;p&gt;I wouldn&amp;rsquo;t like to repeat what Ashwith has already written, but I would like to show the schema and results that you can obtain with ngspice as well as matplotlib which are as good as any commercial software that you would use. This is the schema that I have used. It is pretty simple to construct and following Ashwith&amp;rsquo;s recommendation to change the config file will prove helpful as it will automatically fill in the refdes values for you. This is the schema I have used, the default model of the opamp works fine.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://j605.files.wordpress.com/2013/11/lpf-active1.png&#34; alt=&#34;lpf-active1&#34;&gt;&lt;/p&gt;
&lt;p&gt;You can use ngspice to simulate the circuit. Even though ngspice has an inbuilt plotter, matplotlib is more visually appealing. Before running ngspice you have to get the netlist, to get the netlist do &lt;code&gt;gnetlist -v -g spice-sdb -o lpf-active1.net lpf-active1.sch&lt;/code&gt;. The verbose option will give you valuable debugging information. Start ngspice with the netlist and run the circuit. After simulation, you can use the inbuilt plotter or export the data for later use. To export do, &lt;code&gt;wrdata file v(1,3)&lt;/code&gt;. Now you can use this script from &lt;a href=&#34;http://return1.net/blog/2012/Jan/22/plotting-ngspice-results-with-python&#34;&gt;&amp;lsquo;return 1;&#39;&lt;/a&gt; to generate visually appealing graphs like the one below.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://j605.files.wordpress.com/2013/11/lpf-active1-response.png&#34; alt=&#34;Frequency response characteristics of first order low pass filter&#34;&gt; Frequency response characteristics of first order low pass filter.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Getting started with Git in Windows</title>
      <link>https://jagan.be/blog/post/j605.wordpress.com/getting-started-with-git-in-windows/</link>
      <pubDate>Sun, 02 Jun 2013 14:25:10 +0000</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/j605.wordpress.com/getting-started-with-git-in-windows/</guid>
      <description>&lt;p&gt;I am going with git-bash since it doesn&amp;rsquo;t mess up my Windows installation. Also it is more than enough for standard tasks. Get git from &lt;a href=&#34;http://git-scm.com/download/win&#34;&gt;http://git-scm.com/download/win&lt;/a&gt;. Install git-bash, its a straight forward process. &lt;/p&gt;
&lt;p&gt;We need to generate ssh keys for communicating with either  &lt;a href=&#34;http://github.com&#34;&gt;http://github.com&lt;/a&gt; or &lt;a href=&#34;http://bitbucket.org&#34;&gt;http://bitbucket.org&lt;/a&gt;. If you already have keys from a Linux or Mac, you can use that. Just copy your ~/.ssh to your home directory in Windows. To generate new keys, open git-bash and do&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;ssh-keygen
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Have a decent pass-phrase, or else it would just defeat the purpose. Lastly copy your public key and publish it to Github or Bitbucket.&lt;/p&gt;
&lt;p&gt;PS: If you are going to use Github, they have a native application for Windows that will guide you through the process.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Set up airtel gprs in archlinux via bluetooth</title>
      <link>https://jagan.be/blog/post/j605.wordpress.com/set-up-airtel-gprs-in-archlinux-via-bluetooth/</link>
      <pubDate>Wed, 14 Mar 2012 16:16:13 +0000</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/j605.wordpress.com/set-up-airtel-gprs-in-archlinux-via-bluetooth/</guid>
      <description>&lt;p&gt;I had an urge to write this post since setting up a dial-up connection took me quite an effort. First of all you should have bluez and wvdial installed.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;sudo pacman -S bluez
sudo pacman -S wvdial
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;First scan for bluetooth-enabled devices by&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;hcitool scan
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If there are any devices, its address and name would be displayed. Copy the required address. Now, create rfcomm device to connect to your phone via bluetooth.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;sudo mknod --mode=&lt;span style=&#34;color:#3677a9&#34;&gt;666&lt;/span&gt; /dev/rfcomm0 c &lt;span style=&#34;color:#3677a9&#34;&gt;216&lt;/span&gt; &lt;span style=&#34;color:#3677a9&#34;&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the file /etc/conf.d/bluetooth, set RFCOMM_ENABLE true. In another terminal run bluez-simple-agent and now to check the connection, type&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;rfcomm connect &lt;span style=&#34;color:#3677a9&#34;&gt;0&lt;/span&gt; address channel
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You already have the address, the active channel is obtained from the command&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;sdptool search dun | grep Channel
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When you run the command, you will be prompted for a pin in your mobile and that has to be entered in the terminal which is running bluez-simple-agent. You should have successfully connected right now. Now press ^C to exit the connection. For setting up the internet connection you have to edit /etc/wvdial.conf or create one. For guys using a different ISP, get your APN by googling(just change airtelgprs.in by your ISP&amp;rsquo;s APN).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;color:#6ab825;font-weight:bold&#34;&gt;[Dialer Defaults]&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Modem&lt;/span&gt; = &lt;span style=&#34;color:#ed9d13&#34;&gt;/dev/rfcomm0 &lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Init3&lt;/span&gt; = &lt;span style=&#34;color:#ed9d13&#34;&gt;AT+cgdcont=1,&amp;#34;IP&amp;#34;,&amp;#34;airtelgprs.com&amp;#34;&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Phone&lt;/span&gt; = &lt;span style=&#34;color:#ed9d13&#34;&gt;*99# &lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Username&lt;/span&gt; = &lt;span style=&#34;color:#ed9d13&#34;&gt;user&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Password&lt;/span&gt; = &lt;span style=&#34;color:#ed9d13&#34;&gt;pass&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;New PPD&lt;/span&gt; = &lt;span style=&#34;color:#ed9d13&#34;&gt;yes&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;ISDN&lt;/span&gt; = &lt;span style=&#34;color:#ed9d13&#34;&gt;no&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;BAUD&lt;/span&gt; = &lt;span style=&#34;color:#ed9d13&#34;&gt;115200&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Stupid Mode&lt;/span&gt; = &lt;span style=&#34;color:#ed9d13&#34;&gt;yes&lt;/span&gt;
&lt;span style=&#34;color:#bbb&#34;&gt;Carrier Check&lt;/span&gt; = &lt;span style=&#34;color:#ed9d13&#34;&gt;no&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The Username and Password, in the case of airtel are just for namesake. You can fill them up with bogus data. With that done restart the bluetooth daemon.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;sudo rc.d restart bluetooth
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Starting wvdial as root would connect you to the internet.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>GSOC - Search for that elusive organisation</title>
      <link>https://jagan.be/blog/post/j605.wordpress.com/gsoc-search-for-that-elusive-organisation/</link>
      <pubDate>Tue, 17 Jan 2012 17:09:14 +0000</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/j605.wordpress.com/gsoc-search-for-that-elusive-organisation/</guid>
      <description>&lt;p&gt;GSOC - Google Summer of Code provides the best opportunity for students to get involved in FOSS development. My search for an organisation lead me to different softwares written in different languages. My love lies in python. It was the first language that I learnt. I should give it to my sister who keeps inspiring me to learn new stuff. After some searching, mailman it was that was suggested to me. Being written in python it was quite obvious for me to research about. Installing from source, it is possible to have the latest source-code. Hope to code away this summer.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>A python script to detect duplicate files</title>
      <link>https://jagan.be/blog/post/j605.wordpress.com/a-python-script-to-detect-duplicate-files/</link>
      <pubDate>Sun, 18 Dec 2011 14:16:36 +0000</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/j605.wordpress.com/a-python-script-to-detect-duplicate-files/</guid>
      <description>&lt;p&gt;Working on the book &amp;lsquo;think python&amp;rsquo; has given me lots of opportunities to learn by experimentation. This script is a result of such experimentation of an exercise already given in the book. The script &lt;a href=&#34;https://github.com/j605/learning-python/blob/master/list_duplicate_files.py&#34;&gt;list duplicates&lt;/a&gt; accepts two arguments. The first is the extension of the file and the next is the root directory. It uses the function os.path.walk(), which is very versatile. Further improvements of the script will follow.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Posting from vim using vimpress</title>
      <link>https://jagan.be/blog/post/j605.wordpress.com/posting-from-vim-using-vimpress-2/</link>
      <pubDate>Sat, 22 Oct 2011 07:36:41 +0000</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/j605.wordpress.com/posting-from-vim-using-vimpress-2/</guid>
      <description>&lt;p&gt;This is my first post from vim using vimpress.Because of having a low bandwidth connection, I was forced to think for an alternative and vim being as versatile  it can getto throw answers to everything we can think of. Okay, now getting on with the topic at hand what is vimpress and what does it do ?&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Here&amp;rsquo;s how we start, download the script from &lt;a href=&#34;http://www.vim.org/scripts/script.php?script_id=1953&#34;&gt;vim&amp;rsquo;s site&lt;/a&gt;.Put the files blog.vim and blogsyntax.vim in ~/.vim/plugin folder ,if the folder does not exist create one. Open the blog.vim file and fill in your your username and password and site url in their respective places. Open vim and type in CmdLine&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-vim&#34; data-lang=&#34;vim&#34;&gt;:so ~&lt;span style=&#34;color:#ed9d13&#34;&gt;/.vim/&lt;/span&gt;plugin/blog.vim&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;&lt;/span&gt;:so ~&lt;span style=&#34;color:#ed9d13&#34;&gt;/.vim/&lt;/span&gt;plugin/blogsyntax.vim&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;now that you have successfully setup vimpress, you can happily blog away.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>A python debugger for vim</title>
      <link>https://jagan.be/blog/post/j605.wordpress.com/a-python-debugger-for-vim/</link>
      <pubDate>Sat, 08 Oct 2011 10:23:39 +0000</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/j605.wordpress.com/a-python-debugger-for-vim/</guid>
      <description>&lt;p&gt;&amp;ldquo;vim-debug&amp;rdquo; is a python debugger that is integrated into vim. This works like any other debugger but you don&amp;rsquo;t have to come out of vim to debug.Before we get started ensure that the &lt;a href=&#34;http://packages.ubuntu.com/search?keywords=python-pip&#34;&gt;python-pip&lt;/a&gt; package is installed in your distro.For installing open a terminal and type :&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;sudo apt-get install python-pip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The package pip is an improved python package installer.Next we move onto installing the plugin which are essentially python scripts. To install type:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;sudo pip install dbgp
sudo pip install vim-debug
install-vim-debug.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Like any other vim command you type this command in comdline-mode.Here you start the session by the command
Dbg as vim does not seem to accept lower case characters at the beginning of a user defined command.After
the session is started basic ways of operating dbg is shown.For further information on how to operate dbg
you can see the video by Jared Forsyth who is the maintainer for the project.
[youtube=http://www.youtube.com/watch?v=kairdgZCD1U]&lt;/p&gt;
&lt;p&gt;i hope Jared Forsyth comes back successfully from his mission.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Hi to all</title>
      <link>https://jagan.be/blog/post/j605.wordpress.com/hi-to-all/</link>
      <pubDate>Sat, 08 Oct 2011 09:55:41 +0000</pubDate>
      <author>jagannathante@gmail.com (Jagannathan Tiruvallur Eachambadi)</author>
      <guid>https://jagan.be/blog/post/j605.wordpress.com/hi-to-all/</guid>
      <description>&lt;p&gt;Starting this blog right now is a surprise to even me. I am a tech loving person who is a bit reserved. I hope to come out with it with this blog. thats all for now, cheers!!&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
