<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
    <channel>
		<language>en-us</language>
		<title>Srivathsan Murali</title>
		<link>https://srivathsan.me</link>
		<description>Personal Website</description>
		<webMaster>sri@vathsan.com</webMaster>
		
		<item>
			<title>Strip those ANSI symbols</title>
			<pubDate>Thu, 27 Mar 2025 00:00:00 +0000</pubDate>
			<link>https://srivathsan.me//posts/2025/03/27/Strip-those-ANSI-symbols.html</link>
			<guid isPermaLink="true">https://srivathsan.me//posts/2025/03/27/Strip-those-ANSI-symbols.html</guid>
			<description>&lt;p&gt;I have several pet peeves. One I consider to be a &lt;em&gt;programming sin&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Lets imagine, you are asked to integrate a library into your system. You plug it in, call the required API and you run your test executable to see if it works.
Well, you see a wall of white. WHITE&amp;hellip;.&lt;/p&gt;

&lt;p&gt;Of course, the library assumes that the terminal has a dark background and sets foreground colour of its stdout to WHITE. WHYYYYYYYY
Well, sinners aside, how do we handle this on our end besides fixing the damn loggers.&lt;/p&gt;

&lt;p&gt;Simple enough, strip the ANSI colour codes from the executable by piping the output through a ANSI stripper.&lt;/p&gt;

&lt;p&gt;Here are a few ways of doing so.&lt;/p&gt;

&lt;h3 id=&#34;option-1&#34;&gt;Option 1:&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;ansi2txt&lt;/code&gt; from &lt;a href=&#34;https://github.com/kilobyte/colorized-logs&#34; target=&#34;_blank&#34;&gt;colorized-log&lt;/a&gt;. Its a small enough c program that does a single thing.&lt;/p&gt;

&lt;p&gt;This is my preferred option. I just stole the c file and dumped a binary into my dotfiles.&lt;/p&gt;

&lt;h3 id=&#34;option-2&#34;&gt;Option 2:&lt;/h3&gt;

&lt;p&gt;&lt;a href=&#34;https://github.com/andre-simon/ansifilter&#34; target=&#34;_blank&#34;&gt;Ansifilter&lt;/a&gt;, seems a bit too powerful for this usecase. But also does the job.&lt;/p&gt;

&lt;h3 id=&#34;option-3&#34;&gt;Option 3:&lt;/h3&gt;

&lt;p&gt;Pipe through &lt;code&gt;tee&lt;/code&gt;, it generally does a good job at stripping ansi sequences&lt;/p&gt;

&lt;h3 id=&#34;option-4&#34;&gt;Option 4:&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;SED&lt;/strong&gt; IS THERE SOMETHING THIS DOES NOT DO. &amp;lt;3&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;STUPID_CMD | sed -r &amp;quot;s/[[:cntrl:]]\[[0-9]{1,3}m//g&amp;quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&#34;option-5&#34;&gt;Option 5:&lt;/h3&gt;

&lt;p&gt;TR. My dear translate. This solves the issue by replacing all characters that are not either printable or whitespace
This is another elagent solution, if I didn&amp;rsquo;t have the custom &lt;code&gt;ansi2txt&lt;/code&gt; program, this would probably be the way I would go.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;STUPID_CMD | tr -dc &#39;[[:print:][:space:]]&#39;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&#34;options-6-novel-solution-for-macos&#34;&gt;Options 6: Novel solution for macos&lt;/h3&gt;

&lt;p&gt;This seems a bit convoluted, but you could use the clipboard to do it for you.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;STUPID_CMD | pbcopy &amp;amp;&amp;amp; pbpaste
&lt;/code&gt;&lt;/pre&gt;
</description>
		</item>
		
		<item>
			<title>Topographic Map of Singapore</title>
			<pubDate>Wed, 28 Jul 2021 00:00:00 +0000</pubDate>
			<link>https://srivathsan.me//posts/2021/07/28/Topographic-Map-of-Singapore.html</link>
			<guid isPermaLink="true">https://srivathsan.me//posts/2021/07/28/Topographic-Map-of-Singapore.html</guid>
			<description>&lt;p&gt;I recently purchased the &lt;strong&gt;Ender 3 V2&lt;/strong&gt; 3D printer to print miniature for D&amp;amp;D
and it has been great for that. I love being able to print any monster mini I
need for a game. I have also been trying to do other prints with the printer,
simple utility items. I had an idea to make a 3D topography map and as I am
currently living in Singapore I decided to make one of this fine city.&lt;/p&gt;

&lt;p&gt;Turns out Singapore is quite flat, I should have seen this coming. With the
highest point being around 136 metres, its not the best representation of this
process but I wanted to document how I managed to do it.&lt;/p&gt;

&lt;p&gt;Here is the end result.
&lt;img src=&#34;/img/sg_topographic_map.jpg&#34; alt=&#34;sg topographic map&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The process is quite simple:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get the coordinates for the location you want to generate the topographic
map for.&lt;/li&gt;
&lt;li&gt;Use the &lt;a href=&#34;https://jthatch.com/Terrain2STL/&#34; target=&#34;_blank&#34;&gt;Terrain2STL&lt;/a&gt; web app to produce
the topographical map as a stl file.

&lt;ul&gt;
&lt;li&gt;In my case, I scaled the Z axis by 4 to be able to see something three
dimensional.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Pop the stl file into your slicer of choice (I used cura) and generate the
gcode for your printer and print away.&lt;/li&gt;
&lt;li&gt;I did manage to paint the map afterwards just to get more from it but it
looked really with just a coat of primer.&lt;/li&gt;
&lt;/ul&gt;
</description>
		</item>
		
		<item>
			<title>Vdirsyncer and Khard</title>
			<pubDate>Sun, 12 Jul 2020 00:00:00 +0000</pubDate>
			<link>https://srivathsan.me//posts/2020/07/12/vdirsyncer-and-khard.html</link>
			<guid isPermaLink="true">https://srivathsan.me//posts/2020/07/12/vdirsyncer-and-khard.html</guid>
			<description>&lt;p&gt;In the last
&lt;a href=&#34;https://srivathsan.me/posts/2020/07/09/vdirsyncer-and-khal.html&#34; target=&#34;_blank&#34;&gt;post&lt;/a&gt;, I
discussed about how to setup calendar sync using vdirsyncer and how to manage
the calendar in the terminal using khal. In this I will discuss how to sync
your contacts using vdirsyncer and how to manage them using khard.&lt;/p&gt;

&lt;p&gt;As I used Vdirsyncer to sync calendars using CalDAV, in this post, I will use it
sync contacts over CardDAV.
As before I will show installation commands for Arch Linux.&lt;/p&gt;

&lt;h2 id=&#34;setup-vdirsyncer&#34;&gt;Setup Vdirsyncer&lt;/h2&gt;

&lt;p&gt;In the previous post, I explained how to setup sync your calendar with CalDAV,
in this section, I will do that same for contacts. CalDAV and CardDAV are very
similar services that are based on WebDAV. To setup the contacts sync, add the
following section to the vdirsyncer configuration.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-ini&#34;&gt;[pair default_contacts]
a = &amp;quot;defatul_contacts_local&amp;quot;
b = &amp;quot;defatul_contacts_remote&amp;quot;
collections = [&amp;quot;from a&amp;quot;, &amp;quot;from b&amp;quot;]
conflict_resolution = &amp;quot;a wins&amp;quot;

[storage default_contacts_local]
type = &amp;quot;filesystem&amp;quot;
path = &amp;quot;~/.local/share/vdirsyncer/carddav&amp;quot;
fileext = &amp;quot;.vcf&amp;quot;

[storage default_contacts_remote]
type = &amp;quot;carddav&amp;quot;
url = &amp;quot;https://contacts.example.com/carddav&amp;quot;
username = &amp;quot;user@example.com&amp;quot;
password.fetch = [&amp;quot;command&amp;quot;, &amp;quot;pass&amp;quot;, &amp;quot;show&amp;quot;, &amp;quot;email/user@example.com&amp;quot;]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Similar to the calendar setup, the setup for local and remote are separated.
Where the local storage is filesystem folder and the remote storage is a CardDAV
server that you have access.&lt;/p&gt;

&lt;p&gt;Once the config is setup,
make vdirsyncer setup the contacts folder structure and test the remote
connection.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;vdirsyncer discover default_contacts
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once the setup is done, you can sync your contacts using the following command.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;Vdirsyncer sync default_contacts
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I use cron to regularly sync the local and remote contacts.&lt;/p&gt;

&lt;h2 id=&#34;install-and-setup-khard&#34;&gt;Install and setup Khard&lt;/h2&gt;

&lt;p&gt;Now the &lt;a href=&#34;https://en.wikipedia.org/wiki/VCard&#34; target=&#34;_blank&#34;&gt;vCard&lt;/a&gt; files are synced using
vdirsyncer, Khard can be used to manage your address book. Khard is a CLI
application that is super simple to use and can be easily integrated into a
terminal mail client (I will discuss about my email setup soon).&lt;/p&gt;

&lt;p&gt;You can install Khard using the following command.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo pacman -S khard
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Khard needs to be configured to use the synced address book. This is the
configuration I use to access my contact list. It is very much based on the
example config file in the &lt;a href=&#34;https://github.com/scheibler/khard/&#34; target=&#34;_blank&#34;&gt;Khard repo&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-ini&#34;&gt;# ~/.config/khard/khard.conf

[addressbooks]
[[contacts]]
path = ~/.local/share/vdirsyncer/carddav/contacts/

[general]
debug = no
default_action = list
# These are either strings or comma seperated lists
editor = nvim, -i, NONE
merge_editor = vimdiff

[contact table]
display = first_name
group_by_addressbook = no
reverse = no
show_nicknames = no
show_uids = yes
sort = last_name
localize_dates = yes
preferred_phone_number_type = pref, cell, home
preferred_email_address_type = pref, work, home

[vcard]
private_objects = Twitter, Mastodon
preferred_version = 3.0
search_in_source_files = no
skip_unparsable = no
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This configuration file is pretty much the same as the
&lt;a href=&#34;https://github.com/scheibler/khard/blob/develop/doc/source/examples/khard.conf.example&#34; target=&#34;_blank&#34;&gt;example config&lt;/a&gt;
in the repo. I have just modified it to point to the correct address book
directory and change the editor I use. Everything else remains as default.&lt;/p&gt;

&lt;p&gt;With this now configured, I can now access my contacts with the &lt;code&gt;khal list&lt;/code&gt;
command or other commands available to the user.&lt;/p&gt;
</description>
		</item>
		
		<item>
			<title>Vdirsyncer and Khal</title>
			<pubDate>Thu, 09 Jul 2020 00:00:00 +0000</pubDate>
			<link>https://srivathsan.me//posts/2020/07/09/vdirsyncer-and-khal.html</link>
			<guid isPermaLink="true">https://srivathsan.me//posts/2020/07/09/vdirsyncer-and-khal.html</guid>
			<description>&lt;p&gt;Calendar is a very important tool that most people use regularly to manage their
time. I end up setting events for most things. Setting up a easy to use calendar
that is synced across all my devices is important. I use Zoho Mail to host my
email which also provides me with Calendar support. I will describe my calendar
setup on my computers.&lt;/p&gt;

&lt;p&gt;I use &lt;a href=&#34;http://vdirsyncer.pimutils.org/en/stable/&#34; target=&#34;_blank&#34;&gt;vdirsyncer&lt;/a&gt; to synchronize
caldav with local copy of the events and use
&lt;a href=&#34;https://github.com/pimutils/khal&#34; target=&#34;_blank&#34;&gt;Khal&lt;/a&gt; to read and write them.&lt;/p&gt;

&lt;p&gt;All installation commands are shown for Arch Linux, but you should be able to
find packages for most Linux distributions.&lt;/p&gt;

&lt;h2 id=&#34;install-and-setup-vdirsyncer&#34;&gt;Install and setup Vdirsyncer&lt;/h2&gt;

&lt;p&gt;&lt;a href=&#34;https://vdirsyncer.readthedocs.io/en/stable/vdir.html&#34; target=&#34;_blank&#34;&gt;Vdir&lt;/a&gt; is a standard
format to store calendar as a .ics file in the filesystem. We can use vdirsyncer
to events to your CalDAV endpoint.&lt;/p&gt;

&lt;p&gt;First install vdirsyncer using the following command.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo pacman -Ss calcurse
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once vdirsyncer is installed, you can setup CalDAV synchronization using the
following config at &amp;lsquo;$HOME/.config/vdirsyncer/config&amp;rsquo;&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-ini&#34;&gt;# $HOME/.config/vdirsyncer/config
[general]
status_path = &amp;quot;~/.local/share/vdirsyncer/status/&amp;quot;

[pair default_calendar]
a = &amp;quot;default_calendar_local&amp;quot;
b = &amp;quot;default_calendar_remote&amp;quot;
collections = [&amp;quot;from a&amp;quot;, &amp;quot;from b&amp;quot;]
metadata = [&amp;quot;color&amp;quot;]

[storage default_calendar_local]
type=&amp;quot;filesystem&amp;quot;
path=&amp;quot;~/.local/share/vdirsyncer/calendars/&amp;quot;
fileext = &amp;quot;.ics&amp;quot;

[storage default_calendar_remote]
type=&amp;quot;caldav&amp;quot;
url=&amp;quot;https://calendar.example.com/caldav/&amp;quot;
username=&amp;quot;user@example.com&amp;quot;
password.fetch = [&amp;quot;command&amp;quot;, &amp;quot;pass&amp;quot;, &amp;quot;show&amp;quot;, &amp;quot;user@example.com&amp;quot;]
# password = &amp;quot;Password1234&amp;quot; # If you would like to store password directly.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The config is quite simple, you setup the local and remote location to store
calendar. The only information you need is the CalDAV endpoint for your
calendar.&lt;/p&gt;

&lt;p&gt;Once the config is setup,
make vdirsyncer setup the calendar folder structure and test the remote
connection.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;vdirsyncer discover default_calendar
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once the setup is done, you can sync your calendar using the following command.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;Vdirsyncer sync default_calendar
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I use cron to regularly sync the local and remote calendars.&lt;/p&gt;

&lt;h2 id=&#34;install-and-setup-khal&#34;&gt;Install and setup Khal&lt;/h2&gt;

&lt;p&gt;Khal is a CLI calendar program. It allows you to read and write to a vdir
folder. With vdirsyncer syncing the CalDAV, I use khal to manage my calendar
from my terminal. It also enables me to add events from my terminal email
client, &lt;a href=&#34;https://aerc-mail.org&#34; target=&#34;_blank&#34;&gt;aerc&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can install Khal using the following command&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo pacman -S khal
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once you have installed khal, we can point khal to use the calendar we sync with
vdirsyncer. This is a example configuration of the khal config file.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-ini&#34;&gt;# $HOME/.config/khal/config
[calendars]
[[default]]
path = ~/.local/share/vdirsyncer/calendars/events/
type = calendar
color = dark green

[locale]
timeformat = %I:%M %p
dateformat = %d/%m/%Y
longdateformat = %d/%m/%Y
datetimeformat = %d/%m/%Y %I:%M %p
longdatetimeformat = %d/%m/%Y %I:%M %p
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once the setup is completed, you can access the list of events using either
&lt;code&gt;khal list&lt;/code&gt; or &lt;code&gt;khal calendar&lt;/code&gt;. To create an event, you can use &lt;code&gt;khal new&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you have an ics calendar file, you can use &lt;code&gt;khal import &amp;lt;ics file&amp;gt;&lt;/code&gt;. Or if
you need to interactively browse through the calendar, you can use &lt;code&gt;ikhal&lt;/code&gt;.&lt;/p&gt;
</description>
		</item>
		
		<item>
			<title>Curse of Strahd</title>
			<pubDate>Mon, 06 Jul 2020 00:00:00 +0000</pubDate>
			<link>https://srivathsan.me//posts/2020/07/06/Curse-of-Strahd.html</link>
			<guid isPermaLink="true">https://srivathsan.me//posts/2020/07/06/Curse-of-Strahd.html</guid>
			<description>&lt;p&gt;&lt;em&gt;Strahd Von Zarovich&lt;/em&gt;, is one of the best written villain in the D&amp;amp;D mutliverse.
His backstory thrusts the party into a wonderful story about an endless life and
power; and what that how that transforms Strahd and his conquered land into
realm into eternal darkness and death.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Curse of Strahd&lt;/em&gt;, brings the brilliant story of the dark lord as a excellent
Gothic horror, where the characters are always looking behind their backs. If
you would like to learn more about the actual adventure, I recommend buying the
book. The book is very well written and I will not do it justice.&lt;/p&gt;

&lt;p&gt;I am going to be talking about the changes I made to the game as I ran it and
where I stole some ideas for the game from. I will also talk about some of the
challenges I faced as the DM for this campaign.&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&amp;mdash;&amp;mdash;&amp;ndash; Spoilers Ahead &amp;mdash;&amp;mdash;&amp;ndash;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scale.&lt;/strong&gt; There is a significant problem I have with the scale of the map of
Barovia. As written, the you can travel from one end of the map to the other end
in about 4-5 hours, if you are get lucky that is. If you are unlucky, you could
be killed by werewolves, hags, druids, Strahd randomly walking around and a very
mean lady in a hut if you get lost. It is ridiculous that a level 3 party might
go out of the first village and get caught by a hag coven after walking for 2
hours. I personally scaled up the map so that it takes four days to travel
across the map. This also has the added benefit of making sure, the party camps
out at night. Because in my opinion the best parts of the campaign are the
intrigue in the cities and everything else in the forests. The more time, they
spend travelling, the more time to build up horror.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Card Reading as Adventure Hook.&lt;/strong&gt; Using the card reading as an adventure hook
is introduced by
&lt;a href=&#34;https://www.reddit.com/r/CurseofStrahd/comments/9bpzbh/curse_of_strahd_reloaded_compilation_thread/&#34; target=&#34;_blank&#34;&gt;DragnaCarta&lt;/a&gt;,
as a plot hook to get the characters invested in saving Barovia. With this at
the start of the campaign, every character gets a vision from Madam Eva in which
she tells to seek her out and get a card reading. They then wake up with a card
that they bring to her in the adventure. This also helps in dropping bread
crumbs to various adventures in Barovia. It helps the DM to connect the
player character&amp;rsquo;s back stories to the story of Barovia.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tome of Strahd.&lt;/strong&gt; The Tome of Strahd, is a great story device that lets the
party learn about the Strahd&amp;rsquo;s story. But I think, giving the players a big info
dump when you get the book doesn&amp;rsquo;t feel like a lot of fun. In order to make
understanding Strahd&amp;rsquo;s story in more bite sized manner, I made the book itself
enchanted to protect whats written. This makes it an ongoing skill challenge to
decrypt whats written. Of course, this is not an original idea, many have done
this before. I stole the idea from
&lt;a href=&#34;https://www.reddit.com/r/CurseofStrahd/comments/8zo4im/tome_of_strahd_rework_an_object_of_study/&#34; target=&#34;_blank&#34;&gt;this&lt;/a&gt;
post on reddit. I did modify it but the post explains the gist of it.&lt;/p&gt;

&lt;p&gt;The Tome as provided in the adventure module is very small for an actual
journal. I used the
&lt;a href=&#34;https://docs.google.com/document/d/1r5fOwaV5oV4rr5fMTlEOIfJrefASZMBVF5ywacvJp38/edit&#34; target=&#34;_blank&#34;&gt;extended tome&lt;/a&gt;
which includes more information from the &amp;lsquo;I, Strahd&amp;rsquo; novel.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fanes.&lt;/strong&gt; Strahd defeated the three archfey ladies to gain control of the land.
This is done by desecrating the three fanes corresponding to each lady of the
land. I was able to intertwine the adventure of slowly reconsecrating the fanes
and draining Strahd&amp;rsquo;s power over the land with the back story of a character.
This also lets the players be more invested in the rest of Barovia instead of
just doing the adventures to level up to fight Strahd. I gathered this idea from
MandyMod&amp;rsquo;s &lt;a href=&#34;https://www.reddit.com/r/CurseofStrahd/comments/9l5zfh/fleshing_out_curse_of_strahd_the_fanes_and_the/&#34; target=&#34;_blank&#34;&gt;Fanes of Barovia
post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lancelot.&lt;/strong&gt; For an extra bit of drama, I gave the party a puppy. First, it
gives the party some kind of familiarity in this dark realm. At the same time
adds an extra being to worry about. My party carried the puppy all the way to
the end of the campaign slowly trailing it all the way. This could also be a
good way to nudge the party find Gertrude if you make the puppy hers.&lt;/p&gt;

&lt;h3 id=&#34;important-resources&#34;&gt;Important Resources&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://reddit.com/r/curseofstrahd&#34; target=&#34;_blank&#34;&gt;r/CurseOfStrahd&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.reddit.com/r/CurseofStrahd/comments/9bpzbh/curse_of_strahd_reloaded_compilation_thread/&#34; target=&#34;_blank&#34;&gt;Curse of Strahd: Reloaded by
DragnaCarta&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.reddit.com/r/CurseofStrahd/comments/9pbka6/fleshing_out_curse_of_strahd_master_table_of/&#34; target=&#34;_blank&#34;&gt;Fleshing Out Curse of Strahd by
MandyMod&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/playlist?list=PLHEmO3yycE8rmaxTJ3V8X_6Pu-crA_ofo&#34; target=&#34;_blank&#34;&gt;Curse of Strahd Ambience Music by Sword Coast
Soundscapes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=oxvDnaWe5XE&#34; target=&#34;_blank&#34;&gt;hp lovecraft ambience music&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Curse of Strahd is a beautifully written adventure that has potential to tell an
extraordinary story along with your group. I hope this has been useful :D&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;&amp;ldquo;I am the Ancient&amp;hellip; I am the Land&amp;rdquo; ─ Strahd Von Zarovich&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
</description>
		</item>
		
		<item>
			<title>Writing my next campaign</title>
			<pubDate>Fri, 03 Jul 2020 00:00:00 +0000</pubDate>
			<link>https://srivathsan.me//posts/2020/07/03/Writing-my-next-campaign.html</link>
			<guid isPermaLink="true">https://srivathsan.me//posts/2020/07/03/Writing-my-next-campaign.html</guid>
			<description>&lt;p&gt;I have been playing D&amp;amp;D for the last three years and I absolutely love it. Like
most people who start with D&amp;amp;D 5e, I played Dwarf Cleric in a &amp;ldquo;Lost mines of
Phandelver&amp;rdquo; campaign. This led me to run three campaigns with two different
groups of people over the last two years. And I have never felt joy in a hobby
before. This post is going to walk through my current process to how I plan my
campaigns and how I would like to improve.&lt;/p&gt;

&lt;p&gt;The first campaign I ran was &lt;a href=&#34;https://dnd.wizards.com/products/tabletop-games/rpg-products/curse-strahd&#34; target=&#34;_blank&#34;&gt;Curse of
Strahd&lt;/a&gt;
, one of the finest adventures that were written. Being the first long term
campaign I ran, I went for a pre-written campaign.
The adventure was augmented with modifications that I homebrewed or ones I
stole from the &lt;a href=&#34;https://reddit.com/r/curseofstrahd&#34; target=&#34;_blank&#34;&gt;subreddit&lt;/a&gt; for it. I will
write a post on this adventure in the future.&lt;/p&gt;

&lt;p&gt;I ran the same homebrew campaigns that I wrote for two different groups and they
couldn&amp;rsquo;t have gone in two different ways. This time I decided to write a
campaign because I saw a how elemental energy was used in the
&lt;a href=&#34;https://www.imdb.com/title/tt8652642/?ref_=fn_al_tt_1&#34; target=&#34;_blank&#34;&gt;Wu Assassins&lt;/a&gt;
TV show. The show was quite bad but this gave me the idea of elemental nodes
being spit out in the world and what would happen if one person had control over
all four elemental powers.&lt;/p&gt;

&lt;p&gt;So my current process to write a campaign is to build only upto 3 sessions
forward. When I started with my homebrew campaign, I didn&amp;rsquo;t have any idea beside
the fact that I wanted to have a node thrust into the world for each element.
Beyond which, I didn&amp;rsquo;t have much and I went along this path.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Draw map for my world, &lt;img src=&#34;/img/ryk.png&#34; alt=&#34;Ryk&#34; /&gt;.&lt;/li&gt;
&lt;li&gt;Write the first session adventure and build up the village where it would
happen.&lt;/li&gt;
&lt;li&gt;And then write session by session.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This worked for the first part of campaign, as I could keep up with the party
considering the nodes as the point of focus. As the party become more powerful
and started gathering these nodes, I had to quickly scramble for a final villain
and why they are gathering the nodes.&lt;/p&gt;

&lt;p&gt;This become more of a problem as I ran the campaign for two groups at the same
time. Of course, they didn&amp;rsquo;t approach the game in the same manner. Different
cities, continents and different reactions to NPCs.&lt;/p&gt;

&lt;p&gt;As the two campaign as coming to a close, I think, there is significant lack of
sense of dread that I enjoyed in the Curse of Strahd campaign. The parties also
were not as into the main villain as there were not as many breadcrumbs I left
in the start of the campaign.&lt;/p&gt;

&lt;p&gt;Things I learnt from running Curse of Strahd and my homebrew campaign.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Decide what you want the endgame to be about&lt;/strong&gt;. Its easier to lay
breadcrumbs.&lt;/li&gt;
&lt;li&gt;Build your map or steal one. But having a general overview is useful. I also
like drawing maps. So yay.&lt;/li&gt;
&lt;li&gt;Have a common concept/idea for the enemies that is related to the endgame.&lt;/li&gt;
&lt;li&gt;Figure out how to build the Player Character backstories into the world.&lt;/li&gt;
&lt;li&gt;Write basic information about important factions and organizations.&lt;/li&gt;
&lt;li&gt;Writing each city as you go is fine. Fill in NPCs from factions as you go.&lt;/li&gt;
&lt;li&gt;Maybe not run two groups if possible at least not the same campaign.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I have learnt a lot by running these campaign. I have come to enjoy D&amp;amp;D very
much and can&amp;rsquo;t wait to run another one. For the next one, I am thinking about a
wild west style campaign with very little magic.&lt;/p&gt;
</description>
		</item>
		
		<item>
			<title>Common Website Practices</title>
			<pubDate>Sat, 27 Jun 2020 00:00:00 +0000</pubDate>
			<link>https://srivathsan.me//posts/2020/06/27/Common-Website-Practices.html</link>
			<guid isPermaLink="true">https://srivathsan.me//posts/2020/06/27/Common-Website-Practices.html</guid>
			<description>&lt;p&gt;I have failed to build a ongoing blog many times. But always had followed
many of them. I want to collect some common practices that I see in blogging
practices and give my thoughts on. Just as a note to myself when I eventually
decide to rebuild this blog once again. FYI, this will be evolving list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) HTTPS is a must.&lt;/strong&gt;&lt;br&gt;
Totally agree with this one. With &lt;a href=&#34;https://letsencrypt.org/&#34; target=&#34;_blank&#34;&gt;Let&amp;rsquo;s Encrypt&lt;/a&gt;
being an awesome non-profit Certificate authority, there is no reason, one
should not have ssl certificates setup. Its 2020, this is the least expected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) RSS is still pretty good.&lt;/strong&gt;&lt;br&gt;
RSS is great and all blogs should have one. I tend not to follow blogs which
don&amp;rsquo;t have rss feeds. Its just simpler.&lt;/p&gt;

&lt;p&gt;Also add RSS &lt;a href=&#34;https://www.petefreitag.com/item/384.cfm&#34; target=&#34;_blank&#34;&gt;auto discovery&lt;/a&gt; to all
pages on your site.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Dynamic websites are an overkill.&lt;/strong&gt;&lt;br&gt;
Dynamic websites do make things easier but for a blog that is maintained by one
single person, it is overkill. Static sites load faster and you don&amp;rsquo;t need any
dynamic content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Keep the website minimal.&lt;/strong&gt;&lt;br&gt;
People go to blog to read and it is always good to make the website simple to
navigate and fast to load. No need for fancy JS or any moving parts.&lt;/p&gt;
</description>
		</item>
		
		<item>
			<title>Linux 101 - firewall</title>
			<pubDate>Mon, 06 Jan 2020 00:00:00 +0000</pubDate>
			<link>https://srivathsan.me//posts/2020/01/06/Linux101-firewall.html</link>
			<guid isPermaLink="true">https://srivathsan.me//posts/2020/01/06/Linux101-firewall.html</guid>
			<description>&lt;p&gt;Firewall is a utility that is used to filter packet traffic in a
network. It is used to whitelist traffic certain ports. Moreover, the
protool used can also filtered.&lt;/p&gt;

&lt;p&gt;Whitelisting is the process of denying all traffic except a choice few.
This can be used to secure your server by restricting access to ports
and services you don&amp;rsquo;t want to be public.&lt;/p&gt;

&lt;p&gt;You could allow certian ports to be available only from certain IP&amp;rsquo;s.
In this way, you can allow a trusted network to have access to your
services while denying access from other IPs.&lt;/p&gt;

&lt;p&gt;Iptables is the command line utility used to manage the linux&amp;rsquo;s kernel
level firewall. Though, the kernel firewall can be configured using
iptables command. It is often configured using a frontend.&lt;/p&gt;

&lt;h2 id=&#34;uncomplicated-firewall-ufw&#34;&gt;Uncomplicated Firewall (ufw)&lt;/h2&gt;

&lt;p&gt;Ufw or the aptly named Uncomplicated Firewall is an easy to use fronted
to iptables.&lt;/p&gt;

&lt;h3 id=&#34;install&#34;&gt;Install&lt;/h3&gt;

&lt;p&gt;This is the default firewall in ubuntu and debian and it should be
installed by default.&lt;/p&gt;

&lt;p&gt;If you do use other linux distributions, it should be easy enough to
find the required package to install. In archlinux, it can be installed
by running the following command.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo pacman -S ufw
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once installed, the utility is inactive by default and needs to be
enabled to use. But be careful, if you are setting up the service on a
server via SSH, you must allow ssh before enabling Ufw otherwise you
might find yourself locked out of your machine.&lt;/p&gt;

&lt;h3 id=&#34;enable-and-disable&#34;&gt;Enable and Disable&lt;/h3&gt;

&lt;p&gt;The utility is enabled in two steps, you need to make sure that the
&lt;code&gt;ufw.service&lt;/code&gt; unit is enabled started in systemd. You can use the
following command to do that.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo systemctl enable --now ufw.service
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;the &lt;code&gt;--now&lt;/code&gt; flag also starts the service after enabling it.&lt;/p&gt;

&lt;p&gt;Now that the ufw daemon is up and running, it is time to enable the
firewall by using&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo ufw enable
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can check the ufw status using the &lt;code&gt;sudo ufw status&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;To disable the firewall simply run the &lt;code&gt;sudo ufw disable&lt;/code&gt;&lt;/p&gt;

&lt;h3 id=&#34;configuring-your-firewall&#34;&gt;Configuring your firewall&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;sudo ufw status&lt;/code&gt; will show you the list of rules that are active. This
can be changed using the following commands.&lt;/p&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;command&lt;/th&gt;
&lt;th&gt;description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;

&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sudo ufw allow RULE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Allow traffic that matches given rule&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sudo ufw deny RULE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Deny traffic that matches given rule&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sudo ufw reject RULE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;rejects traffic that matches given rule&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sudo ufw limit RULE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;deny if more than 5 requests in the last 30 seconds&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sudo ufw delete RULE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;delete a given rule&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;h3 id=&#34;rule-syntax&#34;&gt;Rule Syntax&lt;/h3&gt;

&lt;p&gt;The rules can be specified as a string that includes the port
number and optionally the protocol.&lt;/p&gt;

&lt;p&gt;For example the rule for SSH can is &lt;code&gt;22/tcp&lt;/code&gt;, where 22 is the port used
by ssh servers by default and tcp is the protocol that is used. If a
protocol is not specified, both tcp and udp protocols would satisfy the
rule.&lt;/p&gt;

&lt;p&gt;So if you would like to enable ssh access to the machine, you can run
the following command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo ufw allow 22/tcp
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In case of services like ssh, you can also use the service name to use
the list of known services by ufw. This list can be found in
/etc/services.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo ufw allow ssh
# equivalent to
# sudo ufw allow 22/tcp

sudo ufw allow http
# sudo ufw allow 80/tcp
sudo ufw allow https
# sudo ufw allow 443/tcp
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This list only specifies the default ports. If you use different ports,
please set the rules by yourself.&lt;/p&gt;

&lt;p&gt;The full syntax can be used to specify a bit more information and more
intricate rules.&lt;/p&gt;

&lt;p&gt;For example, to allow ssh in the full syntax, you use the following
command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo ufw allow proto tcp to any port 22
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The rules can also be specified using a full syntax. It lets you
configure the firewall in more intricate manner. But most cases the
simple syntax explained here should suffice. If you would like learn
more about the other capabilities of or the full syntax a simple command
will help you &lt;code&gt;man ufw&lt;/code&gt;.&lt;/p&gt;
</description>
		</item>
		
    </channel>
</rss>
