<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>miccah.io</title><link>https://miccah.io/</link><description>Recent content on miccah.io</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 11 Aug 2026 09:00:00 +0000</lastBuildDate><atom:link href="https://miccah.io/index.xml" rel="self" type="application/rss+xml"/><item><title>Ergonomic SSH development</title><link>https://miccah.io/posts/2026-08-11-ergonomic-ssh-development/</link><pubDate>Tue, 11 Aug 2026 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2026-08-11-ergonomic-ssh-development/</guid><description>&lt;p>I&amp;rsquo;ve been setting up a &lt;code>dev&lt;/code> machine on my home server and doing all of my
personal projects remotely over &lt;code>SSH&lt;/code>. I&amp;rsquo;ve fiddled quite a bit with the system
to make it ergonomic, so here are some of the things I&amp;rsquo;m quite happy with.&lt;/p>
&lt;h2 id="tmux-autocompletions">Tmux autocompletions&lt;/h2>
&lt;p>Of course, &lt;code>tmux&lt;/code> is a t-must! One of the cool things about &lt;code>tmux&lt;/code> is that you
can programmatically read the contents of a pane via &lt;code>tmux capture-pane -S- -pt $PANE_ID&lt;/code>, which means you can plug this data into autocomplete engines.&lt;/p></description></item><item><title>My NixOS dev machine</title><link>https://miccah.io/posts/2026-08-01-my-nixos-dev-machine/</link><pubDate>Sat, 01 Aug 2026 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2026-08-01-my-nixos-dev-machine/</guid><description>&lt;p>I have a home server that I built primarily for &amp;ldquo;cloud&amp;rdquo; gaming (read more about
that &lt;a href="https://miccah.io/posts/2026-07-03-home-cloud-gaming-server/">here&lt;/a>). I&amp;rsquo;m running Proxmox so I can install other services, one of which
is my notes machine. After many years of experimentation, I&amp;rsquo;ve landed on a
system that I like: I &lt;code>ssh notes@notes&lt;/code> which drops me directly into &lt;code>nvim -c VimwikiMakeDiaryNote&lt;/code> and disconnects on close. It&amp;rsquo;s a very lightweight version
of an SSH app, which I&amp;rsquo;m starting to realize I like quite a bit.&lt;/p></description></item><item><title>Home cloud gaming server</title><link>https://miccah.io/posts/2026-07-03-home-cloud-gaming-server/</link><pubDate>Fri, 03 Jul 2026 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2026-07-03-home-cloud-gaming-server/</guid><description>&lt;p>At the end of 2024 I decided to build a new gaming PC. My existing one was a
typical tower computer from 2012 that was big and loud and too old to run
&lt;em>Elden Ring&lt;/em>! So I decided it was time to make a new build, but this time, I
wanted to do it a little different. I wasn&amp;rsquo;t thrilled with the idea of having a
large and loud tower at my desk, so I thought it would be fun to build a server
that could stream games to my laptop.&lt;/p></description></item><item><title>WireGuard is simply elegant</title><link>https://miccah.io/posts/2026-03-30-wireguard-is-simply-elegant/</link><pubDate>Mon, 30 Mar 2026 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2026-03-30-wireguard-is-simply-elegant/</guid><description>&lt;p>&lt;a href="https://tailscale.com/" rel="external" class="sym">WireGuard&lt;/a> is a secure, easy to use, and simple VPN
solution that is the underlying technology for
&lt;a href="https://tailscale.com/" rel="external" class="sym">Tailscale&lt;/a>. I&amp;rsquo;ve personally used it in both flavors
and have been very happy with its reliability and the fact that it &amp;ldquo;just
works.&amp;rdquo; So this week, I decided to learn how it &lt;em>can&lt;/em> &amp;ldquo;just work&amp;rdquo; by reading
the &lt;a href="https://miccah.io/assets/wireguard.pdf">whitepaper&lt;/a> describing its design and also watching
the &lt;a href="https://www.youtube.com/watch?v=88GyLoZbDNw" rel="external" class="sym">2018 BlackHat keynote&lt;/a>.&lt;/p>
&lt;p>While I enjoy exploring the technical details of a secure communication
protocol¹ and will dive into that later, I want to take some time to appreciate
the simple elegance of the WireGuard protocol that I strive to match in my own
work.&lt;/p></description></item><item><title>2025 Reflections and 2026 Goals</title><link>https://miccah.io/posts/2026-01-06-2025-reflections/</link><pubDate>Tue, 06 Jan 2026 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2026-01-06-2025-reflections/</guid><description>&lt;p>It seems like 2025 came and went in a flash. Looking back, I&amp;rsquo;m happy to say
that I continued being social and made some more friends.&lt;/p>
&lt;p>This past year, I..&lt;/p>
&lt;details>
 &lt;summary>&lt;strong>Built a home server&lt;/strong>&lt;/summary>
 &lt;div>&lt;p>Okay, I actually built it in 2024, but I used it a lot this year and had a lot
of fun setting up VMs with &lt;a href="https://www.proxmox.com/en/" rel="external" class="sym">Proxmox&lt;/a>. I keep all
of my notes there, a gaming VM, and various media containers too. It may be
recency bias, but I installed &lt;a href="https://immich.app/" rel="external" class="sym">immich&lt;/a> and have had a
great experience with it, and even started a
&lt;a href="https://github.com/miccah/immich-photo-frame" rel="external" class="sym">photo frame project&lt;/a> that
has been a lot of fun.&lt;/p></description></item><item><title>An unexpected benefit to keeping notes</title><link>https://miccah.io/posts/2025-05-17-notes/</link><pubDate>Sat, 17 May 2025 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2025-05-17-notes/</guid><description>&lt;p>I keep a weekly journal of notable events, my feelings, and ideas. Most of the
time, the value I get out of doing this comes from the act of writing it down
in the moment. Writing notable events helps my memory, writing my feelings
helps me understand and let them go, and writing my ideas helps me refine them.&lt;/p>
&lt;p>This is largely unsurprising and overall very valuable to my mental health, but
occasionally I look back over the years of notes and regain a perspective of
myself that I so easily forget: I&amp;rsquo;m &lt;em>awesome&lt;/em>. I&amp;rsquo;m not saying this to brag!
Living day by day and falling into the rhythm of life really makes me forget
all of the awesome shit I&amp;rsquo;ve done in the past. When I read about all of that in
my own words, I often think, &amp;ldquo;how the hell did I do that?&amp;rdquo;&lt;/p></description></item><item><title>2023 Reflections and 2024 Goals</title><link>https://miccah.io/posts/2024-11-01-2023-reflections/</link><pubDate>Fri, 01 Nov 2024 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2024-11-01-2023-reflections/</guid><description>&lt;p>Okay, I know I&amp;rsquo;m &lt;em>finally&lt;/em> finishing this post in NOVEMBER when 2024 is almost
over, and it was mainly postponed because I lacked 2024 goals. So I&amp;rsquo;ve
reflected on why and shared my thoughts below.&lt;/p>
&lt;p>But first, 2023 reflections! I made a &lt;em>huge&lt;/em> life change that made it a great
year for me.&lt;/p>
&lt;details>
 &lt;summary>&lt;strong>I moved to Seattle!&lt;/strong>&lt;/summary>
 &lt;div>&lt;p>It took me awhile to get everything ready and find a place to rent, but I
finally did it! I chose Seattle for a few reasons. The nature in the Pacific
Northwest really calls to me, and I want to go on hikes and enjoy it. I also
have a few friends in Seattle, so it was an easier transition socially.
Finally, Seattle has a pretty good tech scene, so I&amp;rsquo;ll have more opportunities
to make friends. So far, I really love it here and am grateful I made the jump!&lt;/p></description></item><item><title>Scripting a Zoho catch-all filter</title><link>https://miccah.io/posts/2023-10-18-scripting-a-zoho-catch-all-filter/</link><pubDate>Wed, 18 Oct 2023 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2023-10-18-scripting-a-zoho-catch-all-filter/</guid><description>&lt;p>I use &lt;a href="https://www.zoho.com/mail/" rel="external" class="sym">Zoho&lt;/a> as my email provider, and I recently
learned that &lt;a href="https://www.zoho.com/mail/help/adminconsole/catch-all-setup.html" rel="external" class="sym">you can setup a catch-all forwarding address&lt;/a>. This is pretty great,
because that means I can receive any email sent to my domain! Go ahead, &lt;a href="mailto:lol@miccah.io" rel="external" class="sym">try it&lt;/a>.&lt;/p>
&lt;p>I want to sort the emails I receive into their own folder, though, depending on
the delivery address (for example, &lt;code>lol@miccah.io&lt;/code> will go to
&lt;code>/catch-all/lol&lt;/code>). It turns out, Zoho supports custom mail filters using a
scripting DSL called &lt;a href="https://www.zoho.com/deluge/" rel="external" class="sym">deluge&lt;/a>, so I wrote one!&lt;/p></description></item><item><title>Some git aliases</title><link>https://miccah.io/posts/2023-07-26-some-git-aliases/</link><pubDate>Wed, 26 Jul 2023 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2023-07-26-some-git-aliases/</guid><description>&lt;p>Have you ever wanted to know&lt;/p>
&lt;p>I definitely stole these from somewhere.&lt;/p>
&lt;pre tabindex="0">&lt;code>[alias]
 checkout-pr = !sh -c &amp;#39;git fetch origin pull/$1/head:pr/$1 &amp;amp;&amp;amp; git checkout pr/$1&amp;#39; -
 oldest-ancestor = !zsh -c &amp;#39;diff -u &amp;lt;(git rev-list --first-parent &amp;#34;${1:-main}&amp;#34;) &amp;lt;(git rev-list --first-parent &amp;#34;${2:-HEAD}&amp;#34;) | sed -ne \&amp;#34;s/^ //p\&amp;#34; | head -1&amp;#39; -
 branch-files = !sh -c &amp;#39;git diff --name-only --no-merges --first-parent $(git oldest-ancestor origin/main)..HEAD | cat&amp;#39;
&lt;/code>&lt;/pre></description></item><item><title>Not leetcode</title><link>https://miccah.io/posts/2023-05-13-not-leetcode/</link><pubDate>Sat, 13 May 2023 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2023-05-13-not-leetcode/</guid><description>&lt;p>Leetcode, for those who don&amp;rsquo;t know, is a collection of data structures and
algorithms programming challenges. More often than not, I find it difficult to
maintain interest in the problems because they all seem so contrived and it&amp;rsquo;s
not that rewarding to solve.&lt;/p>
&lt;p>There are plenty of articles about what&amp;rsquo;s wrong with leetcode, so instead, I&amp;rsquo;m
going to share some alternatives that I have found much more engaging and
actually useful. For what it&amp;rsquo;s worth, these challenges tend to be more involved
than ones you would find on leetcode.&lt;/p></description></item><item><title>Practical git usage</title><link>https://miccah.io/posts/2023-04-09-practical-git/</link><pubDate>Sun, 09 Apr 2023 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2023-04-09-practical-git/</guid><description>&lt;p>I use &lt;code>git&lt;/code> almost daily both personally and professionally, and my usage
follows a pretty regular pattern. By sticking to this pattern, I rarely get
into a sticky situation or unexpected state. As many can attest, &lt;code>git&lt;/code> is a
beast of a CLI tool, but these workflows have been enough to keep my projects
organized.&lt;/p>
&lt;h3 id="personal-usage">Personal usage&lt;/h3>
&lt;p>Repositories where you&amp;rsquo;re the sole contributor are a lot easier to manage than a
group project, so let&amp;rsquo;s start with that. Here&amp;rsquo;s my workflow:&lt;/p></description></item><item><title>What are Go interfaces?</title><link>https://miccah.io/posts/2023-02-25-go-interfaces/</link><pubDate>Sat, 25 Feb 2023 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2023-02-25-go-interfaces/</guid><description>&lt;p>I was talking to my coworker about interfaces when the question arose about why
a concrete slice has to manually be converted into an interface slice. I&amp;rsquo;ll
demonstrate this as a simple example.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go" data-lang="go">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">ints&lt;/span> &lt;span style="color:#f92672">:=&lt;/span> []&lt;span style="color:#66d9ef">int&lt;/span>{&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">3&lt;/span>, &lt;span style="color:#ae81ff">3&lt;/span>, &lt;span style="color:#ae81ff">7&lt;/span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">anys&lt;/span> []&lt;span style="color:#a6e22e">any&lt;/span> = &lt;span style="color:#a6e22e">ints&lt;/span> &lt;span style="color:#75715e">// Error!
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// cannot use ints (variable of type []int) as type []any in variable declaration
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This is perhaps surprising because semantically every &lt;code>int&lt;/code> is an &lt;code>any&lt;/code>, so why
doesn&amp;rsquo;t it work? I told my coworker it was because elements in a slice must all
have the same size, and interfaces are wide pointers. It was a good enough
explanation at the time, but it got me wondering.. are interfaces really wide
pointers? How are they actually represented at runtime?&lt;/p></description></item><item><title>I am not interested in AI tools</title><link>https://miccah.io/posts/2023-02-18-ai-tools/</link><pubDate>Sat, 18 Feb 2023 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2023-02-18-ai-tools/</guid><description>&lt;p>There&amp;rsquo;s certainly good arguments for using AI tools like &lt;em>GitHub Copilot&lt;/em> or
&lt;em>ChatGPT&lt;/em>, and there are certainly good arguments against them. This post isn&amp;rsquo;t
about either. Instead, here&amp;rsquo;s my anecdote as to why I haven&amp;rsquo;t felt drawn to
even try them out.&lt;/p>
&lt;p>I was talking to a friend about &lt;em>DALL-E&lt;/em> and how it is affecting the art
community. The whole AI art gave me this odd dystopian feeling that I couldn&amp;rsquo;t
quite articulate until this conversation. She told me that art isn&amp;rsquo;t about the
end result. Artists make art because they love the process of making art.&lt;/p></description></item><item><title>2022 Reflections and 2023 Goals</title><link>https://miccah.io/posts/2023-01-04-2022-reflections/</link><pubDate>Wed, 04 Jan 2023 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2023-01-04-2022-reflections/</guid><description>&lt;p>2022 was a good year for me. I grew, gained more confidence, made new friends
and reconnected with old ones.&lt;/p>
&lt;p>Here&amp;rsquo;s a laundry list of what happened in 2022 and my thoughts on them.&lt;/p>
&lt;details>
 &lt;summary>&lt;strong>Started keeping a diary&lt;/strong>&lt;/summary>
 &lt;div>For some reason, I like recording things. At the beginning of the year I
started using &lt;a href="https://vimwiki.github.io/" rel="external" class="sym">vimwiki&lt;/a> and was able to tweak it to my liking. In the past
I had used &lt;a href="https://zim-wiki.org/" rel="external" class="sym">zim&lt;/a> which I loved for its hierarchical structure and image
embedding, but I eventually stopped using it. I&amp;rsquo;ve been able to stick with
&lt;code>viwiki&lt;/code> this year, and I quite like having each diary entry be for the week
(Monday - Sunday). The best part is that I started adding summaries for each
week and month on the index, so I can glance through my past highlights.&lt;/div>
&lt;/details>

&lt;details>
 &lt;summary>&lt;strong>Never-graduated from Recurse&lt;/strong>&lt;/summary>
 &lt;div>At the end of 2021 I decided to join the &lt;a href="https://www.recurse.com/scout/click?t=bd78c8b557bd3fa6fb1a1e026cb63ddd" rel="external" class="sym">Recurse Center&lt;/a>.
I was in a 12 week batch (W1'21) that ended in February of 2022, and I
absolutely loved my time there. I made many friends and joined a community that
connects me with amazingly kind people that are as interested in programming as
I am! I&amp;rsquo;m so grateful that I can&amp;rsquo;t ever graduate, and it has been a constant
source of positive engagement and discourse throughout 2022.&lt;/div>
&lt;/details>

&lt;details>
 &lt;summary>&lt;strong>Started working at a security company&lt;/strong>&lt;/summary>
 &lt;div>Thanks to the &lt;a href="https://www.recurse.com/scout/click?t=bd78c8b557bd3fa6fb1a1e026cb63ddd" rel="external" class="sym">Recurse Center&lt;/a> career services, I &lt;a href="https://miccah.io/posts/interviewing.html" rel="external" class="sym">interviewed a ton&lt;/a> and was able
to land an amazing job. I was specifically looking for a place with good culture
that is fully remote, in the security industry, and mainly writing &lt;a href="https://miccah.io/knowledge/golang.html" rel="external" class="sym">Go&lt;/a>. Looking
back at the 8 months I&amp;rsquo;ve spent at &lt;a href="https://trufflesecurity.com/" rel="external" class="sym">Truffle Security&lt;/a>, I can confidently say
that I found all of that and more. This is my first time working at a startup, and
I&amp;rsquo;m certain my perspective of startups is now skewed with how good it has been.&lt;/div>
&lt;/details>

&lt;details>
 &lt;summary>&lt;strong>Traveled!&lt;/strong>&lt;/summary>
 &lt;div>&lt;p>I really wanted to travel more in 2022. Since I moved back in with my parents
during the pandemic, I knew I needed to find a place I would like to live. Part
of that process was traveling and getting comfortable traveling on my own.&lt;/p></description></item><item><title>Interests as Orbits</title><link>https://miccah.io/posts/2022-11-19-interests-as-orbits/</link><pubDate>Sat, 19 Nov 2022 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2022-11-19-interests-as-orbits/</guid><description>&lt;p>I watched &lt;a href="https://www.youtube.com/watch?v=A2sS00egAzg" rel="external" class="sym">a video&lt;/a> recently about
(mislabeled) laziness and how some people aren&amp;rsquo;t built for the &amp;ldquo;consistent and
organized&amp;rdquo; lifestyle. I find this subject really interesting because I have
noticed the &lt;a href="https://miccah.io/posts/effectiveness-of-deadlines.html">effects of consistency&lt;/a>
and know how powerful they can be. But at the same time, I have also noticed my
motivations and interests ebb and flow. It&amp;rsquo;s one of those situations where I
know I &lt;em>should&lt;/em> do something, but I&amp;rsquo;ll let it stew in the back of my mind until
it bubbles to the front. I never thought this approach was inherently bad. It
could be better, but it always worked itself out eventually.&lt;/p></description></item><item><title>Ones and Zeros</title><link>https://miccah.io/posts/2022-10-23-ones-and-zeros/</link><pubDate>Sun, 23 Oct 2022 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2022-10-23-ones-and-zeros/</guid><description>&lt;p>The root of digital logic is being able to differentiate between &lt;em>something&lt;/em>
and &lt;em>not something&lt;/em>. This little seed has basically built the entirety of the
information age. You&amp;rsquo;ve probably heard it before: a computer is just ones and
zeros, but let&amp;rsquo;s explore this a bit (ha) in the context of programming and
data.&lt;/p>
&lt;h3 id="bits-of-data">Bits of Data&lt;/h3>
&lt;p>Data ultimately comprises of ones and zeros (called bits) stored in memory, and
we can manipulate how it is represented using different types in a programming
language. Let&amp;rsquo;s look at an example in C.&lt;/p></description></item><item><title>Rust's Display Trait</title><link>https://miccah.io/posts/2022-10-12-rust-display-trait/</link><pubDate>Wed, 12 Oct 2022 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2022-10-12-rust-display-trait/</guid><description>&lt;p>Rust&amp;rsquo;s trait system is pretty cool, and one of the common traits is
&lt;a href="https://doc.rust-lang.org/std/fmt/trait.Display.html" rel="external" class="sym">Display&lt;/a>. Defining an
implementation for this trait will allow you to use the standard formatter &lt;code>{}&lt;/code>
with your type, but the official example is a bit misleading.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-rust" data-lang="rust">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">use&lt;/span> std::fmt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">struct&lt;/span> &lt;span style="color:#a6e22e">Point&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> x: &lt;span style="color:#66d9ef">i32&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> y: &lt;span style="color:#66d9ef">i32&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">impl&lt;/span> fmt::Display &lt;span style="color:#66d9ef">for&lt;/span> Point {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">fn&lt;/span> &lt;span style="color:#a6e22e">fmt&lt;/span>(&lt;span style="color:#f92672">&amp;amp;&lt;/span>self, f: &lt;span style="color:#66d9ef">&amp;amp;&lt;/span>&lt;span style="color:#a6e22e">mut&lt;/span> fmt::Formatter&lt;span style="color:#f92672">&amp;lt;&lt;/span>&amp;#39;_&lt;span style="color:#f92672">&amp;gt;&lt;/span>) -&amp;gt; &lt;span style="color:#a6e22e">fmt&lt;/span>::Result {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> write!(f, &lt;span style="color:#e6db74">&amp;#34;({}, {})&amp;#34;&lt;/span>, self.x, self.y)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">fn&lt;/span> &lt;span style="color:#a6e22e">main&lt;/span>() {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">let&lt;/span> origin &lt;span style="color:#f92672">=&lt;/span> Point { x: &lt;span style="color:#ae81ff">0&lt;/span>, y: &lt;span style="color:#ae81ff">0&lt;/span> };
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> println!(&lt;span style="color:#e6db74">&amp;#34;The origin is: &lt;/span>&lt;span style="color:#e6db74">{origin}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;pre tabindex="0">&lt;code>The origin is: (0, 0)
&lt;/code>&lt;/pre>&lt;p>Well, that output is expected, but what if we add some padding?
This should right align, using &lt;code>-&lt;/code> as padding, and a width of 10
(&lt;a href="https://doc.rust-lang.org/std/fmt/index.html" rel="external" class="sym">reference&lt;/a>).&lt;/p></description></item><item><title>Go Contexts</title><link>https://miccah.io/posts/2022-09-06-go-contexts/</link><pubDate>Tue, 06 Sep 2022 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2022-09-06-go-contexts/</guid><description>&lt;p>Go is a simple language, but I was pretty confused by the &lt;code>context&lt;/code> package
when I first learned about it. I had trouble understanding how it could be used
to set a deadline or to cancel functions or how it even worked. Since then,
I&amp;rsquo;ve gotten a firmer grasp on how to use it both as a user and as a library
author.&lt;/p>
&lt;p>Let&amp;rsquo;s start by defining what a &lt;code>Context&lt;/code> is and its purpose. A &lt;code>Context&lt;/code> is a
construct used to signal a function to stop its work and return. The key is
that a function needs to be &lt;em>context aware&lt;/em> in order for this to have any
affect; there&amp;rsquo;s no magic.&lt;/p></description></item><item><title>The Joy of Keeping a Lab Notebook</title><link>https://miccah.io/posts/2022-08-10-the-joy-of-keeping-a-lab-notebook/</link><pubDate>Wed, 10 Aug 2022 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2022-08-10-the-joy-of-keeping-a-lab-notebook/</guid><description>&lt;p>In November of 2017, I began keeping a lab notebook for experiments (inspired
by &lt;a href="https://miccah.io/assets/Lab_Notebook_508_%28new%29.pdf">this document&lt;/a>). My
last entry was December of 2017 (a whopping two months of use) before I lost
interest or motivation or both.&lt;/p>
&lt;p>I rediscovered it a few days ago when I came across a project I had recorded in
it. I had converted the 4-prong plug of a 1950&amp;rsquo;s era rotary telephone into a
jack usable in today&amp;rsquo;s homes. I could vaguely remember the result, like the
ringer not working and not being able to dial out. I decided to try it on a
dedicated landline, and amazingly, it worked! I got a dial tone and could make
calls! The ringer still didn&amp;rsquo;t work, but I kind of expected that.&lt;/p></description></item><item><title>My Technology Origin Story</title><link>https://miccah.io/posts/2022-07-30-technology-origins/</link><pubDate>Sat, 30 Jul 2022 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2022-07-30-technology-origins/</guid><description>&lt;p>How did I get interested in computers and programming?&lt;/p>
&lt;p>Well, I grew up around computers. My parents were pretty technologically
inclined, so we had computers and printers around the house. I particularly
remember playing educational video games on a Compaq and later on, other games
like Jump Start 2nd Grade, Pajama Sam, and Putt-Putt and Pep&amp;rsquo;s Balloon-O-Rama.
My older brother also spear-headed the family in the console video game
department. We had a SNES, then an N64, then a PS2 which accounted for a lot of
my childhood.&lt;/p></description></item><item><title>Spring</title><link>https://miccah.io/posts/2022-04-15-spring/</link><pubDate>Fri, 15 Apr 2022 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2022-04-15-spring/</guid><description>&lt;p>When I read a book or watch a TV show, I&amp;rsquo;m excited to get to a new chapter.
There&amp;rsquo;s more to discover, more to experience, and more to understand. So why
are new chapters in life so scary to me when the exact same can be said? It&amp;rsquo;s
hard for me to let go and move on, but I&amp;rsquo;m slowly progressing into a new
chapter of my life. I&amp;rsquo;m excited and scared about it, but it feels right. I miss
my previous chapter, but it&amp;rsquo;ll always be part of me. If I could go back though,
I wouldn&amp;rsquo;t. That&amp;rsquo;s not my place anymore.&lt;/p></description></item><item><title>Interviewing is a full time job</title><link>https://miccah.io/posts/2022-03-16-interviewing/</link><pubDate>Wed, 16 Mar 2022 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2022-03-16-interviewing/</guid><description>&lt;p>&lt;em>This post is a recap of my recent experience job searching and a &amp;ldquo;thank you&amp;rdquo; for
all the help I received along the way.&lt;/em>&lt;/p>
&lt;p>I&amp;rsquo;m sure you&amp;rsquo;ve heard it before, and if not, it&amp;rsquo;s a common sentiment to
describe the amount of effort it takes to interview with multiple companies
when job searching.&lt;/p>
&lt;p>I recently underwent this process for the first time, and I 100% agree with the
sentiment. Even though I have worked before, this is the first time I fully
went &amp;ldquo;all in&amp;rdquo; on job searching. My process was three weeks straight of
scheduling, interviewing, and following-up with 28 different companies.&lt;/p></description></item><item><title>How I Design Rust Programs</title><link>https://miccah.io/posts/2022-02-23-rust-programming/</link><pubDate>Wed, 23 Feb 2022 09:00:00 +0000</pubDate><guid>https://miccah.io/posts/2022-02-23-rust-programming/</guid><description>&lt;p>As I have learned and gained more experience using Rust, I noticed that the way
I write Rust code is a bit different than the way I write in other languages.&lt;/p>
&lt;p>When writing an application in Rust, I create the data structures I think I&amp;rsquo;ll
need, then decide on &amp;ldquo;who owns what.&amp;rdquo; Which modules are responsible for which
functionality. There&amp;rsquo;s a focus on organization, perhaps instigated by the
borrow checker and the fact that one file is (usually) one module. This is
enabled especially by the &lt;code>todo!&lt;/code> macro which allows me to stub out function
and method definitions without worrying about implementation details. Again,
it&amp;rsquo;s a focus on how modules relate, how information is transformed, and the
overall organization of an application.&lt;/p></description></item><item><title>MSP430 Programming and Debugging</title><link>https://miccah.io/posts/2022-01-07-msp430-programming-and-debugging/</link><pubDate>Fri, 07 Jan 2022 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2022-01-07-msp430-programming-and-debugging/</guid><description>&lt;p>(on linux)&lt;/p>
&lt;p>The &lt;a href="https://en.wikipedia.org/wiki/TI_MSP430" rel="external" class="sym">MSP430&lt;/a> launchpad is a
low cost, low power microcontroller that can be used in a variety of
embedded applications. This post documents how to program and flash
the device on linux without TI&amp;rsquo;s IDE.&lt;/p>
&lt;p>Note: the specific MSP430 device I&amp;rsquo;m using is &lt;code>msp430g2553&lt;/code>.&lt;/p>
&lt;h2 id="tools-used">Tools used&lt;/h2>
&lt;p>In addition to GNU Make, I installed these packages to cross compile,
flash, and debug.&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://aur.archlinux.org/packages/mspgcc-ti/" rel="external" class="sym">mspgcc-ti&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://aur.archlinux.org/packages/msp430-elf-gcc/" rel="external" class="sym">msp430-elf-gcc&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://aur.archlinux.org/packages/mspdebug/" rel="external" class="sym">mspdebug&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://aur.archlinux.org/packages/srecord/" rel="external" class="sym">srecord&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="udev">udev&lt;/h2>
&lt;p>This is optional, but if you want to program your microcontroller without
&lt;code>sudo&lt;/code> permissions, it would be a good idea to add a udev rule that will
put the device in a group you are apart of. I chose &lt;code>wheel&lt;/code> but you can
use your own username or create a whole new group.&lt;/p></description></item><item><title>Rust traits are more powerful than I thought</title><link>https://miccah.io/posts/2021-12-11-rust-traits/</link><pubDate>Sat, 11 Dec 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-12-11-rust-traits/</guid><description>&lt;p>I have been learning the Rust programming language in my spare time for
a little over 2 years now. My first mental model of traits consisted of
a contract for types that would implement the trait, similar to Go&amp;rsquo;s
interfaces. It wasn&amp;rsquo;t until recently when I decided to explore traits
during &lt;a href="https://adventofcode.com/2021/" rel="external" class="sym">Advent of Code&lt;/a> that I started
to realize how integrated these contracts are into the language and
standard library. Using traits really helped clean up the code I was
writing.&lt;/p></description></item><item><title>HTTPS for your Home Server</title><link>https://miccah.io/posts/2021-11-11-https-home-server/</link><pubDate>Thu, 11 Nov 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-11-11-https-home-server/</guid><description>&lt;p>Do you have a home server and would like to securely connect to it? Or
are you tired of remembering your IP address? This post, as you may
have guessed, describes software and technologies to easily setup HTTPS
for your home server.&lt;/p>
&lt;p>&lt;strong>Warning:&lt;/strong> opening up your home server to the Internet is dangerous
without proper precautions. Your server &lt;em>will&lt;/em> be found by bots and they
&lt;em>will&lt;/em> attempt to gain access.&lt;/p></description></item><item><title>Serde and Nested Maps</title><link>https://miccah.io/posts/2021-10-23-serde-and-nested-maps/</link><pubDate>Sat, 23 Oct 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-10-23-serde-and-nested-maps/</guid><description>&lt;p>In one of my Rust projects I am parsing very nested
&lt;a href="https://miccah.io/knowledge/json.html">JSON&lt;/a> structures. Let&amp;rsquo;s use the following example
as our data source (though in reality it is 20+ deep):&lt;/p>
&lt;pre tabindex="0">&lt;code>{
 &amp;#34;foo&amp;#34;: {
 &amp;#34;bar&amp;#34;: [
 {
 &amp;#34;baz&amp;#34;: {
 &amp;#34;x&amp;#34;: &amp;#34;y&amp;#34;
 }
 }
 ]
 }
}
&lt;/code>&lt;/pre>&lt;p>&lt;a href="https://docs.serde.rs/serde/index.html" rel="external" class="sym">Serde&lt;/a> is the de-facto framework
for serializing and deserializing data efficiently in Rust. It supports
parsing JSON into either strongly typed data structures or untyped
JSON values.&lt;/p>
&lt;p>Rust does not have a way to define anonymous structs, so for the strongly
typed approach we would need to define 20+ separate structs to get the
data we want. No, thank you.&lt;/p></description></item><item><title>Creativity in Software</title><link>https://miccah.io/posts/2021-10-22-creativity-in-software/</link><pubDate>Fri, 22 Oct 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-10-22-creativity-in-software/</guid><description>&lt;p>I recently listened to an excellent talk by Jordan Peterson titled
&lt;a href="https://youtu.be/KxGPe1jD-qY" rel="external" class="sym">Exploring the Psychology of Creativity&lt;/a>,
and it got me thinking about how it applies to software development.&lt;/p>
&lt;p>I came to the conclusion that software development is inherently
creative. I think this is quite obvious when building a new project
or writing new code, however even the maintenance of existing software
has some room for creativity. Arguably less so, but there is room none
the less.&lt;/p></description></item><item><title>What to Learn</title><link>https://miccah.io/posts/2021-10-21-what-to-learn/</link><pubDate>Thu, 21 Oct 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-10-21-what-to-learn/</guid><description>&lt;p>I recently read a blog post by Dan Luu titled &lt;a href="https://danluu.com/learn-what/" rel="external" class="sym">What to
Learn&lt;/a>. As a life-long learner, the
simple title piqued my interest. I don&amp;rsquo;t tend to take recommendations
about what other people find interesting, but I&amp;rsquo;m glad I decided to at
least see what it said.&lt;/p>
&lt;p>The advice Dan gives is not concrete or cheap, but the type of advice
that incites self reflection and personal growth. He advises to focus on
amplifying your strengths, as opposed to minimizing your weaknesses. Maybe
this is obvious to most people, but I had not thought of learning in
this way. It&amp;rsquo;s much more appealing to me to learn something completely
new than to push the boundary in an area I am more than competent in, so hearing
this made me think (more on this later).&lt;/p></description></item><item><title>Ground Up: State Machines</title><link>https://miccah.io/posts/2021-09-18-ground-up-state-machines/</link><pubDate>Sat, 18 Sep 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-09-18-ground-up-state-machines/</guid><description>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.12.15/paper-full.min.js" integrity="sha512-ovjLI1ZcZe6bw+ImQ21r+sv8q/Vwob2kq7tFidK6E1LWfi0T4uobbmpfEU1//a9h9o5Kkt+MnMWf6rWlg0EiMw==" crossorigin="anonymous" referrerpolicy="no-referrer">&lt;/script>
&lt;script type="text/javascript">
 window.globals = {};
 function updateState(checkbox, global) {
 window.globals[global] = checkbox.checked;
 window.globals.updateLock();
 updateTables();
 }
 function updateTables() {
 updateLockTable();
 }
 function updateLockTable() {
 var row = document.getElementById("lockTable").children[0].children[1].children;
 row[0].children[0].innerText = window.globals["lockB0"] ? "1" : "0";
 row[1].children[0].innerText = window.globals["lockB1"] ? "1" : "0";
 row[2].children[0].innerText = window.globals["lockB2"] ? "1" : "0";
 row[3].children[0].innerText = window.globals["lockB3"] ? "1" : "0";
 row[4].children[0].innerText = window.globals["lockR"] ? "1" : "0";
 row[5].children[0].innerText = window.globals["lockS"] || "A";
 row[6].children[0].innerText = window.globals["lockL"] || "1";
 }
 window.onload = function() {
 window.globals.updateLock();
 updateTables()
 }
&lt;/script>
&lt;style type="text/css" media="all">
.gate {
 vertical-align: middle;
 width: unset;
}
p.gate {
 vertical-align: unset;
}
.table-div {
 vertical-align: middle;
}
.interactive {
 padding: 20px;
 margin: 20px auto;
 border: 1px dashed gray;
}
.table-div table {
 margin-bottom: 5px;
 margin-top: 5px;
}
table {
 margin: 30px auto;
}
#lock {
 width: 600px;
 height: 600px;
 display: inline-block;
 vertical-align: middle;
 margin-left: 40px;
}
&lt;/style>
&lt;p>Welcome to a series of posts cleverly titled &lt;em>&lt;strong>Ground Up&lt;/strong>&lt;/em>,
where I explain computing concepts from the ground up! We&amp;rsquo;ll explore
how computers work starting with transistors and going from there.
This post specifically covers finite state machines.&lt;/p></description></item><item><title>LangJam</title><link>https://miccah.io/posts/2021-09-07-langjam/</link><pubDate>Tue, 07 Sep 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-09-07-langjam/</guid><description>&lt;p>Two weeks ago I participated in the first ever
&lt;a href="https://github.com/langjam/langjam" rel="external" class="sym">LangJam&lt;/a>, the goal of which was to
create a programming language based on a theme in a 48 hour period.&lt;/p>
&lt;p>Now, I&amp;rsquo;m not exactly a seasoned programming language creator, but I
am quite interested in the art. This jam was an excellent opportunity
for me to grow my skills, interact with the community, and &amp;ldquo;complete&amp;rdquo;
a minimal language just for fun.&lt;/p>
&lt;p>The theme for this LangJam was &amp;ldquo;first class comments.&amp;rdquo; A challenging
paradox for sure, however since I didn&amp;rsquo;t have the time to learn the
intricacies of AST parsing and code generation, I decided to make
something that&amp;rsquo;s very easy to understand and implement.&lt;/p></description></item><item><title>Ground Up: Memory</title><link>https://miccah.io/posts/2021-07-18-ground-up-memory/</link><pubDate>Sun, 18 Jul 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-07-18-ground-up-memory/</guid><description>&lt;script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">&lt;/script>
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.12.15/paper-full.min.js" integrity="sha512-ovjLI1ZcZe6bw+ImQ21r+sv8q/Vwob2kq7tFidK6E1LWfi0T4uobbmpfEU1//a9h9o5Kkt+MnMWf6rWlg0EiMw==" crossorigin="anonymous" referrerpolicy="no-referrer">&lt;/script>
&lt;script type="text/javascript">
 window.globals = {};
 function updateState(checkbox, global) {
 window.globals[global] = checkbox.checked;
 window.globals.updateSRLatch();
 window.globals.updateGatedSRLatch();
 window.globals.updateDFlipFlop();
 updateTables();
 }
 function updateTables() {
 updateSRLatchTable();
 updateGatedSRLatchTable();
 updateDFlipFlopTable();
 }
 function updateSRLatchTable() {
 var table = document.getElementById("srLatchTable").children[0].children;
 var index = (window.globals["srLatchS"] ? 2 : 0) + (window.globals["srLatchR"] ? 1 : 0) + 1;
 for (var i = 1; i &lt; table.length; i++) {
 table[i].style.backgroundColor = i == index ? 'yellow' : 'white';
 }
 }
 function updateGatedSRLatchTable() {
 var table = document.getElementById("gatedSRLatchTable").children[0].children;
 var index = (!window.globals["gatedSRLatchG"] ? 0 : ((window.globals["gatedSRLatchS"] ? 2 : 0) + (window.globals["gatedSRLatchR"] ? 1 : 0) + 1)) + 1;
 for (var i = 1; i &lt; table.length; i++) {
 table[i].style.backgroundColor = i == index ? 'yellow' : 'white';
 }
 }
 function updateDFlipFlopTable() {
 var table = document.getElementById("dFlipFlopTable").children[0].children;
 var index = (window.globals["dFlipFlopClk"] ? 2 : 0) + (window.globals["dFlipFlopD"] ? 1 : 0) + 1;
 for (var i = 1; i &lt; table.length; i++) {
 table[i].style.backgroundColor = i == index ? 'yellow' : 'white';
 }
 }
 window.onload = function() {
 window.globals.updateSRLatch();
 window.globals.updateGatedSRLatch();
 window.globals.updateDFlipFlop();
 updateTables()
 }
&lt;/script>
&lt;style type="text/css" media="all">
.gate {
 display: inline-block;
 vertical-align: middle;
 width: unset;
}
p.gate {
 vertical-align: unset;
}
table {
 margin: 30px auto;
}
.table-div {
 display: inline-block;
 vertical-align: middle;
}
.interactive {
 padding: 20px;
 margin: 20px auto;
 border: 1px dashed gray;
}
.table-div table {
 margin-bottom: 5px;
 margin-top: 5px;
}
#srLatchCircuit {
 width: 200px;
 height: 190px;
 display: inline-block;
 vertical-align: middle;
 margin-left: 40px;
}
#gatedSRLatchCircuit {
 width: 300px;
 height: 190px;
 display: inline-block;
 vertical-align: middle;
 margin-left: 40px;
}
#dFlipFlop {
 width: 320px;
 height: 190px;
 display: inline-block;
 vertical-align: middle;
 margin-left: 40px;
}
&lt;/style>
&lt;p>Welcome to a series of posts cleverly titled &lt;em>&lt;strong>Ground Up&lt;/strong>&lt;/em>,
where I explain computing concepts from the ground up! We&amp;rsquo;ll explore
how computers work starting with transistors and going from there.
This post specifically covers how to create memory from gates.&lt;/p></description></item><item><title>Ground Up: Gates</title><link>https://miccah.io/posts/2021-07-06-ground-up-gates/</link><pubDate>Tue, 06 Jul 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-07-06-ground-up-gates/</guid><description>&lt;script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">&lt;/script>
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.12.15/paper-full.min.js" integrity="sha512-ovjLI1ZcZe6bw+ImQ21r+sv8q/Vwob2kq7tFidK6E1LWfi0T4uobbmpfEU1//a9h9o5Kkt+MnMWf6rWlg0EiMw==" crossorigin="anonymous" referrerpolicy="no-referrer">&lt;/script>
&lt;style type="text/css" media="all">
table {
 margin: 30px auto;
}
.sum-table {
 display: inline-block;
 padding-right: 40px;
}
.sum-table table {
 border: none;
}
.sum-table tr {
 border: none;
}
.sum-table td {
 border: none;
}
.sum-table .last-row td {
 border-top: 1px solid black;
}
.gate {
 display: inline-block;
 vertical-align: middle;
 width: unset;
}
p.gate {
 vertical-align: unset;
}
.table-div {
 display: inline-block;
 vertical-align: middle;
}
.interactive {
 padding: 5px 0px 0px 5px;
 margin: 20px auto;
 border: 1px dashed gray;
}
.table-div table {
 margin-top: 5px;
 margin-bottom: 5px;
}
#adderCircuit {
 width: 400px;
 height: 360px;
 display: inline-block;
 vertical-align: middle;
}
#adder2Circuit {
 width: 280px;
 height: 280px;
 display: inline-block;
 vertical-align: middle;
}
&lt;/style>
&lt;script type="text/javascript">
 window.globals = {};
 function updateState(checkbox, global) {
 window.globals[global] = checkbox.checked;
 window.globals.updateAdder();
 window.globals.updateAdder2();
 updateTables();
 }
 function updateTables() {
 var table = document.getElementById("adderTable").children[0].children;
 var index = (window.globals["adderA"] ? 4 : 0) + (window.globals["adderB"] ? 2 : 0) + (window.globals["adderC"] ? 1 : 0) + 1;
 for (var i = 1; i &lt; table.length; i++) {
 table[i].style.backgroundColor = i == index ? 'yellow' : 'white';
 }

 var table = document.getElementById("adder2Table").children[0].children;
 var a1 = window.globals["adder2A1"] ? 1 : 0;
 var a0 = window.globals["adder2A0"] ? 1 : 0;
 var b1 = window.globals["adder2B1"] ? 1 : 0;
 var b0 = window.globals["adder2B0"] ? 1 : 0;
 var out2 = window.globals["adder2Out2"] ? 1 : 0;
 var out1 = window.globals["adder2Out1"] ? 1 : 0;
 var out0 = window.globals["adder2Out0"] ? 1 : 0;
 var a = a1 * 2 + a0;
 var b = b1 * 2 + b0;
 var out = out2 * 4 + out1 * 2 + out0;
 table[1].children[1].children[0].innerText = '' + a1 + a0;
 table[1].children[2].children[0].innerText = '' + b1 + b0;
 table[1].children[3].children[0].innerText = '' + out2 + out1 + out0;
 table[2].children[1].children[0].innerText = a;
 table[2].children[2].children[0].innerText = b;
 table[2].children[3].children[0].innerText = out;
 }
 window.onload = function() {
 window.globals.updateAdder();
 window.globals.updateAdder2();
 updateTables()
 }
&lt;/script>
&lt;p>Welcome to a series of posts cleverly titled &lt;em>&lt;strong>Ground Up&lt;/strong>&lt;/em>,
where I explain computing concepts from the ground up! We&amp;rsquo;ll explore
how computers work starting with transistors and going from there.
This post specifically covers gates, binary math, and adders.&lt;/p></description></item><item><title>Ground Up: Bits</title><link>https://miccah.io/posts/2021-06-18-ground-up-bits/</link><pubDate>Fri, 18 Jun 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-06-18-ground-up-bits/</guid><description>&lt;script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">&lt;/script>
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.12.15/paper-full.min.js" integrity="sha512-ovjLI1ZcZe6bw+ImQ21r+sv8q/Vwob2kq7tFidK6E1LWfi0T4uobbmpfEU1//a9h9o5Kkt+MnMWf6rWlg0EiMw==" crossorigin="anonymous" referrerpolicy="no-referrer">&lt;/script>
&lt;p>Welcome to a new series of posts cleverly titled &lt;em>&lt;strong>Ground Up&lt;/strong>&lt;/em>,
where I explain computing concepts from the ground up! We&amp;rsquo;ll explore
how computers work starting with transistors and going from there.
This post specifically covers transistors, digital logic, and binary.&lt;/p>
&lt;ul>
&lt;li>&lt;em>&lt;strong>Part 1: Bits&lt;/strong>&lt;/em>&lt;/li>
&lt;li>[Part 2: Gates]({% post_url 2021-07-06-ground-up-gates %})&lt;/li>
&lt;li>[Part 3: Memory]({% post_url 2021-07-18-ground-up-memory %})&lt;/li>
&lt;li>[Part 4: State Machines]({% post_url 2021-09-18-ground-up-state-machines %})&lt;/li>
&lt;/ul>
&lt;h2 id="transistors">Transistors&lt;/h2>
&lt;p>At the end of the day, computers are complex circuits built mostly of
transistors. Transistors are electrical components that can be thought
of as gates that allow or deny current to flow. That&amp;rsquo;s it. Try toggling
the &lt;strong>gate&lt;/strong> below to see how the current responds.&lt;/p></description></item><item><title>Gratitude</title><link>https://miccah.io/posts/2021-06-08-gratitude/</link><pubDate>Tue, 08 Jun 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-06-08-gratitude/</guid><description>&lt;p>Gratitude is one of the simplest and most wildly rewarding practices
I have ever adopted in my life. It&amp;rsquo;s so sneakily simple that you may
think it&amp;rsquo;s nothing special, but regularly practicing gratitude changes
how you think in the most positive way. It changes how you see life,
how you feel, and how you experience the world.&lt;/p>
&lt;p>Everything in life can be viewed in countless different ways, the classic
example being the glass half full or half empty. I used to be a &amp;ldquo;half
empty&amp;rdquo; person, but I have learned to be grateful for what is there,
not what is lacking. What is not there does not exist and, the feeling of
lack is a fabricated thought from my mind. It&amp;rsquo;s perfectly fine to want
to feel that way, but I am happier seeing the positives.&lt;/p></description></item><item><title>Copying a new SSH key to a passwordless server</title><link>https://miccah.io/posts/2021-06-01-ssh-copy-id/</link><pubDate>Tue, 01 Jun 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-06-01-ssh-copy-id/</guid><description>&lt;p>This is a scenario I have ran into a couple of times. I have a server
that doesn&amp;rsquo;t allow logins with a password, and I need to setup a new
computer or operating system so it can login.&lt;/p>
&lt;p>It&amp;rsquo;s a simple problem, but I decided to record how I do it in case it
helps others. This method requires you to already have pubkey access
from another computer.&lt;/p>
&lt;ol>
&lt;li>Copy the new public key to the computer that already has access&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>scp ~/.ssh/id_rsa.pub dipper:/tmp
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># alternatively scp from dipper&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>scp mabel:~/.ssh/id_rsa.pub /tmp
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ol start="2">
&lt;li>From the computer that has access (&lt;code>dipper&lt;/code> in this example), copy the
ID to the server using &lt;code>ssh-copy-id&lt;/code>&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>ssh-copy-id -fi /tmp/id_rsa.pub grunkel-stan
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>-f&lt;/code> allows us to only use the public key and &lt;code>-i&lt;/code> specifies the
identity file. That&amp;rsquo;s it!&lt;/p></description></item><item><title>How doing nothing allowed me to grow</title><link>https://miccah.io/posts/2021-05-24-do-nothing/</link><pubDate>Mon, 24 May 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-05-24-do-nothing/</guid><description>&lt;p>In January of this year, I left my corporate software engineering position
to do nothing, and it was one of the best decisions I have made.&lt;/p>
&lt;p>Before I get into the &amp;ldquo;why&amp;rdquo;, I&amp;rsquo;d like to point out that I am in a
fortunate place to be able to leave my main source of income without
lining up my next source. I was able to do this because I am young with
few responsibilities, some savings, and on good terms with my parents,
who happily welcomed me back home.&lt;/p></description></item><item><title>Effectiveness of Deadlines</title><link>https://miccah.io/posts/2021-05-17-effectiveness-of-deadlines/</link><pubDate>Mon, 17 May 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-05-17-effectiveness-of-deadlines/</guid><description>&lt;p>Eight weeks ago &lt;a href="https://miccah.io/posts/little-things.html">I started tracking what I worked on each
day&lt;/a>. I laid out a star board for all of my
interests, and I would fill in a square if I gave it attention that day. I
call this &amp;ldquo;watering my ideas,&amp;rdquo; and it has hugely helped me remember and
allocate time for the projects that I wasn&amp;rsquo;t giving enough attention to,
including this blog.&lt;/p>
&lt;p>Eight weeks ago I also gave myself a goal to publish a post every
Tuesday. I have achieved that goal every week without fail, and I am so
proud to be consistently adding to my website. The other interests on my
board, however, have not seen similar progression.&lt;/p></description></item><item><title>Opinionated Design</title><link>https://miccah.io/posts/2021-04-21-opinionated-design/</link><pubDate>Wed, 21 Apr 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-04-21-opinionated-design/</guid><description>&lt;p>When I first learned how to program, I was so excited about how I could
create &lt;em>anything&lt;/em>! The possibilities were endless and I could create
in any way I choose. This is so powerful for creative coding, but
I have learned that designing systems any way I want is not the best
approach in a professional context.&lt;/p>
&lt;p>For professional systems, opinionated designs flourish. The more
specific problem your product solves, the better. This works for two
reasons: it&amp;rsquo;s simpler and easier to understand as a customer and it&amp;rsquo;s
simpler and easier to maintain as an engineer.&lt;/p></description></item><item><title>Thoughts on Abstractions</title><link>https://miccah.io/posts/2021-04-21-thoughts-on-abstractions/</link><pubDate>Wed, 21 Apr 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-04-21-thoughts-on-abstractions/</guid><description>&lt;p>Computers are like onions. They stink, make you cry, and when you leave
them out in the sun they get brown and start sprouting little white hairs.&lt;/p>
&lt;p>Wait, that&amp;rsquo;s not right. Computers are like ogres! They have layers. Lots
of layers. In fact, modern technology is &lt;em>built&lt;/em> on abstractions. This
is fantastic for containing complexity, assuming everything works as
intended, because you can work on larger problems without thinking about
the lower levels. For example, a developer can write a program that
sends messages across the Internet without ever knowing how that data
is physically sent.&lt;/p></description></item><item><title>Security Focused Development</title><link>https://miccah.io/posts/2021-04-15-security-focused-development/</link><pubDate>Thu, 15 Apr 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-04-15-security-focused-development/</guid><description>&lt;p>As the security industry grows and more and more critical systems are
put online, the demand for security focused developers will grow as
well. Security focused development, as the name suggests, is software
development with security in mind. Software engineers need to think like
hackers while developing systems in order to keep users secure.&lt;/p>
&lt;p>As an engineer with a strong interest in ethical hacking, I naturally
think about how the code I write could be exploited. So here are my tips
on secure software development.&lt;/p></description></item><item><title>Philosophy of Parkour</title><link>https://miccah.io/posts/2021-04-14-philosophy-of-parkour/</link><pubDate>Wed, 14 Apr 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-04-14-philosophy-of-parkour/</guid><description>&lt;p>I first learned of parkour around 2012. I thought it was so cool, but
I was too scared to even start. All the videos I saw were these crazy
jumps at height or doing flips over concrete. It took me eight years
to finally practice it myself, and I have learned so much from my
experiences.&lt;/p>
&lt;p>Parkour is such a unique and interesting sport because it is
individualistic, creative, and physically demanding. At its core,
parkour is about overcoming physical and mental obstacles. This is the
philosophy of parkour that I have come to know. It is a progression of
physically building the strength to overcome obstacles, then mentally
overcoming your fears about movements you know you can physically do.
It&amp;rsquo;s immensely personal, and it grows your relationship with yourself in a
way I never thought a sport could. And because it is so individualistic,
parkour is inherently creative. Every personal challenge is created
directly by you.&lt;/p></description></item><item><title>Trusting Data</title><link>https://miccah.io/posts/2021-04-08-trusting-data/</link><pubDate>Thu, 08 Apr 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-04-08-trusting-data/</guid><description>&lt;p>When creating programs, you will almost certainly operate on data. This
could come from users submitting information to your website, or data
read in from a database. Wherever it comes from, developers define
how that data is used and what can be done with it. As such, it is
important to think whether the data is trusted and safe to operate on,
or if your program can be exploited when the data is changed.&lt;/p></description></item><item><title>Good Function Design</title><link>https://miccah.io/posts/2021-04-06-good-function-design/</link><pubDate>Tue, 06 Apr 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-04-06-good-function-design/</guid><description>&lt;p>A fundamental part of software development is creating functions. It
keeps your code organized, readable, and prevents duplication. Like
any other skill, writing good functions can be improved with practice
and intention. If you learn anything from this post, it should be that
function call sites should be readable! A developer should be able to
infer what a function does without knowing its definition.&lt;/p>
&lt;h2 id="choosing-when-to-create-a-function">Choosing when to create a function&lt;/h2>
&lt;p>I have learned many arguments and philosophies about this. There&amp;rsquo;s DRY
(&lt;strong>D&lt;/strong>on&amp;rsquo;t &lt;strong>R&lt;/strong>epeat &lt;strong>Y&lt;/strong>ourself), which, as the name suggests,
advocates for never repeating the same piece of code. There&amp;rsquo;s WET
(&lt;strong>W&lt;/strong>rite &lt;strong>E&lt;/strong>very &lt;strong>T&lt;/strong>ime), which aims to avoid abstractions and
keep code simple. Finally, there&amp;rsquo;s the Rule of Three, in which you
refactor when you are writing similar code for the third time.&lt;/p></description></item><item><title>The Importance of Types</title><link>https://miccah.io/posts/2021-03-24-importance-of-types/</link><pubDate>Wed, 24 Mar 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-03-24-importance-of-types/</guid><description>&lt;p>There are many programming languages, but they can all be put into one
of two groups. Those that are dynamically typed and those that are not.
This post compares the two styles and will conclude with reasons why
professional software development should use a statically typed language.&lt;/p>
&lt;p>Let&amp;rsquo;s start with dynamic typed languages like Python and JavaScript. These
languages are fantastic for learning programming and creating small
projects. It is so easy to start writing code that just works, but
the caveat is a lot of functionality is stored in the sole developer&amp;rsquo;s
mind. So it&amp;rsquo;s easy if you&amp;rsquo;re the only developer of the project or if the
codebase is small, but it will need more organization when it grows. This
could mean more rigid development practices, external tooling, or bolting
on (optional) types after the fact.&lt;/p></description></item><item><title>Little things make big things</title><link>https://miccah.io/posts/2021-03-23-little-things/</link><pubDate>Tue, 23 Mar 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-03-23-little-things/</guid><description>&lt;p>All big things started small. It started as a thought, a seed, and with
consistent watering grew into a big tree.&lt;/p>
&lt;p>Doing little things consistently will grow into big things. It&amp;rsquo;s easy too!
The hardest part is regularly showing up.&lt;/p>
&lt;p>I like to imagine my ideas as trees. Each one is unique and they always
start as a seed. By giving an idea attention, I&amp;rsquo;m watering it. If I
don&amp;rsquo;t water it, it will never grow! Even worse, if I&amp;rsquo;m not consistently
watering my tree, it will die.&lt;/p></description></item><item><title>If all you have is a hammer</title><link>https://miccah.io/posts/2021-01-24-hammer/</link><pubDate>Sun, 24 Jan 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-01-24-hammer/</guid><description>&lt;p>..everything looks like a nail.&lt;/p>
&lt;p>This is one of my favorite quotes because
it is applicable to so many domains. As
&lt;a href="https://en.wikipedia.org/wiki/Law_of_the_instrument" rel="external" class="sym">Wikipedia&lt;/a>
states, it depicts a cognitive bias towards using a familiar tool in
any situation. Humans are very creative, and if all we know is hammer,
we will definitely find a way to use it on a screw.&lt;/p>
&lt;p>But the beauty in this quote is the reminder that there probably is a
better tool for the problem you are trying to solve. Relying on only what
you already know is counter-productive when the tools don&amp;rsquo;t fit the
task, so it&amp;rsquo;s a good idea to do a quick search first. That being said,
don&amp;rsquo;t adopt the latest technology du jour just because it is popular
today. Assess the time / complexity trade-offs of learning a new tool
versus using what you have.&lt;/p></description></item><item><title>getrandom Character Device</title><link>https://miccah.io/posts/2021-01-11-getrandom-character-device/</link><pubDate>Mon, 11 Jan 2021 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2021-01-11-getrandom-character-device/</guid><description>&lt;p>Today I read this article titled &lt;a href="https://www.2uo.de/myths-about-urandom/" rel="external" class="sym">Myths about
/dev/urandom&lt;/a>. I stumbled upon
it when trying to figure out why writing &lt;code>/dev/random&lt;/code> to a hard disk
was taking so long, and I learned a few interesting things. The most
important being to always use &lt;code>/dev/urandom&lt;/code> because it doesn&amp;rsquo;t block
and it is just as secure.&lt;/p>
&lt;p>I also learned about a syscall that behaves similar to &lt;code>/dev/urandom&lt;/code>
but will block when there isn&amp;rsquo;t enough initial entropy: &lt;code>getrandom&lt;/code>.
I took this opportunity to learn how to create my own character device
that will output &lt;code>getrandom&lt;/code> bytes indefinitely.&lt;/p></description></item><item><title>CTFs are about Learning</title><link>https://miccah.io/posts/2020-12-20-ctfs-are-about-learning/</link><pubDate>Sun, 20 Dec 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-12-20-ctfs-are-about-learning/</guid><description>&lt;p>Capture the Flag (CTF) events are common competitions in the security
field. Many CTFs use Jeopardy style challenges where you can pick and
choose which ones you want to solve with varying point rewards. It is
a ton of fun, but when I first started, I thought the goal of CTFs
were to win. You get the most points, you win, and you get a prize! Of
course that&amp;rsquo;s the point, right? Well, no, not really.&lt;/p></description></item><item><title>Vim REPL Driven Development</title><link>https://miccah.io/posts/2020-12-13-vim-repl-driven-development/</link><pubDate>Sun, 13 Dec 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-12-13-vim-repl-driven-development/</guid><description>&lt;p>If you have ever programmed with REPL driven development, you will know
that it is like programming without a blind-fold on. It makes development
so much easier, faster, and have fewer errors.&lt;/p>
&lt;p>So I decided to add a generic REPL to vim. This is so simple, yet so
effective and flexible. The idea is to send highlighted text to the
&lt;code>terminal&lt;/code> window (included in vim already).&lt;/p>
&lt;p>&lt;img src="https://miccah.io/assets/vim-repl.gif" alt="Vim REPL">&lt;/p>
&lt;p>Since the terminal is running &lt;code>bash&lt;/code>, you can execute &lt;code>python&lt;/code> or &lt;code>irb&lt;/code>
or any other interactive session and send the commands there as well.&lt;/p></description></item><item><title>A Thought Experiment on Business Structure</title><link>https://miccah.io/posts/2020-12-07-thought-experiment-on-business-structure/</link><pubDate>Mon, 07 Dec 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-12-07-thought-experiment-on-business-structure/</guid><description>&lt;p>This is a thought experiment about a hypothetical company. What if every
employee at that company had the opportunity to choose the project
they work on? Every December 1st, every employee could leave their
current project and work on another project. Or start their own project.
Or they could choose to continue their current project. What if repeats
weren&amp;rsquo;t allowed? What kind of culture would emerge? What patterns might
we see? Could a business really operate like that?&lt;/p></description></item><item><title>A Thought on REPL Driven Development</title><link>https://miccah.io/posts/2020-11-22-a-thought-on-repl-driven-development/</link><pubDate>Sun, 22 Nov 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-11-22-a-thought-on-repl-driven-development/</guid><description>&lt;p>I recently watched a talk by Bret Victor titled &lt;a href="https://vimeo.com/36579366" rel="external" class="sym">&amp;ldquo;Inventing on
Principle&amp;rdquo;&lt;/a>, where he explains his principle
for inventing and subsequently encourages the audience to find theirs.
His principle is that creators should have an immediate connection with
what they are creating. This is a major problem especially in software
development where the author of a program will need to change a bit of
code and rerun it to see the effects.&lt;/p></description></item><item><title>Finding my Principles</title><link>https://miccah.io/posts/2020-11-13-finding-my-principles/</link><pubDate>Fri, 13 Nov 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-11-13-finding-my-principles/</guid><description>&lt;p>Last year I saw a talk by Bret Victor titled &lt;a href="https://vimeo.com/36579366" rel="external" class="sym">&amp;ldquo;Inventing on
Principle&amp;rdquo;&lt;/a>. If you have not seen it,
I highly recommend it because it poses a question to the viewer: what
are your principles? What would you fight for?&lt;/p>
&lt;p>Since I saw that talk, I have been searching for my principles. It&amp;rsquo;s not
something I have specifically thought about before, especially as a
driving direction for my career. Bret states it may take some time
to find your principles, but I am going to go ahead and reflect on
my current state as a software engineer after three years of industry
experience. What do I strive to achieve? What bothers me? How do the
answers to these questions influence my inventions?&lt;/p></description></item><item><title>Behind Success</title><link>https://miccah.io/posts/2020-11-07-behind-success/</link><pubDate>Sat, 07 Nov 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-11-07-behind-success/</guid><description>&lt;p>Behind every success is a mountain of failures. Each failure informs
you in some way. You learn what went well and what did not go well,
so you can try a different approach the next time.&lt;/p>
&lt;p>Failure has been taught to me, and I suspect majority of others, as a very
negative outcome. Having this negativity tied to the result of something
causes a fear of that negative outcome actually happening. I can attest
that fear of failure has definitely stopped me from attempting things,
but I believe that changing how we see failure will liberate
us to explore, learn, and find new opportunities without fear.&lt;/p></description></item><item><title>Build your own Birdfeeder</title><link>https://miccah.io/posts/2020-10-25-build-your-own-bird-feeder/</link><pubDate>Sun, 25 Oct 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-10-25-build-your-own-bird-feeder/</guid><description>&lt;p>I have been thinking a lot about a verse from &lt;em>PoC||GTFO&lt;/em> titled &amp;ldquo;&lt;a href="https://miccah.io/assets/birdfeeder.pdf">A Parable
on the Importance of Tools; or, Build your own fucking birdfeeder.&lt;/a>&amp;rdquo;
It is a short story about a man named Noah who decided to build a boat. His friends
were confused and asked him why? Why not buy one, or rent one out for the weekend?
Noah grew tired of their questions and stated &lt;em>&amp;ldquo;I&amp;rsquo;m building my own fucking birdfeed
because they&amp;rsquo;ve got wood at the store.&amp;rdquo;&lt;/em>&lt;/p></description></item><item><title>PIC from NULL: Programming Concepts and Tips</title><link>https://miccah.io/posts/2020-10-22-pic-from-null-programming-concepts-and-tips/</link><pubDate>Thu, 22 Oct 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-10-22-pic-from-null-programming-concepts-and-tips/</guid><description>&lt;p>This tutorial aims to get beginners started with PIC programming.
This is the second post of the cleverly named series &lt;em>&lt;strong>PIC from NULL&lt;/strong>&lt;/em>.
To understand PIC flashing, please refer to the first post:
[PIC from NULL: Flashing]({% post_url 2020-09-12-pic-from-null-flashing %}).&lt;/p>
&lt;p>This post covers some basic C programming concepts and tips in the
context of MPLabX. If you are unaware, MPLabX is the official IDE
(integrated development environment) for programming and debugging PIC
microcontrollers.&lt;/p></description></item><item><title>PIC from NULL: Flashing</title><link>https://miccah.io/posts/2020-09-12-pic-from-null-flashing/</link><pubDate>Sat, 12 Sep 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-09-12-pic-from-null-flashing/</guid><description>&lt;p>As part of my reintroduction to electrical engineering, I thought
it would be fun to PICk up a new type of microcontroller:
&lt;a href="https://en.wikipedia.org/wiki/PIC_microcontrollers" rel="external" class="sym">PICs&lt;/a>!&lt;/p>
&lt;p>These series of posts will document the challenges I faced when
starting out and hopefully helps others in similar situations. This
specific post covers flashing an 8-pin PIC16 using a PICkit3.&lt;/p>
&lt;h2 id="preface">Preface&lt;/h2>
&lt;p>Before we get into the details of my struggle, there is some context you
should know about. I am using an 8-pin PIC16 in a dual in-line package (the
kind of package that fits in a bread board). I&amp;rsquo;m also using a
&lt;a href="https://www.microchip.com/DevelopmentTools/ProductDetails/pg164130" rel="external" class="sym">PICkit3&lt;/a>
which is no longer available from Microchip, but I got one on Amazon for a good price.
It came with a ZIF socket, which I had zero knowledge about as well.&lt;/p></description></item><item><title>IoT Hacking: Starting Out</title><link>https://miccah.io/posts/2020-08-10-iot-hacking/</link><pubDate>Mon, 10 Aug 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-08-10-iot-hacking/</guid><description>&lt;p>This past weekend I (virtually) attended DEFCON 28. It was my first
DEFCON experience, and I have to say it was really great! There
were so many talks that interested me with very friendly speakers
and community. The IoT Village in specific really spoke to me, and
inspired me to start learning hardware hacking more in depth.&lt;/p>
&lt;p>I think this has been a long time coming. Working as a software
engineer is great, but I have always missed working on hardware.
Some of my proudest projects are on microcontrollers, so pursuing
this definitely made sense for me.&lt;/p></description></item><item><title>Integrating clap and rustyline</title><link>https://miccah.io/posts/2020-08-05-integrating-clap-and-rustyline/</link><pubDate>Wed, 05 Aug 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-08-05-integrating-clap-and-rustyline/</guid><description>&lt;p>My &lt;a href="https://github.com/miccah/repost" rel="external" class="sym">latest project&lt;/a> is a
command line interpreter written in Rust. As such, I wanted to use
&lt;a href="https://github.com/kkawakam/rustyline" rel="external" class="sym">rustyline&lt;/a> for the line
reader and &lt;a href="https://github.com/clap-rs/clap" rel="external" class="sym">clap&lt;/a> to parse that
line. This post explores how I integrated these two libraries
to leverage a single source of data for both command parsing and
tab completions.&lt;/p>
&lt;p>TLDR; &lt;a href="https://gist.github.com/mcastorina/7ad4782f75e3707f9f534c05b72e390c" rel="external" class="sym">here is a POC gist&lt;/a>&lt;/p>
&lt;h2 id="why-i-chose-to-do-this">Why I chose to do this&lt;/h2>
&lt;p>One behavior of Rust is informing the compiler of data that is
related, so I thought it made sense to have my tab completion be
based off of clap&amp;rsquo;s argument parsing. In this way, whenever I add,
remove, or modify the argument parsing code, the tab completion
will stay in sync.&lt;/p></description></item><item><title>Why I Prefer Rust Error Handling Over Go</title><link>https://miccah.io/posts/2020-06-14-why-i-prefer-rust-error-handling-over-go/</link><pubDate>Sun, 14 Jun 2020 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-06-14-why-i-prefer-rust-error-handling-over-go/</guid><description>&lt;p>A large part of software development is handling errors. Generally
speaking, we cannot predict and account for everything that is
input to the program, but it is important to handle issues
gracefully as the algorithm encounters them. Like it or not, as
engineers it is our job to provide a good user experience and that
includes error handling.&lt;/p>
&lt;p>This post describes my experiences with error handling in two
programming languages: Go and Rust. We compare a simple example
of reading the contents of a file.&lt;/p></description></item><item><title>QWERTY to Dvorak: A Short Story</title><link>https://miccah.io/posts/2020-02-29-qwerty-to-dvorak-short-story/</link><pubDate>Sat, 29 Feb 2020 12:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-02-29-qwerty-to-dvorak-short-story/</guid><description>&lt;p>It wasn&amp;rsquo;t easy, and it wasn&amp;rsquo;t hard. It happened before I knew it
was happening. I was just trying to learn Dvorak for fun, but I
went too far into the woods and I lost direction. All of a sudden
I was in a limbo. I wasn&amp;rsquo;t proficient in Dvorak, and I wasn&amp;rsquo;t
proficient in QWERTY anymore. Typing became a challenge and it
forced me to really think before writing text down. In this limbo,
I was faced with a question: do I keep walking through the woods,
hoping for greener pastures on the other side? Or do I turn around
and try to find my way back?&lt;/p></description></item><item><title>QWERTY to Dvorak: My Experience</title><link>https://miccah.io/posts/2020-02-29-qwerty-to-dvorak-experience/</link><pubDate>Sat, 29 Feb 2020 12:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-02-29-qwerty-to-dvorak-experience/</guid><description>&lt;p>I recently transitioned to the Dvorak keyboard layout from the
traditional QWERTY style. This post will compare the advantages and
disadvantages of each, and my experience of transitioning from
QWERTY to Dvorak.&lt;/p>
&lt;h2 id="qwerty">QWERTY&lt;/h2>
&lt;p>The most advantageous feature of QWERTY is its widespread adoption.
It is used everywhere and is the default on 100% of the keyboards
I have encountered. There is a real convenience with going anywhere
and being able to fluently type without fiddling with settings.
This comes most into play in public places like stores where you
are asked to input your email or other personal information. Since
I switched to Dvorak, those interactions have been painfully slow.
Additionally, any time a loved one wants to use my computer (or I
theirs), there would now be an extra step of changing the keyboard
layout. In reality, however, I&amp;rsquo;m never actually using someone else&amp;rsquo;s
computer, so in those very rare cases I usually just &amp;ldquo;hunt and peck.&amp;rdquo;&lt;/p></description></item><item><title>How Zim Helped Organize My Life</title><link>https://miccah.io/posts/2020-01-26-how-zim-helped-organize-my-life/</link><pubDate>Sun, 26 Jan 2020 12:00:00 +0000</pubDate><guid>https://miccah.io/posts/2020-01-26-how-zim-helped-organize-my-life/</guid><description>&lt;p>I am a lifelong learner, and I love to take notes. Any type of
notes. There is something about recording knowledge that just gets
me excited! Note taking is a common practice among high school
students, using pen and paper. When I went to college, I began
taking digital notes. Being somewhat of a perfectionist, I would
write them using LaTeX. It would take twice as long, but I was
convinced the end result was always better. As I transitioned into
adulthood where formal classes are rare, I pretty much stopped
taking notes altogether. Job related tasks did not warrant a cause
for notes. It was a different type of learning at work. I would use
sticky pads here and there, but I was not convinced I should be
taking notes daily. In addition, my strive for perfection dissuaded
me from even beginning. Daily tasks and job responsibilities are
messy, often ill defined. How could I even begin to capture that
in a file?&lt;/p></description></item><item><title>Git Started: Advanced Tips</title><link>https://miccah.io/posts/2019-10-19-git-started-advanced-tips/</link><pubDate>Sat, 19 Oct 2019 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2019-10-19-git-started-advanced-tips/</guid><description>&lt;p>&lt;img src="https://miccah.io/assets/git-started/banner.png" alt="git-started">&lt;/p>
&lt;p>This tutorial aims to explain Git in a way beginners can understand.
This is the third post of the cleverly named series &lt;em>&lt;strong>Git Started&lt;/strong>&lt;/em>.
In this post, I will share some useful tips for using &lt;code>git&lt;/code> on the command
line. For a conceptual understanding of Git, please refer to the first post:
[Git Started: Introduction]({% post_url 2019-09-21-git-started-introduction %}).
For an introduction on &lt;code>git&lt;/code> CLI usage, please refer to the second post:
[Git Started: Basic Usage]({% post_url 2019-10-10-git-started-basic-usage %}).&lt;/p></description></item><item><title>Git Started: Basic Usage</title><link>https://miccah.io/posts/2019-10-10-git-started-basic-usage/</link><pubDate>Thu, 10 Oct 2019 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2019-10-10-git-started-basic-usage/</guid><description>&lt;p>&lt;img src="https://miccah.io/assets/git-started/banner.png" alt="git-started">&lt;/p>
&lt;p>This tutorial aims to explain Git in a way beginners can understand.
This is the second post of the cleverly named series &lt;em>&lt;strong>Git Started&lt;/strong>&lt;/em>.
In this post, we explore how to use &lt;code>git&lt;/code> on the command line. To get
a conceptual understanding of Git, please refer to the first post:
[Git Started: Introduction]({% post_url 2019-09-21-git-started-introduction %}).&lt;/p>
&lt;p>Let&amp;rsquo;s begin by exploring the general project workflow, so we can
understand what we need to use Git for.&lt;/p></description></item><item><title>Git Started: Introduction</title><link>https://miccah.io/posts/2019-09-21-git-started-introduction/</link><pubDate>Sat, 21 Sep 2019 00:00:00 +0000</pubDate><guid>https://miccah.io/posts/2019-09-21-git-started-introduction/</guid><description>&lt;p>&lt;img src="https://miccah.io/assets/git-started/banner.png" alt="git-started">&lt;/p>
&lt;p>This tutorial aims to explain Git in a way beginners can understand. These
series of posts, cleverly named &lt;em>&lt;strong>Git Started&lt;/strong>&lt;/em>, will begin with the major
concepts, and we will explore how to use &lt;code>git&lt;/code> later on.&lt;/p>
&lt;h2 id="what-even-is-git">What Even is Git?&lt;/h2>
&lt;p>Many people will answer this by saying &amp;ldquo;Git is a version control
system for tracking changes in computer files.&amp;rdquo; If you understand
this, great! I believe an easier way to think of Git is as a way to
save your files at different points in time. Like saving your video
game state in new save locations, so you can go back later and replay
the different paths. Git does exactly that, just with cheat codes to
modify the saved states.&lt;/p></description></item><item><title>Optimize Your Terminal Workflow</title><link>https://miccah.io/posts/2019-09-17-optimizie-your-terminal-workflow/</link><pubDate>Tue, 17 Sep 2019 13:12:15 +0000</pubDate><guid>https://miccah.io/posts/2019-09-17-optimizie-your-terminal-workflow/</guid><description>&lt;p>Working in a terminal emulator is great for getting things done
fast, and there are so many useful plugins and tools to make that
experience faster and easier. In this post I will share the most
useful tools and configurations that have improved my workflow
significantly. All of these configurations can be found on
&lt;a href="https://github.com/mcastorina/dotfiles" rel="external" class="sym">GitHub&lt;/a>.&lt;/p>
&lt;p>Before I get started, however, note that I am a vim user, so most
of the following will be vim-related. Actually, while we are on the
subject, let’s start the list off with vim!&lt;/p></description></item><item><title>Welcome to miccah.io!</title><link>https://miccah.io/posts/2019-09-12-welcome-to-miccah.io/</link><pubDate>Thu, 12 Sep 2019 00:06:04 +0000</pubDate><guid>https://miccah.io/posts/2019-09-12-welcome-to-miccah.io/</guid><description>&lt;p>I am excited you are here, and I hope you learn something new in
my posts.&lt;/p>
&lt;p>Please feel free to contact me with any questions.&lt;/p></description></item><item><title>/about</title><link>https://miccah.io/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/about/</guid><description>&lt;p>Hi, I&amp;rsquo;m Miccah!&lt;/p>
&lt;p>I like thinking about stuff and goofin&amp;rsquo; around with computers. Self hosting,
local-first, privacy, simplicity, and performance generally pique my interest.&lt;/p>
&lt;p>Check out my &lt;a href="https://miccah.io/now">/now&lt;/a> page for my current interests!&lt;/p>
&lt;p>Please feel free to contact me via &lt;a href="mailto:contact@miccah.io" rel="external" class="sym">email&lt;/a> for any
reason (or no reason!) at all.&lt;/p>
&lt;figure>&lt;a href="https://ko-fi.com/O5O0LAWC">&lt;img src="https://miccah.io/assets/kofi2.png" width="150">&lt;/a>
&lt;/figure></description></item><item><title>/now</title><link>https://miccah.io/now/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/now/</guid><description>&lt;p>&lt;strong>My interests (in no particular order):&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>SSH apps&lt;/li>
&lt;li>NixOS&lt;/li>
&lt;li>eBPF / XDP&lt;/li>
&lt;li>&lt;a href="https://github.com/miccah/immich-photo-frame" rel="external" class="sym">immich-photo-frame&lt;/a>&lt;/li>
&lt;li>UX / design&lt;/li>
&lt;li>Writing&lt;/li>
&lt;li>Parkour&lt;/li>
&lt;/ul>
&lt;p>&lt;em>Last updated: August 1, 2026&lt;/em>&lt;/p></description></item><item><title>Arduino</title><link>https://miccah.io/kb/arduino/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/arduino/</guid><description>&lt;p>Arduino is a hardware and software company that produces single-board
microcontrollers. Their products are open source and geared toward
hobbyists. They also provide an IDE to program the boards using C or C++.&lt;/p>
&lt;h2 id="hello-world">Hello World&lt;/h2>
&lt;p>&lt;strong>hello_world/hello_world.ino&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cpp" data-lang="cpp">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">setup&lt;/span>() {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.begin(&lt;span style="color:#ae81ff">9600&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">while&lt;/span> (&lt;span style="color:#f92672">!&lt;/span>Serial);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.println(&lt;span style="color:#e6db74">&amp;#34;Hello, World!&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">loop&lt;/span>() {}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># load the program onto the board&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>arduino --port /dev/ttyUSB0 --upload hello_world/hello_world.ino
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># connect to the serial interface&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>screen /dev/ttyUSB0 &lt;span style="color:#ae81ff">9600&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Bash</title><link>https://miccah.io/kb/bash/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/bash/</guid><description>&lt;p>The Bourne Again Shell, bash, is a standard command line interpreter
that is POSIX compliant.&lt;/p>
&lt;h2 id="hello-world">Hello World&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>echo &lt;span style="color:#e6db74">&amp;#34;Hello, World!&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="redirection-and-substitution">Redirection and Substitution&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Symbol&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;th>Example&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>`&lt;/td>
 &lt;td>`&lt;/td>
 &lt;td>Pipe STDOUT from one command to STDIN of another&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>&amp;gt;&lt;/code>&lt;/td>
 &lt;td>Redirect STDOUT&lt;/td>
 &lt;td>&lt;code>ls &amp;gt; output.txt&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>&amp;gt;&amp;gt;&lt;/code>&lt;/td>
 &lt;td>Redirect STDOUT and append to file&lt;/td>
 &lt;td>&lt;code>ls / &amp;gt;&amp;gt; output.txt&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>2&amp;gt;&lt;/code>&lt;/td>
 &lt;td>Redirect STDERR&lt;/td>
 &lt;td>&lt;code>ls 2&amp;gt; output-err.txt&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>2&amp;gt;&amp;gt;&lt;/code>&lt;/td>
 &lt;td>Redirect STDERR and append to file&lt;/td>
 &lt;td>&lt;code>ls / 2&amp;gt;&amp;gt; output-err.txt&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>&amp;lt;&lt;/code>&lt;/td>
 &lt;td>Redirect file as STDIN&lt;/td>
 &lt;td>&lt;code>echo 'hello world' &amp;gt; a; grep 'hello' &amp;lt; a&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>&amp;lt;&amp;lt;EOF&lt;/code>&lt;/td>
 &lt;td>Read in text until &lt;code>EOF&lt;/code> is encountered and send as STDIN&lt;/td>
 &lt;td>&lt;code>grep 'hello' &amp;lt;&amp;lt;EOF\nhello world\nEOF&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>&amp;lt;&amp;lt;-EOF&lt;/code>&lt;/td>
 &lt;td>Same as &lt;code>&amp;lt;&amp;lt;EOF&lt;/code> with leading tabs removed&lt;/td>
 &lt;td>&lt;code>grep 'hello' &amp;lt;&amp;lt;EOF\n\thello world\nEOF&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>&amp;lt;&amp;lt;&amp;lt;&lt;/code>&lt;/td>
 &lt;td>Redirect string as STDIN&lt;/td>
 &lt;td>&lt;code>grep 'hello' &amp;lt;&amp;lt;&amp;lt; 'hello world'&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>&amp;gt;()&lt;/code>&lt;/td>
 &lt;td>Receive STDIN to command as a file&lt;/td>
 &lt;td>&lt;code>echo 'hello world' &amp;gt; &amp;gt;(grep 'hello')&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>&amp;lt;()&lt;/code>&lt;/td>
 &lt;td>Send STDOUT of command as a file&lt;/td>
 &lt;td>&lt;code>grep 'hello' &amp;lt;(echo 'hello world')&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>$()&lt;/code>&lt;/td>
 &lt;td>Use output of command as string&lt;/td>
 &lt;td>&lt;code>echo '/tmp' &amp;gt; a; ls $(cat a)&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>$(())&lt;/code>&lt;/td>
 &lt;td>Use output of arithmetic as string&lt;/td>
 &lt;td>&lt;code>echo &amp;quot;1+1 is $((1+1))&amp;quot;&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="control-operators">Control Operators&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Symbol&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>[&lt;/code> &lt;code>test&lt;/code>&lt;/td>
 &lt;td>Condition evaluation utility command&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>if&lt;/code> &lt;code>elif&lt;/code> &lt;code>else&lt;/code>&lt;/td>
 &lt;td>Evaluate statement if the return code is 0&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>[[ ]]&lt;/code>&lt;/td>
 &lt;td>Shell built-in to enhance &lt;code>[&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>for&lt;/code>&lt;/td>
 &lt;td>Iterate over a list of values&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>while&lt;/code>&lt;/td>
 &lt;td>Do commands while command returns 0&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>case&lt;/code>&lt;/td>
 &lt;td>Selectively execute commands based on matching pattern&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>select&lt;/code>&lt;/td>
 &lt;td>Continuously ask for user to select a choice from a list and execute commands&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="single-vs-double-bracket">Single vs Double Bracket&lt;/h3>
&lt;p>&lt;code>[&lt;/code> or &lt;code>test&lt;/code> is a command whereas &lt;code>[[&lt;/code> is a shell built-in. I
prefer &lt;code>[[&lt;/code> over &lt;code>[&lt;/code> because it offers better regex and boolean
operations.&lt;/p></description></item><item><title>C</title><link>https://miccah.io/kb/c/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/c/</guid><description>&lt;p>The C programming language is commonly used in embedded and operating
systems. I see it as a &amp;ldquo;low level&amp;rdquo; language that is one step above
assembly. It is very easy to work with raw resources, and a firm
understanding of how a computer works will benefit the C programmer.
Due to its lack of strict checking and manual memory management, it is
also very easy to make mistakes.&lt;/p>
&lt;h2 id="hello-world">Hello World&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#include&lt;/span> &lt;span style="color:#75715e">&amp;lt;stdio.h&amp;gt;&lt;/span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">int&lt;/span> &lt;span style="color:#a6e22e">main&lt;/span>(&lt;span style="color:#66d9ef">int&lt;/span> argc, &lt;span style="color:#66d9ef">char&lt;/span> &lt;span style="color:#f92672">**&lt;/span>argv) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">printf&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Hello, World!&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="pointers">Pointers&lt;/h2>
&lt;p>A pointer is an address of a memory location. The type of the pointer
defines how large that memory location is, so a &lt;code>int*&lt;/code> is (in most cases)
4 bytes. The following example demonstrates this, as well as endianness.&lt;/p></description></item><item><title>Clojure</title><link>https://miccah.io/kb/clojure/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/clojure/</guid><description>&lt;p>Clojure is a functional dialect of lisp. It is built on top of Java
which makes interoperability easy. One thing I like about Clojure:
the more concise the code is, the more readable it is. Additionally,
functional programming (with a REPL) is quite productive and rewarding.&lt;/p>
&lt;p>Because Clojure is a dialect of lisp, it follows the paradigm of &amp;ldquo;code
as data&amp;rdquo;.&lt;/p>
&lt;h2 id="hello-world">Hello World&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-clojure" data-lang="clojure">&lt;span style="display:flex;">&lt;span>(println &lt;span style="color:#e6db74">&amp;#34;Hello, World!&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="functions">Functions&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-clojure" data-lang="clojure">&lt;span style="display:flex;">&lt;span>(&lt;span style="color:#66d9ef">defn &lt;/span>function-name
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;function description&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [args]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> (&lt;span style="color:#a6e22e">body&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You can also execute different code given the argument arity. This is
useful for setting default argument values.&lt;/p></description></item><item><title>Complex Numbers</title><link>https://miccah.io/kb/complex-numbers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/complex-numbers/</guid><description>&lt;script>MathJax = { tex: { inlineMath: {'[+]': [['$', '$']]} } };&lt;/script>
&lt;script defer src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js">&lt;/script>
&lt;p>Complex numbers are numbers that consist of a real and imaginary
part. Usually it is of the form $a + jb$ where $a$ and $b$
are real values and $j$ represents $\sqrt{-1}$. Complex numbers
can be visualized as a plane where the real part is the x-axis and
the imaginary part is the y-axis.&lt;/p>
&lt;h2 id="polar-form">Polar Form&lt;/h2>
&lt;p>Complex numbers can be thought of as Cartesian points on a plane,
and subsequently, they can be expressed as polar coordinates.&lt;/p></description></item><item><title>DNS</title><link>https://miccah.io/kb/dns/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/dns/</guid><description>&lt;p>The Domain Name System is a decentralized naming system for computers
connected on a network. It primarily translates human readable
domain names into IP addresses. The job of assigning domain names
and mapping them to Internet resources goes to authoritative name
servers for each domain. A DNS name server is a server that stores
DNS records for a domain. It responds with answers to queries against
its database.&lt;/p>
&lt;h2 id="resource-records">Resource Records&lt;/h2>
&lt;p>Here are the most common resources stored in a DNS name server.&lt;/p></description></item><item><title>Docker</title><link>https://miccah.io/kb/docker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/docker/</guid><description>&lt;p>Docker is a set of products that use OS-level virtualisation to
deliver software packages called containers. The primary advantage
of containerization is it allows for applications and their
dependencies to be fully contained in a single, reproducible
environment.&lt;/p>
&lt;p>Reference: &lt;a href="https://miccah.io/knowledge/containers.html">Containers&lt;/a>&lt;/p>
&lt;h2 id="components">Components&lt;/h2>
&lt;p>Docker consists of three main components: the Docker daemon, objects
(images, container, and services), and registries. The &lt;strong>daemon&lt;/strong> is
responsible for managing containers and listening for requests sent
via the Docker Engine API. The &lt;code>docker&lt;/code> CLI is also used to interact
with the daemon.&lt;/p></description></item><item><title>Dvorak Keyboard</title><link>https://miccah.io/kb/dvorak/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/dvorak/</guid><description>&lt;p>The Dvorak keyboard layout is designed to be a faster, more ergonomic
alternative to the QWERTY layout.&lt;/p>
&lt;p>&lt;img src="https://miccah.io/assets/kb/dvorak.svg" alt="Dvorak Keyboard">&lt;/p>
&lt;p>Personally, I have switched my phone layout to use Dvorak while
keeping my computer&amp;rsquo;s layout to QWERTY. Typing on my phone is now
a lot easier and faster, and it has definitely been a great way to
learn the Dvorak layout. Surprisingly, this has not affected my
normal keyboard usage at all.&lt;/p></description></item><item><title>Electrical Components</title><link>https://miccah.io/kb/electrical-components/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/electrical-components/</guid><description>&lt;script>MathJax = { tex: { inlineMath: {'[+]': [['$', '$']]} } };&lt;/script>
&lt;script defer src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js">&lt;/script>
&lt;p>These components are a few of the many building blocks of analog circuits.&lt;/p>
&lt;table>
&lt;thead>&lt;tr>&lt;th>Component&lt;/th>&lt;th>Description&lt;/th>&lt;th>Schematic Symbol&lt;/th>&lt;/tr>&lt;/thead>
&lt;tr>&lt;td>Resistor&lt;/td>&lt;td>Limits current&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/components/resistor.svg" style="width: 200"/>&lt;/td>&lt;/tr>
&lt;tr>&lt;td>Capacitor&lt;/td>&lt;td>Stores electric charge&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/components/capacitor.svg" style="width: 50"/>&lt;/td>&lt;/tr>
&lt;tr>&lt;td>Inductor&lt;/td>&lt;td>Stores energy in a magnetic field&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/components/inductor.svg" style="width: 80"/>&lt;/td>&lt;/tr>
&lt;tr>&lt;td>Diode&lt;/td>&lt;td>Allows current flow in one direction&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/components/diode.svg" style="width: 150"/>&lt;/td>&lt;/tr>
&lt;tr>&lt;td>Transistor&lt;/td>&lt;td>Amplifies or switches electric signals&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/components/transistor.svg" style="width: 90"/>&lt;/td>&lt;/tr>
&lt;/table>
&lt;h2 id="relationships">Relationships&lt;/h2>
&lt;p>All of these components have mathematical relationships with voltage
and current. The most useful one being Ohm&amp;rsquo;s Law.&lt;/p></description></item><item><title>ELF</title><link>https://miccah.io/kb/elf/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/elf/</guid><description>&lt;p>The Executable and Linkable Format is a standard file format for
executable files, object code, shared libraries, and core dumps.&lt;/p>
&lt;p>ELF is flexible by design, extensible, and cross-platform. On the left
is a typical layout of an ELF file. Once it is loaded into memory,
the program will look like the layout on the right.&lt;/p>
&lt;div style="display: flex; align-items: center;">
 &lt;img src="https://miccah.io/assets/kb/elf.svg"
 alt="elf layout"
 style="width: 300px; flex: 50%;" />
 &lt;img src="https://miccah.io/assets/kb/program-layout.jpg"
 alt="program layout"
 style="flex: 50%;" />
&lt;/div>
&lt;h2 id="program-sections">Program Sections&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Name&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;strong>text&lt;/strong>&lt;/td>
 &lt;td>Read-only program instructions and data&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>data&lt;/strong>&lt;/td>
 &lt;td>Statically initialized non-zero data&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>bss&lt;/strong>&lt;/td>
 &lt;td>Uninitialized or zero data&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>heap&lt;/strong>&lt;/td>
 &lt;td>Runtime allocated memory&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>stack&lt;/strong>&lt;/td>
 &lt;td>Runtime memory used for local variables and function calls&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table></description></item><item><title>Elixir</title><link>https://miccah.io/kb/elixir/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/elixir/</guid><description>&lt;p>Elixir is a functional, dynamically typed programming language that runs
on the BEAM (Erlang).&lt;/p>
&lt;h2 id="hello-world">Hello World&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-elixir" data-lang="elixir">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">IO&lt;/span>&lt;span style="color:#f92672">.&lt;/span>puts(&lt;span style="color:#e6db74">&amp;#34;Hello, World!&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;pre tabindex="0">&lt;code>elixir hello.exs
&lt;/code>&lt;/pre></description></item><item><title>Enumeration</title><link>https://miccah.io/kb/enumeration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/enumeration/</guid><description>&lt;p>Once you have a foothold, the next step is to enumerate. This is
an important step, because to exploit a system, you have to know
what is on it!&lt;/p>
&lt;h2 id="linux">Linux&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/diego-treitos/linux-smart-enumeration" rel="external" class="sym">linux-smart-enumeration&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/rebootuser/LinEnum" rel="external" class="sym">LinEnum&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="windows">Windows&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/411Hall/JAWS" rel="external" class="sym">JAWS&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/mattiareggiani/WinEnum" rel="external" class="sym">WinEnum&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Finite State Machine</title><link>https://miccah.io/kb/fsm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/fsm/</guid><description>&lt;p>A finite state machine is a mathematical model of computation to
define the solution to a problem. It describes the system as a
machine that changes state in reaction to inputs to produce the
appropriate outputs. State machines are usually defined with drawn
diagrams or a table. Examples of each follow.&lt;/p>
&lt;p>&lt;strong>State Machine Model&lt;/strong>&lt;/p>
&lt;p style="text-align: center">&lt;img src="https://miccah.io/assets/kb/fsm.png" style="width: 300px"/>&lt;/p>
&lt;p>&lt;strong>State Transition Table&lt;/strong>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Input \ Current State&lt;/th>
 &lt;th>State A&lt;/th>
 &lt;th>State B&lt;/th>
 &lt;th>State C&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;strong>Input X&lt;/strong>&lt;/td>
 &lt;td>State A&lt;/td>
 &lt;td>State B&lt;/td>
 &lt;td>State B&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Input Y&lt;/strong>&lt;/td>
 &lt;td>State B&lt;/td>
 &lt;td>State C&lt;/td>
 &lt;td>State A&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Input Z&lt;/strong>&lt;/td>
 &lt;td>State B&lt;/td>
 &lt;td>State B&lt;/td>
 &lt;td>State C&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="moore-machine">Moore Machine&lt;/h2>
&lt;p>A Moore machine is a finite state machine whose output is determined
solely by its current state. In the representation of a Moore machine,
the output is written on the state. Generally, Moore machines require
more states than Mealy machines.&lt;/p></description></item><item><title>Format Strings</title><link>https://miccah.io/kb/format-strings/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/format-strings/</guid><description>&lt;p>The &lt;code>printf&lt;/code> family of functions accept a format string as an argument
which may be used for formatting the list of arguments passed to the
function.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">int&lt;/span> &lt;span style="color:#a6e22e">printf&lt;/span>(&lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#66d9ef">char&lt;/span> &lt;span style="color:#f92672">*&lt;/span>&lt;span style="color:#66d9ef">restrict&lt;/span> format, ...);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>It is unsafe to use user-supplied input as the format string because
there is a directive (more below) that can write an integer to a memory
location. Further, the format string can expose any data that is on the
stack.&lt;/p>
&lt;p>Reference: &lt;code>man 3 printf&lt;/code>&lt;/p></description></item><item><title>GDB</title><link>https://miccah.io/kb/gdb/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/gdb/</guid><description>&lt;p>The GNU Debugger is a tool used for debugging another program while
it executes. You may set breakpoints, examine memory and registers,
and step through the code line by line or instruction by instruction.&lt;/p>
&lt;p>This tool is most useful for reverse engineering an unknown
executable or debugging a C program you are writing. &lt;a href="https://github.com/hugsy/gef" rel="external" class="sym">GDB Enhancement
Features&lt;/a> is a popular addon specifically
for reverse engineering and exploitation.&lt;/p>
&lt;h2 id="commands">Commands&lt;/h2>
&lt;p>There are many commands, but here are some common ones. Note that most
commands may be abbreviated.&lt;/p></description></item><item><title>Git</title><link>https://miccah.io/kb/git/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/git/</guid><description>&lt;p>Git is a revision control system that is very popular in software
development. Sites like &lt;a href="https://github.com" rel="external" class="sym">GitHub&lt;/a> and
&lt;a href="https://gitlab.com" rel="external" class="sym">GitLab&lt;/a> offer hosting services for your projects.
I enjoy using Git for my projects because I see it as saving snapshots
in time, and I will always be able to go back to that version, no
matter how much I experiment. I have written a
[couple of blog posts]({% post_url 2019-09-21-git-started-introduction %})
on the subject as well.&lt;/p></description></item><item><title>GoLang</title><link>https://miccah.io/kb/golang/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/golang/</guid><description>&lt;p>GoLang is a relatively new programming language. I consider it a
&amp;ldquo;middle level&amp;rdquo; language because it is strictly-typed, compiled, and
provides more protections than C. It also has a garbage collector,
lightweight concurrency models, and builtin &lt;code>chan&lt;/code> and &lt;code>error&lt;/code> types.&lt;/p>
&lt;h2 id="hello-world">Hello World&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go" data-lang="go">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> &lt;span style="color:#e6db74">&amp;#34;fmt&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">func&lt;/span> &lt;span style="color:#a6e22e">main&lt;/span>() {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">fmt&lt;/span>.&lt;span style="color:#a6e22e">Println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Hello, World!&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="concurrency">Concurrency&lt;/h2>
&lt;p>GoLang offers a concurrency model using goroutines, which are
lightweight threads managed by the Go runtime.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go" data-lang="go">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">go&lt;/span> &lt;span style="color:#66d9ef">func&lt;/span>() {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// do something
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>}()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="channels">Channels&lt;/h2>
&lt;p>Channels are a &amp;ldquo;typed conduit through which you can send and receive
values with the channel operator, &lt;code>&amp;lt;-&lt;/code>.&amp;rdquo; It is basically a buffer
to send and receive data. Sending will block when the buffer is
full, and receiving will block when the buffer is empty. By default, a
channel is unbuffered, but you can change the size on initialization.&lt;/p></description></item><item><title>Graphviz</title><link>https://miccah.io/kb/graphviz/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/graphviz/</guid><description>&lt;p>Graphviz is an open source graph visualization software. It reads
a text file description of a graph and generates an image automatically.&lt;/p>
&lt;p>Reference: &lt;a href="https://graphviz.org/" rel="external" class="sym">Graphviz - Graph Visualization Software&lt;/a>&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>Graphviz provides many binaries for building the image:&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>binary&lt;/th>
 &lt;th>description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>dot&lt;/code>&lt;/td>
 &lt;td>filter for drawing directed graphs&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>neato&lt;/code>&lt;/td>
 &lt;td>filter for drawing undirected graphs&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>twopi&lt;/code>&lt;/td>
 &lt;td>filter for radial layouts of graphs&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>circo&lt;/code>&lt;/td>
 &lt;td>filter for circular layout of graphs&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>fdp&lt;/code>&lt;/td>
 &lt;td>filter for drawing undirected graphs&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>sfdp&lt;/code>&lt;/td>
 &lt;td>filter for drawing large undirected graphs&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>patchwork&lt;/code>&lt;/td>
 &lt;td>filter for squarified tree maps&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>osage&lt;/code>&lt;/td>
 &lt;td>filter for array-based layouts&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>I mostly use &lt;code>dot&lt;/code>.&lt;/p></description></item><item><title>HTTP</title><link>https://miccah.io/kb/http/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/http/</guid><description>&lt;p>Hypertext Transfer Protocol is an application protocol for distributed
information systems. HTTP is the foundation of data communication
for the Internet. It is a request-response protocol in which the
client sends a request to the server. The server then either provides
a resource or performs a function on behalf of the client and sends
a response message back to the client. The response contains a
status code and possibly a body containing the requested resource
or other information.&lt;/p></description></item><item><title>Java</title><link>https://miccah.io/kb/java/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/java/</guid><description>&lt;p>Java is the first &amp;ldquo;real&amp;rdquo; language I learned. I consider it a &amp;ldquo;middle
level&amp;rdquo; language for its static typing, garbage collection, rich
libraries, and object oriented focus.&lt;/p>
&lt;h2 id="hello-world">Hello World&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">public&lt;/span> &lt;span style="color:#66d9ef">class&lt;/span> &lt;span style="color:#a6e22e">HelloWorld&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">public&lt;/span> &lt;span style="color:#66d9ef">static&lt;/span> &lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">main&lt;/span>(String &lt;span style="color:#f92672">[]&lt;/span>args) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> System.&lt;span style="color:#a6e22e">out&lt;/span>.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Hello, World!&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="objected-oriented">Objected Oriented&lt;/h2>
&lt;p>Java is an object oriented programming language. Besides simple
types like &lt;code>int&lt;/code>, &lt;code>double&lt;/code>, and &lt;code>char&lt;/code>, everything is an Object.
Objects must start with a capital letter (such as &lt;code>String&lt;/code>).&lt;/p></description></item><item><title>JSON</title><link>https://miccah.io/kb/json/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/json/</guid><description>&lt;p>&lt;strong>JavaScript Object Notation&lt;/strong> is a standard file format that uses human
readable text to transmit structured data objects. It originated from
JavaScript, however, it is a language independent format.&lt;/p>
&lt;pre tabindex="0">&lt;code>{
 &amp;#34;hello&amp;#34;: {
 &amp;#34;list&amp;#34;: [1, 2, 3]
 },
 &amp;#34;greetings&amp;#34;: [
 {
 &amp;#34;language&amp;#34;: &amp;#34;English&amp;#34;,
 &amp;#34;greeting&amp;#34;: &amp;#34;hello&amp;#34;
 },
 {
 &amp;#34;language&amp;#34;: &amp;#34;Spanish&amp;#34;,
 &amp;#34;greeting&amp;#34;: &amp;#34;hola&amp;#34;
 }
 ]
}
&lt;/code>&lt;/pre>&lt;p>JSON uses the following data types: &lt;code>number&lt;/code>, &lt;code>string&lt;/code>, &lt;code>boolean&lt;/code>,
&lt;code>array&lt;/code>, &lt;code>object&lt;/code>, and &lt;code>null&lt;/code>.&lt;/p>
&lt;h2 id="jwk-and-jwks">JWK and JWKS&lt;/h2>
&lt;p>&lt;strong>JSON Web Key&lt;/strong> is a JSON data structure that represents a cryptographic key.&lt;/p></description></item><item><title>Kasa Smart Devices</title><link>https://miccah.io/kb/kasa/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/kasa/</guid><description>&lt;p>Kasa is a brand of &amp;ldquo;Smart&amp;rdquo; devices (aka a WiFi connected and controlled) that
is useful for adding logic to some appliances around your home.&lt;/p>
&lt;h2 id="smart-plug">Smart Plug&lt;/h2>
&lt;p>I have a smart plug that can be controlled via
&lt;a href="https://github.com/plasticrake/tplink-smarthome-api" rel="external" class="sym">tplink-smarthome-api&lt;/a>.
It&amp;rsquo;s a &lt;code>npm&lt;/code> application, which isn&amp;rsquo;t great, but it&amp;rsquo;s one that I found that
allows you to send raw JSON requests.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Install&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>npm install -g tplink-smarthome-api
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="api-reference">API Reference&lt;/h3>
&lt;p>I searched far and wide and found &lt;a href="https://miccah.io/assets/kasa.pdf">this excellent research&lt;/a>
as well as &lt;a href="https://github.com/whitslack/kasa/blob/master/API.md" rel="external" class="sym">this API reference&lt;/a> someone put
together. Unfortunately the API had to be reverse engineered since Kasa doesn&amp;rsquo;t
make it public.&lt;/p></description></item><item><title>Kirchhoff's Laws</title><link>https://miccah.io/kb/kirchhoffs-laws/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/kirchhoffs-laws/</guid><description>&lt;script>MathJax = { tex: { inlineMath: {'[+]': [['$', '$']]} } };&lt;/script>
&lt;script defer src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js">&lt;/script>
&lt;h2 id="kirchhoffs-current-law">Kirchhoff&amp;rsquo;s Current Law&lt;/h2>
&lt;p>For any node in an electrical circuit, the sum of currents flowing
into that node is equal to the sum of currents flowing out of the
node.&lt;/p>
&lt;p>$$ \sum_{k=1}^{n} I_k = 0 $$&lt;/p>
&lt;h2 id="kirchhoffs-voltage-law">Kirchhoff&amp;rsquo;s Voltage Law&lt;/h2>
&lt;p>The directed sum of the potential differences (voltages) around any
closed loop is zero.&lt;/p>
&lt;p>$$ \sum_{k=1}^{n} V_k = 0 $$&lt;/p></description></item><item><title>Kubernetes</title><link>https://miccah.io/kb/kubernetes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/kubernetes/</guid><description>&lt;p>Kubernetes is an open source container orchestration platform for
automating application deployment, scaling, and management. It is
commonly used to deploy microservices because it provides mediations
for some of the concerns associated with microservice models.&lt;/p>
&lt;p>Reference: &lt;a href="https://en.wikipedia.org/wiki/Kubernetes" rel="external" class="sym">Kubernetes Wikipedia&lt;/a>&lt;/p>
&lt;h2 id="cluster">Cluster&lt;/h2>
&lt;p>A &lt;strong>cluster&lt;/strong> is a collection of &lt;strong>nodes&lt;/strong>, or &lt;strong>workers&lt;/strong> where
containers are deployed. Every node must run containerization
software (e.g. Docker), Kubelet, and Kube-Proxy. &lt;strong>Kubelet&lt;/strong> is
responsible for the running state of each node, ensuring all
containers on the node are healthy. If the state of a pod is not
healthy, the Kubelet redeploys to the same node. It also relays
node status to a primary (via a heartbeat) which can handle node
failures. &lt;strong>Kube-Proxy&lt;/strong> is the network proxy and load balancer of
Kubernetes. It is responsible for routing traffic to the appropriate
container based on IP and port number of the incoming request.&lt;/p></description></item><item><title>Learning</title><link>https://miccah.io/kb/learning/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/learning/</guid><description>&lt;p>I am a life long learner. I love to learn new things specifically
about building and designing things. I think this roots from my
childhood: playing with &lt;a href="https://www.lego.com/en-us" rel="external" class="sym">Legos&lt;/a> and
building high tech houses in &lt;a href="https://gmod.facepunch.com/" rel="external" class="sym">Garry&amp;rsquo;s Mod&lt;/a>
allowed my creativity to grow.&lt;/p>
&lt;h2 id="style">Style&lt;/h2>
&lt;p>I learn best by doing. Having the experience, doing the lab, and
playing with the subject solidifies the knowledge for me. Prior to
gaining experience, watching experts or lectures and taking handwritten
notes is the best way for me to learn concepts.&lt;/p></description></item><item><title>Linear Congruential Generator</title><link>https://miccah.io/kb/lcg/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/lcg/</guid><description>&lt;script>MathJax = { tex: { inlineMath: {'[+]': [['$', '$']]} } };&lt;/script>
&lt;script defer src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js">&lt;/script>
&lt;p>Linear Congruential Generator is an algorithm to produce a sequence of
pseudorandom numbers.&lt;/p>
&lt;p>$$ X_{n+1} = (aX_n + c) \bmod{m} $$&lt;/p>
&lt;p>Reference: &lt;a href="https://en.wikipedia.org/wiki/Linear_congruential_generator" rel="external" class="sym">Linear Congruential Generator&lt;/a>&lt;/p>
&lt;h2 id="non-repeating-prng">Non-repeating PRNG&lt;/h2>
&lt;p>When $c \neq 0$, correctly chosen parameters allow a period equal to $m$,
for all seed values. This will occur if and only if:&lt;/p>
&lt;ol>
&lt;li>$m$ and $c$ are relatively prime (coprime)&lt;/li>
&lt;li>$a-1$ is divisible by all prime factors of $m$&lt;/li>
&lt;li>$a-1$ is divisible by $4$ if $m$ is divisible by $4$&lt;/li>
&lt;/ol>
&lt;p>These three requirements are referred to as the Hull-Dobell Theorem.&lt;/p></description></item><item><title>Linux</title><link>https://miccah.io/kb/linux/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/linux/</guid><description>&lt;p>Linux is a family of open source operating systems stemming from
Unix. Common Linux distributions include: Debian, Ubuntu, and Fedora.
Personally, my Linux distribution of choice is Arch Linux.&lt;/p>
&lt;h2 id="command-line-interface">Command Line Interface&lt;/h2>
&lt;p>All Linux distributions have a command line interface (CLI) usually
running &lt;a href="https://miccah.io/knowledge/bash.html">bash&lt;/a>. It is a way to quickly
and efficiently perform tasks on the computer using available
commands. The CLI is particularly suited for automation of repetitive
or delayed tasks, and provides very simple inter-process communication.&lt;/p></description></item><item><title>Logic Gates</title><link>https://miccah.io/kb/gates/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/gates/</guid><description>&lt;p>The building blocks for integrated circuits and electronics. A logic
gate is the electrical implementation of boolean expressions.&lt;/p>
&lt;table>
&lt;thead>&lt;tr>&lt;th>Gate&lt;/th>&lt;th>I/O&lt;/th>&lt;th>Symbol&lt;/th>&lt;/tr>&lt;/thead>
&lt;tr>&lt;td>NOT&lt;/td>&lt;td>&lt;table>&lt;thead>&lt;tr>&lt;th>A&lt;/th>&lt;th>Output&lt;/th>&lt;/tr>&lt;/thead>&lt;tr>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;/table>&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/gates/NOT.svg" style="width: 160"/>&lt;/td>&lt;/tr>
&lt;tr>&lt;td>AND&lt;/td>&lt;td>&lt;table>&lt;thead>&lt;tr>&lt;th>A&lt;/th>&lt;th>B&lt;/th>&lt;th>Output&lt;/th>&lt;/tr>&lt;/thead>&lt;tr>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;tr>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;/table>&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/gates/AND.svg" style="width: 160"/>&lt;/td>&lt;/tr>
&lt;tr>&lt;td>NAND&lt;/td>&lt;td>&lt;table>&lt;thead>&lt;tr>&lt;th>A&lt;/th>&lt;th>B&lt;/th>&lt;th>Output&lt;/th>&lt;/tr>&lt;/thead>&lt;tr>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;/table>&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/gates/NAND.svg" style="width: 160"/>&lt;/td>&lt;/tr>
&lt;tr>&lt;td>OR&lt;/td>&lt;td>&lt;table>&lt;thead>&lt;tr>&lt;th>A&lt;/th>&lt;th>B&lt;/th>&lt;th>Output&lt;/th>&lt;/tr>&lt;/thead>&lt;tr>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;tr>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;/table>&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/gates/OR.svg" style="width: 160"/>&lt;/td>&lt;/tr>
&lt;tr>&lt;td>NOR&lt;/td>&lt;td>&lt;table>&lt;thead>&lt;tr>&lt;th>A&lt;/th>&lt;th>B&lt;/th>&lt;th>Output&lt;/th>&lt;/tr>&lt;/thead>&lt;tr>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;/table>&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/gates/NOR.svg" style="width: 160"/>&lt;/td>&lt;/tr>
&lt;tr>&lt;td>XOR&lt;/td>&lt;td>&lt;table>&lt;thead>&lt;tr>&lt;th>A&lt;/th>&lt;th>B&lt;/th>&lt;th>Output&lt;/th>&lt;/tr>&lt;/thead>&lt;tr>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;tr>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;/table>&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/gates/XOR.svg" style="width: 160"/>&lt;/td>&lt;/tr>
&lt;tr>&lt;td>XNOR&lt;/td>&lt;td>&lt;table>&lt;thead>&lt;tr>&lt;th>A&lt;/th>&lt;th>B&lt;/th>&lt;th>Output&lt;/th>&lt;/tr>&lt;/thead>&lt;tr>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;/table>&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/gates/XNOR.svg" style="width: 160"/>&lt;/td>&lt;/tr>
&lt;tr>&lt;td>IMPLY&lt;/td>&lt;td>&lt;table>&lt;thead>&lt;tr>&lt;th>A&lt;/th>&lt;th>B&lt;/th>&lt;th>Output&lt;/th>&lt;/tr>&lt;/thead>&lt;tr>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>0&lt;/td>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>0&lt;/td>&lt;td>0&lt;/td>&lt;/tr>&lt;tr>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;td>1&lt;/td>&lt;/tr>&lt;/table>&lt;/td>&lt;td style="text-align: center;">&lt;img src="https://miccah.io/assets/kb/gates/IMPLY.svg" style="width: 160"/>&lt;/td>&lt;/tr>
&lt;/table>
&lt;p>Combining these basic building blocks we can achieve complex functionality.&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Circuit&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;th>Diagram&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>SR Latch&lt;/td>
 &lt;td>Set / reset latch is a simple circuit to preserve state.&lt;/td>
 &lt;td>&lt;a href="https://miccah.io/assets/kb/gates/RS-LATCH.gif">&lt;img src="https://miccah.io/assets/kb/gates/RS-LATCH.gif" style="width: 200"/>&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table></description></item><item><title>MAC</title><link>https://miccah.io/kb/mac/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/mac/</guid><description>&lt;p>Message authentication code (MAC) is a piece of data that is used to
confirm that the message came from the stated sender and has not been
changed.&lt;/p>
&lt;h2 id="hmac">HMAC&lt;/h2>
&lt;p>HMAC is a specific type of MAC that uses a cryptographic hashing algorithm
along with a secret key.&lt;/p>
&lt;h2 id="encrypt-then-mac">Encrypt-then-MAC&lt;/h2>
&lt;p>Encrypt-then-MAC refers to encrypting the message first, then generating
the MAC using the cipher text. It is preferred over MAC-then-Encrypt
because it:&lt;/p>
&lt;ul>
&lt;li>Provides integrity of the cipher text and plain text&lt;/li>
&lt;li>No information can be leaked from the MAC, assuming the cipher text appears random&lt;/li>
&lt;li>MAC-then-Encrypt must decrypt before authenticating the message
&lt;ul>
&lt;li>Allows an opportunity for vulnerabilities in the decryption implementation&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul></description></item><item><title>Make</title><link>https://miccah.io/kb/make/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/make/</guid><description>&lt;p>Make is a utility to maintain groups of programs. Its purpose is
to automatically determine which pieces of a large program need to
be recompiled and issue the commands to recompile them. Generally,
it can describe any task where some files must be updated automatically
from others whenever the others change.&lt;/p>
&lt;p>Make requires a &lt;strong>Makefile&lt;/strong> to tell it what to do. The rest of
this entry will contain details on Makefile syntax, best practices,
and other useful information.&lt;/p></description></item><item><title>Modular Arithmetic</title><link>https://miccah.io/kb/modular-arithmetic/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/modular-arithmetic/</guid><description>&lt;script>MathJax = { tex: { inlineMath: {'[+]': [['$', '$']]} } };&lt;/script>
&lt;script defer src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js">&lt;/script>
&lt;p>Modular arithmetic is a type of mathematical arithmetic in which numbers
(consisting entirely of integers) wrap around a modulus. An intuitive
example is time past 12:00 wraps around to 1:00, however in math the
possible values are $ \left[0, modulus-1 \right]$.&lt;/p>
&lt;p>A value in modular arithmetic is also the remainder when dividing by the
modulus. This is common in computer science and programming languages
as the &lt;code>%&lt;/code> operator. For example, $12 \bmod{10} \equiv 2$.&lt;/p></description></item><item><title>MSP430</title><link>https://miccah.io/kb/msp430/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/msp430/</guid><description>&lt;p>The MSP430 is a 16-bit MCU from Texas Instruments. It was designed
for low cost and low power environments.&lt;/p>
&lt;p>&lt;a href="https://www.ti.com/lit/ug/slau049f/slau049f.pdf" rel="external" class="sym">User Guide&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://phas.ubc.ca/~michal/phys319/MSP430Reference-RyansEdit.pdf" rel="external" class="sym">Instruction Set&lt;/a>&lt;/p></description></item><item><title>Notebooks</title><link>https://miccah.io/kb/notebooks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/notebooks/</guid><description>&lt;p>For some reason, I really enjoy owning notebooks and writing in
them. My favorite I have found is the &lt;a href="https://www.amazon.com/Leuchtturm1917-Medium-Dotted-Hardcover-Notebook/dp/B002TSIMW4" rel="external" class="sym">Leuchtterm 1917
Notebook&lt;/a>.
It has numbered and dotted pages, a pocket in the back, stickers
for archiving, and a clean style. I wish I had found it in high
school or college!&lt;/p></description></item><item><title>Pickle</title><link>https://miccah.io/kb/pickle/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/pickle/</guid><description>&lt;p>Python includes a serialization library called &lt;code>pickle&lt;/code> to write /
read Python objects. It uses a stack based language for the interpreter.&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Instruction&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>c&lt;/code>&lt;/td>
 &lt;td>Read to the newline as the module name; read the next line as the module object; push &lt;code>module.object&lt;/code> onto the stack&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>(&lt;/code>&lt;/td>
 &lt;td>Push a MARK object onto the stack&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>S&lt;/code>&lt;/td>
 &lt;td>Push trailing string in quotes onto the stack&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>V&lt;/code>&lt;/td>
 &lt;td>Push trailing unicode string in quotes onto the stack&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>l&lt;/code>&lt;/td>
 &lt;td>Pop everything off the stack until MARK into a list; push the list back onto the stack&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>t&lt;/code>&lt;/td>
 &lt;td>Pop everything off the stack until MARK into a tuple; push the tuple back onto the stack&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>R&lt;/code>&lt;/td>
 &lt;td>Pop two objects off the stack (argument and callable); apply the function to the arguments; push the result back onto the stack&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>p&lt;/code>&lt;/td>
 &lt;td>Read to the newline as the &lt;code>index&lt;/code>; peek at the top stack object and store it in memo &lt;code>index&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>g&lt;/code>&lt;/td>
 &lt;td>Read to the newline as the &lt;code>index&lt;/code>; grab an object from memo &lt;code>index&lt;/code> and push onto the stack&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>0&lt;/code>&lt;/td>
 &lt;td>Pop and discard the topmost stack item&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>.&lt;/code>&lt;/td>
 &lt;td>End of the pickle&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="arbitrary-code-execution">Arbitrary Code Execution&lt;/h2>
&lt;p>The following will spawn &lt;code>/bin/sh&lt;/code> when unpickled and is equivalent to:&lt;/p></description></item><item><title>PowerShell</title><link>https://miccah.io/kb/powershell/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/powershell/</guid><description>&lt;p>PowerShell is a command line interpreter originally built for Windows
but is available for all systems. Its best advantage over bash is
its focus on structured data manipulation. It follows a Verb-Noun syntax
which can make remembering commands easier as well.&lt;/p>
&lt;h2 id="hello-world">Hello World&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-powershell" data-lang="powershell">&lt;span style="display:flex;">&lt;span>Write-Output &lt;span style="color:#e6db74">&amp;#34;Hello, World!&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="help">Help&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-powershell" data-lang="powershell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># get examples for Command-Name&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Get-Help -Name Command-Name -Examples
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># discover powershell cmdlets&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Get-Command
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="aliases">Aliases&lt;/h2>
&lt;p>PowerShell has many aliases that map to familiar bash commands. It
is definitely helpful to use aliases because the command syntax
tends to be a lot to type, however I think it&amp;rsquo;s important to know
the underlying command format and not rely on aliases to get by.&lt;/p></description></item><item><title>Python</title><link>https://miccah.io/kb/python/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/python/</guid><description>&lt;p>Python is a general purpose programming language that is very easy
to use. I consider it a &amp;ldquo;high level&amp;rdquo; language because it has object
oriented structures, garbage collection, dynamic typing, and it is
interpreted. Python aims for readable code by using indentation for
code blocks as well.&lt;/p>
&lt;h2 id="hello-world">Hello World&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">&amp;#39;Hello, World!&amp;#39;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="types">Types&lt;/h2>
&lt;p>Python has the expected basic types of any programming language:
boolean, int, float, string, arrays, and hashes. In addition to
those, there are also complex numbers, tuples, and sets.&lt;/p></description></item><item><title>Python Pandas</title><link>https://miccah.io/kb/python-pandas/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/python-pandas/</guid><description>&lt;h2 id="import-data">Import Data&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> pandas &lt;span style="color:#66d9ef">as&lt;/span> pd
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># with headers&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>df &lt;span style="color:#f92672">=&lt;/span> pd&lt;span style="color:#f92672">.&lt;/span>read_csv(&lt;span style="color:#e6db74">&amp;#39;filename.csv&amp;#39;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># without headers&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>df &lt;span style="color:#f92672">=&lt;/span> pd&lt;span style="color:#f92672">.&lt;/span>read_csv(&lt;span style="color:#e6db74">&amp;#39;filename.csv&amp;#39;&lt;/span>, names&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#39;column names&amp;#39;&lt;/span>&lt;span style="color:#f92672">.&lt;/span>split())
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># specific columns&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>df &lt;span style="color:#f92672">=&lt;/span> pd&lt;span style="color:#f92672">.&lt;/span>read_csv(&lt;span style="color:#e6db74">&amp;#39;filename.csv&amp;#39;&lt;/span>, usecols&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#39;column names&amp;#39;&lt;/span>&lt;span style="color:#f92672">.&lt;/span>split())
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="convert-to-datetime">Convert to Datetime&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># automatic conversion&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>df[&lt;span style="color:#e6db74">&amp;#39;column&amp;#39;&lt;/span>] &lt;span style="color:#f92672">=&lt;/span> pd&lt;span style="color:#f92672">.&lt;/span>to_datetime(df[&lt;span style="color:#e6db74">&amp;#39;column&amp;#39;&lt;/span>])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># with format (usually faster)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>df[&lt;span style="color:#e6db74">&amp;#39;column&amp;#39;&lt;/span>] &lt;span style="color:#f92672">=&lt;/span> pd&lt;span style="color:#f92672">.&lt;/span>to_datetime(df[&lt;span style="color:#e6db74">&amp;#39;column&amp;#39;&lt;/span>], format&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#39;&lt;/span>&lt;span style="color:#e6db74">%d&lt;/span>&lt;span style="color:#e6db74">/%m/%Y&amp;#39;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Reference: &lt;a href="https://miccah.io/knowledge/strtime.html#python">strftime&lt;/a>&lt;/p></description></item><item><title>Reconnaissance</title><link>https://miccah.io/kb/recon/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/recon/</guid><description>&lt;h2 id="passive-reconnaissance">Passive Reconnaissance&lt;/h2>
&lt;p>Passive reconnaissance is the act of gathering information about
your target without directly interacting with the target. There is
a lot of information that you can obtain, including employee names
and emails, servers, hostnames, even employee images or badge photos.&lt;/p>
&lt;h3 id="passive-recon-tools">Passive Recon Tools&lt;/h3>
&lt;p>There are many tools out there, but here are some to get started.&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://coursebuilder.withgoogle.com/sample/course" rel="external" class="sym">Google Fu&lt;/a> &amp;ndash; Find hosts, files, or any publicly indexed information&lt;/li>
&lt;/ul>
&lt;pre tabindex="0">&lt;code>site:example.com -site:www.example.com
site:example.com filetype:pdf
site:example.com inurl:etc -intext:etc ext:passwd
&lt;/code>&lt;/pre>&lt;ul>
&lt;li>
&lt;p>&lt;a href="https://transparencyreport.google.com/https/certificates" rel="external" class="sym">Certificate Transparency&lt;/a> &amp;ndash; Find issued certificates&lt;/p></description></item><item><title>REST</title><link>https://miccah.io/kb/rest/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/rest/</guid><description>&lt;p>Representational state transfer (REST) is a software style for creating
web services. A RESTful web service allows the requesting system to
access and manipulate textual representations of resources by using a
uniform and predefined set of stateless operations.&lt;/p>
&lt;h2 id="resources">Resources&lt;/h2>
&lt;p>There are two types of resources: &lt;strong>collection&lt;/strong> and &lt;strong>member&lt;/strong>. A
member resource is a single resource that the system will manipulate. A
collection resource is a collection of members in which a single operation
can be applied to all members of the collection.&lt;/p></description></item><item><title>Ruby</title><link>https://miccah.io/kb/ruby/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/ruby/</guid><description>&lt;p>Ruby is a programming language that is similar to Python but with
notable differences. I consider it a &amp;ldquo;high level&amp;rdquo; language because
it uses dynamic types, garbage collection, and everything is an
object. Its syntax is designed to make the programmer happy and
is generally minimalist.&lt;/p>
&lt;h2 id="hello-world">Hello World&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-ruby" data-lang="ruby">&lt;span style="display:flex;">&lt;span>puts &lt;span style="color:#e6db74">&amp;#39;Hello, World!&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="symbols">Symbols&lt;/h2>
&lt;p>One interesting features of Ruby is the idea of a symbol. A symbol
is a program wide unique identifier for anything. There is no need
to create them or assign them. To reference a method, you can use
its symbol. A symbol looks like a variable prefixed with a colon:
&lt;code>:symbol&lt;/code>.&lt;/p></description></item><item><title>Rust</title><link>https://miccah.io/kb/rust/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/rust/</guid><description>&lt;p>Rust is a systems programming language designed for memory safety
and performance. It takes a novel approach to memory management
through an ownership system. The rust compiler keeps track of which
variables own data (memory on the heap), and will free the data when
the variable goes out of scope. It also keeps track of where the data
is borrowed (where it is referenced) with distinction between mutable
and immutable references. Overall, it can be a bit difficult to write
rust programs at the beginning, but it gets easier with practice and
makes you think differently about your program.&lt;/p></description></item><item><title>Songs that Build</title><link>https://miccah.io/kb/songs-that-build/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/songs-that-build/</guid><description>&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Title&lt;/th>
 &lt;th>Artist&lt;/th>
 &lt;th>Link&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>Auto Rock&lt;/td>
 &lt;td>Mogwai&lt;/td>
 &lt;td>&lt;a href="https://www.youtube.com/watch?v=9hMw9AavXqU" rel="external" class="sym">YouTube&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Intro&lt;/td>
 &lt;td>The XX&lt;/td>
 &lt;td>&lt;a href="https://www.youtube.com/watch?v=veHqJSC-9Lo" rel="external" class="sym">YouTube&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>I Will Possess Your Heart&lt;/td>
 &lt;td>Death Cab for Cutie&lt;/td>
 &lt;td>&lt;a href="https://www.youtube.com/watch?v=pq-yP7mb8UE" rel="external" class="sym">YouTube&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>The Pretender&lt;/td>
 &lt;td>Foo Fighters&lt;/td>
 &lt;td>&lt;a href="https://www.youtube.com/watch?v=SBjQ9tuuTJQ" rel="external" class="sym">YouTube&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>But, Honestly&lt;/td>
 &lt;td>Foo Fighters&lt;/td>
 &lt;td>&lt;a href="https://www.youtube.com/watch?v=7DtCdO6jfG0" rel="external" class="sym">YouTube&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>The Ecstasy of Gold&lt;/td>
 &lt;td>Ennio Morricone&lt;/td>
 &lt;td>&lt;a href="https://www.youtube.com/watch?v=AZhYCERJp4s" rel="external" class="sym">YouTube&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Dream On&lt;/td>
 &lt;td>Aerosmith&lt;/td>
 &lt;td>&lt;a href="https://www.youtube.com/watch?v=cvCFRGn7EEQ" rel="external" class="sym">YouTube&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Lux Aeterna&lt;/td>
 &lt;td>Kronos Quartet&lt;/td>
 &lt;td>&lt;a href="https://www.youtube.com/watch?v=oc3Cq89P97Y" rel="external" class="sym">YouTube&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table></description></item><item><title>SQL Injection</title><link>https://miccah.io/kb/sqli/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/sqli/</guid><description>&lt;p>SQL injection is a type of attack that injects malicious SQL statements
into input forms in an attempt to bypass authorization or retrieve
sensitive information directly from the SQL database.&lt;/p>
&lt;p>Essentially, user-supplied SQL statements are being executed on the
database. This happens usually by improper sanitation of inputs, or
improperly creating the query.&lt;/p>
&lt;h2 id="example">Example&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-php" data-lang="php">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">statement&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;SELECT * FROM users WHERE name = &amp;#39;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#a6e22e">userName&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;#39;;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using the input &lt;code>' OR '1'='1&lt;/code> we get the statement&lt;/p></description></item><item><title>SSL/TLS</title><link>https://miccah.io/kb/ssl-tls/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/ssl-tls/</guid><description>&lt;p>&lt;strong>SSL&lt;/strong> (secure sockets layer) and &lt;strong>TLS&lt;/strong> (transport layer security)
are two protocols that attempt to provide &lt;em>confidentiality&lt;/em>, &lt;em>integrity&lt;/em>,
and &lt;em>authentication&lt;/em> when communicating across networks. Technically,
the &lt;strong>SSL&lt;/strong> protocols are deprecated in favor of &lt;strong>TLS&lt;/strong>, however these
two terms are often used interchangeably because TLS built off of SSL.&lt;/p>
&lt;p>Confidentiality, integrity, and authentication are common properties in
information security.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Confidentiality&lt;/strong> - only authorized individuals have access to information&lt;/li>
&lt;li>&lt;strong>Integrity&lt;/strong> - the information has not been modified&lt;/li>
&lt;li>&lt;strong>Authentication&lt;/strong> - individuals are who they say they are&lt;/li>
&lt;/ul>
&lt;p>Confidentiality is provided by encryption (either asymmetric or
symmetric) and integrity and authentication is provided by hashing and
&lt;a href="https://miccah.io/knowledge/mac.html">MACs&lt;/a>. Authentication cannot be fully provided
without a &lt;strong>Certificate Authority&lt;/strong>, however.&lt;/p></description></item><item><title>strtime</title><link>https://miccah.io/kb/strtime/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/strtime/</guid><description>&lt;h2 id="gnu-date">GNU Date&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Directive&lt;/th>
 &lt;th>Meaning&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>%%&lt;/code>&lt;/td>
 &lt;td>a literal %&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%a&lt;/code>&lt;/td>
 &lt;td>locale&amp;rsquo;s abbreviated weekday name (e.g., Sun)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%A&lt;/code>&lt;/td>
 &lt;td>locale&amp;rsquo;s full weekday name (e.g., Sunday)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%b&lt;/code>&lt;/td>
 &lt;td>locale&amp;rsquo;s abbreviated month name (e.g., Jan)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%B&lt;/code>&lt;/td>
 &lt;td>locale&amp;rsquo;s full month name (e.g., January)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%c&lt;/code>&lt;/td>
 &lt;td>locale&amp;rsquo;s date and time (e.g., Thu Mar 3 23:05:25 2005)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%C&lt;/code>&lt;/td>
 &lt;td>century; like %Y, except omit last two digits (e.g., 20)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%d&lt;/code>&lt;/td>
 &lt;td>day of month (e.g., 01)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%D&lt;/code>&lt;/td>
 &lt;td>date; same as %m/%d/%y&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%e&lt;/code>&lt;/td>
 &lt;td>day of month, space padded; same as %_d&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%F&lt;/code>&lt;/td>
 &lt;td>full date; like %+4Y-%m-%d&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%g&lt;/code>&lt;/td>
 &lt;td>last two digits of year of ISO week number (see %G)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%G&lt;/code>&lt;/td>
 &lt;td>year of ISO week number (see %V); normally useful only with %V&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%h&lt;/code>&lt;/td>
 &lt;td>same as %b&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%H&lt;/code>&lt;/td>
 &lt;td>hour (00..23)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%I&lt;/code>&lt;/td>
 &lt;td>hour (01..12)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%j&lt;/code>&lt;/td>
 &lt;td>day of year (001..366)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%k&lt;/code>&lt;/td>
 &lt;td>hour, space padded ( 0..23); same as %_H&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%l&lt;/code>&lt;/td>
 &lt;td>hour, space padded ( 1..12); same as %_I&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%m&lt;/code>&lt;/td>
 &lt;td>month (01..12)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%M&lt;/code>&lt;/td>
 &lt;td>minute (00..59)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%n&lt;/code>&lt;/td>
 &lt;td>a newline&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%N&lt;/code>&lt;/td>
 &lt;td>nanoseconds (000000000..999999999)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%p&lt;/code>&lt;/td>
 &lt;td>locale&amp;rsquo;s equivalent of either AM or PM; blank if not known&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%P&lt;/code>&lt;/td>
 &lt;td>like %p, but lower case&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%q&lt;/code>&lt;/td>
 &lt;td>quarter of year (1..4)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%r&lt;/code>&lt;/td>
 &lt;td>locale&amp;rsquo;s 12-hour clock time (e.g., 11:11:04 PM)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%R&lt;/code>&lt;/td>
 &lt;td>24-hour hour and minute; same as %H:%M&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%s&lt;/code>&lt;/td>
 &lt;td>seconds since 1970-01-01 00:00:00 UTC&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%S&lt;/code>&lt;/td>
 &lt;td>second (00..60)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%t&lt;/code>&lt;/td>
 &lt;td>a tab&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%T&lt;/code>&lt;/td>
 &lt;td>time; same as %H:%M:%S&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%u&lt;/code>&lt;/td>
 &lt;td>day of week (1..7); 1 is Monday&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%U&lt;/code>&lt;/td>
 &lt;td>week number of year, with Sunday as first day of week (00..53)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%V&lt;/code>&lt;/td>
 &lt;td>ISO week number, with Monday as first day of week (01..53)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%w&lt;/code>&lt;/td>
 &lt;td>day of week (0..6); 0 is Sunday&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%W&lt;/code>&lt;/td>
 &lt;td>week number of year, with Monday as first day of week (00..53)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%x&lt;/code>&lt;/td>
 &lt;td>locale&amp;rsquo;s date representation (e.g., 12/31/99)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%X&lt;/code>&lt;/td>
 &lt;td>locale&amp;rsquo;s time representation (e.g., 23:13:48)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%y&lt;/code>&lt;/td>
 &lt;td>last two digits of year (00..99)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%Y&lt;/code>&lt;/td>
 &lt;td>year&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%z&lt;/code>&lt;/td>
 &lt;td>+hhmm numeric time zone (e.g., -0400)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%:z&lt;/code>&lt;/td>
 &lt;td>+hh:mm numeric time zone (e.g., -04:00)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%::z&lt;/code>&lt;/td>
 &lt;td>+hh:mm:ss numeric time zone (e.g., -04:00:00)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%:::z&lt;/code>&lt;/td>
 &lt;td>numeric time zone with : to necessary precision (e.g., -04, +05:30)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>%Z&lt;/code>&lt;/td>
 &lt;td>alphabetic time zone abbreviation (e.g., EDT)&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>By default, date pads numeric fields with zeroes. The following optional flags may follow &lt;code>%&lt;/code>:&lt;/p></description></item><item><title>Systemd</title><link>https://miccah.io/kb/systemd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/systemd/</guid><description>&lt;p>A suite of basic building blocks for initalizing and managing a Linux system.&lt;/p>
&lt;h2 id="units">Units&lt;/h2>
&lt;p>The basic object that &lt;code>systmed&lt;/code> manages is a unit. There are many types, but
the most common is a &lt;code>service&lt;/code> unit, which we can interact with via the
&lt;code>systmectl&lt;/code> command.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># start, stop, and restart a service&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo systemctl start nginx.service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo systemctl stop nginx.service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo systemctl restart nginx.service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># reload a service&amp;#39;s configuration (not unit configuration)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo systemctl reload nginx.service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># reload a service&amp;#39;s unit configuration&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo systemctl daemon-reload nginx.service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># get the status of a unit&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>systemctl status nginx.service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># control whether the service starts on bootup&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo systemctl enable nginx.service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo systemctl disable nginx.service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># get unit information&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>systemctl list-units
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>To inspect a unit file, the following commands can be used.&lt;/p></description></item><item><title>TCP</title><link>https://miccah.io/kb/tcp/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/tcp/</guid><description>&lt;p>Transmission Control Protocol is a network communication protocol
designed to reliably send ordered data packets over an IP network.&lt;/p>
&lt;h2 id="segment-structure">Segment Structure&lt;/h2>
&lt;p>A TCP segment consists of a TCP header and a data section. There
are 10 mandatory fields for the header.&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Field&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;th>Offset&lt;/th>
 &lt;th>Size (Bits)&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;strong>Source port&lt;/strong>&lt;/td>
 &lt;td>The sending port&lt;/td>
 &lt;td>0&lt;/td>
 &lt;td>16&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Destination port&lt;/strong>&lt;/td>
 &lt;td>The receiving port&lt;/td>
 &lt;td>16&lt;/td>
 &lt;td>16&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Sequence number&lt;/strong>&lt;/td>
 &lt;td>The initial sequence number (if SYN set) otherwise the accumulated sequence number&lt;/td>
 &lt;td>32&lt;/td>
 &lt;td>32&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Acknowledgement number&lt;/strong>&lt;/td>
 &lt;td>If ACK set, the expectant next sequence number&lt;/td>
 &lt;td>64&lt;/td>
 &lt;td>32&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Data offset&lt;/strong>&lt;/td>
 &lt;td>Size of the TCP header in 32-bit words (min 5, max 15)&lt;/td>
 &lt;td>96&lt;/td>
 &lt;td>4&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Reserved&lt;/strong>&lt;/td>
 &lt;td>For future use (should be set to 000)&lt;/td>
 &lt;td>100&lt;/td>
 &lt;td>3&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Flags&lt;/strong>&lt;/td>
 &lt;td>9 1-bit flags&lt;/td>
 &lt;td>103&lt;/td>
 &lt;td>9&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Window Size&lt;/strong>&lt;/td>
 &lt;td>The size of the receive window&lt;/td>
 &lt;td>112&lt;/td>
 &lt;td>16&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Checksum&lt;/strong>&lt;/td>
 &lt;td>Error checking for the header&lt;/td>
 &lt;td>128&lt;/td>
 &lt;td>16&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Urgent pointer&lt;/strong>&lt;/td>
 &lt;td>If URG is set, offset from the sequence number indicating the last urgent data byte&lt;/td>
 &lt;td>144&lt;/td>
 &lt;td>16&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Options&lt;/strong>&lt;/td>
 &lt;td>Optional header fields&lt;/td>
 &lt;td>160&lt;/td>
 &lt;td>0-320&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>The flags section indicates which fields are relevant in the header. There are 9 total flags.&lt;/p></description></item><item><title>tmux</title><link>https://miccah.io/kb/tmux/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/tmux/</guid><description>&lt;h1 id="tmux">tmux&lt;/h1>
&lt;p>&lt;code>tmux&lt;/code> is a terminal multiplexer that allows for multiple virtual
terminals to be created and controlled from a single screen. &lt;code>tmux&lt;/code> may
be detached from a screen and continue running in the background, then
later reattached.&lt;/p>
&lt;p>It is great especially to ssh into another computer for long running jobs
or simply have access to multiple terminals from the same ssh connection.&lt;/p>
&lt;h2 id="usage">Usage&lt;/h2>
&lt;p>From the command line, you may start a new session or attach to an
existing session like so.&lt;/p></description></item><item><title>UART</title><link>https://miccah.io/kb/uart/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/uart/</guid><description>&lt;p>&lt;strong>Universal Asynchronous Receiver-Transmitter&lt;/strong> (UART) is a serial
communication protocol, usually used in embedded systems. It requires
only two wires (plus a common ground). One wire transmits and the other
wire receives. Each device controls their transmitter and reads from
the receiver. Data is transmitted and received one bit at a time. Common
&lt;strong>baud rates&lt;/strong> are 115200 and 9600 bits per second.&lt;/p>
&lt;h2 id="protocol">Protocol&lt;/h2>
&lt;p>UART can be configured for different transmissions including parity
bits, however the most common configuration is 8-bit frames with no
parity. Additionally, data is always sent from least significant bit
to most.&lt;/p></description></item><item><title>V</title><link>https://miccah.io/kb/v/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/v/</guid><description>&lt;p>V is a very young compiled language targeting many domains. It&amp;rsquo;s a very
exciting project that has a lot of potential in many domains. I would
best describe it as a mix of &lt;a href="https://miccah.io/knowledge/rust.html">Rust&lt;/a> and
&lt;a href="https://miccah.io/knowledge/go.html">Go&lt;/a>.&lt;/p>
&lt;h2 id="hello-world">Hello World&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go" data-lang="go">&lt;span style="display:flex;">&lt;span>println(&lt;span style="color:#960050;background-color:#1e0010">&amp;#39;&lt;/span>&lt;span style="color:#a6e22e">Hello&lt;/span>, &lt;span style="color:#a6e22e">World&lt;/span>!&lt;span style="color:#960050;background-color:#1e0010">&amp;#39;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="option-and-results">Option and Results&lt;/h2>
&lt;p>V combines &lt;code>Option&lt;/code> and &lt;code>Result&lt;/code> into one type, and forces you to handle
errors directly at the call site. A variable cannot be an &lt;code>Option&lt;/code> type.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go" data-lang="go">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">fn&lt;/span> &lt;span style="color:#a6e22e">maybe&lt;/span>(&lt;span style="color:#a6e22e">n&lt;/span> &lt;span style="color:#66d9ef">int&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">?&lt;/span>&lt;span style="color:#66d9ef">int&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> &lt;span style="color:#a6e22e">n&lt;/span> &amp;lt; &lt;span style="color:#ae81ff">10&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> error(&lt;span style="color:#960050;background-color:#1e0010">&amp;#39;&lt;/span>&lt;span style="color:#a6e22e">expected&lt;/span> &lt;span style="color:#a6e22e">n&lt;/span> &lt;span style="color:#f92672">&amp;gt;=&lt;/span> &lt;span style="color:#ae81ff">10&lt;/span>&lt;span style="color:#960050;background-color:#1e0010">&amp;#39;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#a6e22e">n&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// handle with `or` block
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">n&lt;/span> &lt;span style="color:#f92672">:=&lt;/span> &lt;span style="color:#a6e22e">maybe&lt;/span>(&lt;span style="color:#ae81ff">5&lt;/span>) &lt;span style="color:#a6e22e">or&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> panic(&lt;span style="color:#960050;background-color:#1e0010">&amp;#39;&lt;/span>&lt;span style="color:#66d9ef">error&lt;/span>: &lt;span style="color:#960050;background-color:#1e0010">$&lt;/span>&lt;span style="color:#a6e22e">err&lt;/span>&lt;span style="color:#960050;background-color:#1e0010">&amp;#39;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// handle with default value
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">n&lt;/span> &lt;span style="color:#f92672">:=&lt;/span> &lt;span style="color:#a6e22e">maybe&lt;/span>(&lt;span style="color:#ae81ff">5&lt;/span>) &lt;span style="color:#a6e22e">or&lt;/span> { &lt;span style="color:#ae81ff">0&lt;/span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// bubble up the error
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">n&lt;/span> &lt;span style="color:#f92672">:=&lt;/span> &lt;span style="color:#a6e22e">maybe&lt;/span>(&lt;span style="color:#ae81ff">5&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">?&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="concurrency">Concurrency&lt;/h2>
&lt;p>V takes inspiration from Go&amp;rsquo;s concurrency model from a developer&amp;rsquo;s
perspective, however it uses system threads instead of green
threads. There is no V runtime to manage them. V also has some nice
thread ergonomics not available in Go.&lt;/p></description></item><item><title>Veganism</title><link>https://miccah.io/kb/veganism/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/veganism/</guid><description>&lt;p>Veganism is the practice of abstaining from using animal products,
especially in food, but it applies to all parts of life.&lt;/p>
&lt;h2 id="benefits">Benefits&lt;/h2>
&lt;p>Eating vegan benefits the animals, environment, and your health and
well being. It is a win-win situation where everyone is better off.
There are no real disadvantages to eating a plant based diet. The
only one I can see is the social pressure. Unsupportive friends
or family members can strongly influence your decisions, and they
probably are not your real friends if they negatively influence you.&lt;/p></description></item><item><title>vim</title><link>https://miccah.io/kb/vim/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/vim/</guid><description>&lt;h1 id="vim">vim&lt;/h1>
&lt;h2 id="plugins">Plugins&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/myusuf3/numbers.vim" rel="external" class="sym">myusuf3/numbers.vim&lt;/a>: Relative line numbering&lt;/li>
&lt;li>&lt;a href="https://github.com/tpope/vim-commentary" rel="external" class="sym">tpope/vim-commentary&lt;/a>: Comment out lines with &lt;code>gc&lt;/code>&lt;/li>
&lt;li>&lt;a href="https://github.com/tpope/vim-surround" rel="external" class="sym">tpope/vim-surround&lt;/a>: Change surrounding characters (&lt;code>'``&amp;quot;``` &lt;/code> ```()&lt;code>[]&lt;/code>{}&lt;code>)with &lt;/code>cs[(`&lt;/li>
&lt;li>&lt;a href="https://github.com/iamcco/markdown-preview.nvim" rel="external" class="sym">iamcco/markdown-preview.nvim&lt;/a>: Render markdown file in realtime with &lt;code>:MarkdownPreview&lt;/code>&lt;/li>
&lt;li>&lt;a href="https://github.com/airblade/vim-gitgutter" rel="external" class="sym">airblade/vim-gitgutter&lt;/a>: Show git diff in the gutter&lt;/li>
&lt;/ul>
&lt;h2 id="default-binds">Default Binds&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Bind&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>gf&lt;/code>&lt;/td>
 &lt;td>Goto file. Start editing the file under the cursor.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>gF&lt;/code>&lt;/td>
 &lt;td>Start editing the file under the cursor and jump to the line number following the filename.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>gd&lt;/code>&lt;/td>
 &lt;td>Goto definition.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>ga&lt;/code>&lt;/td>
 &lt;td>Print ASCII value of character under the cursor.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>]p&lt;/code>&lt;/td>
 &lt;td>Paste line matching indent of current line.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>-af&lt;/code>&lt;/td>
 &lt;td>Action around function (e.g. &lt;code>daf&lt;/code> is delete around function)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>-as&lt;/code>&lt;/td>
 &lt;td>Action around sentence.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="custom-binds">Custom Binds&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-vimrc" data-lang="vimrc">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&amp;#34; Semicolon in normal mode is the same as colon&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">nnoremap&lt;/span> ; :
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&amp;#34; Escape key also mapped as pushing j and k&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">inoremap&lt;/span> &lt;span style="color:#a6e22e">jk&lt;/span> &amp;lt;&lt;span style="color:#a6e22e">Esc&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">inoremap&lt;/span> &lt;span style="color:#a6e22e">kj&lt;/span> &amp;lt;&lt;span style="color:#a6e22e">Esc&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">autocmd&lt;/span> &lt;span style="color:#a6e22e">InsertEnter&lt;/span> * &lt;span style="color:#66d9ef">set&lt;/span> &lt;span style="color:#a6e22e">timeoutlen&lt;/span>=&lt;span style="color:#ae81ff">75&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">autocmd&lt;/span> &lt;span style="color:#a6e22e">InsertLeave&lt;/span> * &lt;span style="color:#66d9ef">set&lt;/span> &lt;span style="color:#a6e22e">timeoutlen&lt;/span>=&lt;span style="color:#ae81ff">1000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&amp;#34; Split moving&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">set&lt;/span> &lt;span style="color:#a6e22e">splitbelow&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">set&lt;/span> &lt;span style="color:#a6e22e">splitright&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">nnoremap&lt;/span> &amp;lt;&lt;span style="color:#a6e22e">C&lt;/span>-&lt;span style="color:#a6e22e">L&lt;/span>&amp;gt; &amp;lt;&lt;span style="color:#a6e22e">C&lt;/span>-&lt;span style="color:#a6e22e">W&lt;/span>&amp;gt;&lt;span style="color:#a6e22e">w&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">nnoremap&lt;/span> &amp;lt;&lt;span style="color:#a6e22e">C&lt;/span>-&lt;span style="color:#a6e22e">H&lt;/span>&amp;gt; &amp;lt;&lt;span style="color:#a6e22e">C&lt;/span>-&lt;span style="color:#a6e22e">W&lt;/span>&amp;gt;&lt;span style="color:#a6e22e">W&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&amp;#34; Tab moving&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">nnoremap&lt;/span> &amp;lt;&lt;span style="color:#a6e22e">C&lt;/span>-&lt;span style="color:#a6e22e">J&lt;/span>&amp;gt; :&lt;span style="color:#a6e22e">tabnext&lt;/span>&amp;lt;&lt;span style="color:#a6e22e">CR&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">nnoremap&lt;/span> &amp;lt;&lt;span style="color:#a6e22e">C&lt;/span>-&lt;span style="color:#a6e22e">K&lt;/span>&amp;gt; :&lt;span style="color:#a6e22e">tabprev&lt;/span>&amp;lt;&lt;span style="color:#a6e22e">CR&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&amp;#34; Format&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">nnoremap&lt;/span> &amp;lt;&lt;span style="color:#a6e22e">C&lt;/span>-&lt;span style="color:#a6e22e">O&lt;/span>&amp;gt; !!&lt;span style="color:#a6e22e">fmt&lt;/span>&amp;lt;&lt;span style="color:#a6e22e">CR&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&amp;#34; Goto file will open in new tab&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">map&lt;/span> &lt;span style="color:#a6e22e">gf&lt;/span> &amp;lt;&lt;span style="color:#a6e22e">C&lt;/span>-&lt;span style="color:#a6e22e">W&lt;/span>&amp;gt;&lt;span style="color:#a6e22e">gF&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>WS2812B</title><link>https://miccah.io/kb/ws2812b/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/ws2812b/</guid><description>&lt;p>WS2812B is a control circuit and serial protocol used for controlling LEDs
(usually in a strip). It requires only a single wire for data transfer
in addition to power (5V) and ground. Each LED is addressable using this
protocol as well.&lt;/p>
&lt;h2 id="protocol">Protocol&lt;/h2>
&lt;p>Because it uses a single wire, communication is done serially one bit
at a time. 24 bits of data is sent for each LED (GRB) in the circuit
followed by a reset code. Each circuit consumes the first 24 bits it
receives and passes the rest of the data along the line.&lt;/p></description></item><item><title>x86 Assembly</title><link>https://miccah.io/kb/x86/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/x86/</guid><description>&lt;h1 id="x86-assembly">x86 Assembly&lt;/h1>
&lt;p>x86 (32-bit) and x86-64 (64-bit) assembly is syntactic sugar for
machine code that gets executed by a CPU. The two flavors of assembly
are intel and att, however intel is much more digestible.&lt;/p>
&lt;p>&lt;a href="https://guyinatuxedo.github.io/01-intro_assembly/assembly/index.html" rel="external" class="sym">Assembly Introduction Reference&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://en.wikibooks.org/wiki/X86_Assembly/X86_Architecture" rel="external" class="sym">Wikibooks Reference&lt;/a>&lt;/p>
&lt;h2 id="registers">Registers&lt;/h2>
&lt;p>There are 16 registers available, 3 of which are special purpose.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>rbp:&lt;/strong> base pointer (points to the bottom of the stack frame)&lt;/li>
&lt;li>&lt;strong>rsp:&lt;/strong> stack pointer (points to the top of the stack)&lt;/li>
&lt;li>&lt;strong>rip:&lt;/strong> instruction pointer (points to the instruction to be executed)&lt;/li>
&lt;/ul>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th style="text-align: center">8 Byte Register&lt;/th>
 &lt;th style="text-align: center">Lower 4 Bytes&lt;/th>
 &lt;th style="text-align: center">Lower 2 Bytes&lt;/th>
 &lt;th style="text-align: center">Lower Byte&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>rbp&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>ebp&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>bp&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>bpl&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>rsp&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>esp&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>sp&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>spl&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>rip&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>eip&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;/td>
 &lt;td style="text-align: center">&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>rax&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>eax&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>ax&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>al&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>rbx&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>ebx&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>bx&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>bl&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>rcx&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>ecx&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>cx&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>cl&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>rdx&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>edx&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>dx&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>dl&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>rsi&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>esi&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>si&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>sil&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>rdi&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>edi&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>di&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>dil&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>r8&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r8d&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r8w&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r8b&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>r9&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r9d&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r9w&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r9b&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>r10&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r10d&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r10w&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r10b&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>r11&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r11d&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r11w&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r11b&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>r12&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r12d&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r12w&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r12b&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>r13&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r13d&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r13w&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r13b&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>r14&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r14d&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r14w&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r14b&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: center">&lt;code>r15&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r15d&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r15w&lt;/code>&lt;/td>
 &lt;td style="text-align: center">&lt;code>r15b&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="segment-registers">Segment Registers&lt;/h3>
&lt;p>Early CPU implementations had special registers for &lt;a href="https://en.wikipedia.org/wiki/Memory_segmentation" rel="external" class="sym">memory
segmentation&lt;/a>,
essentially allowing more addresses than could fit in a single register.
The x86-64 architecture does not use segmentation in 64-bit mode, though
it is still supported for backwards compatibility. In 64-bit mode, all
segment registers are forced to 0 except for FS and GS which allows the
OS to use them for special purposes.&lt;/p></description></item><item><title>XSS</title><link>https://miccah.io/kb/xss/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miccah.io/kb/xss/</guid><description>&lt;p>XSS is a vulnerability in a website that allows an attacker to inject
client-side scripts into web pages viewed by other clients. A common
target for this attack is user session cookies.&lt;/p>
&lt;h2 id="types">Types&lt;/h2>
&lt;p>&lt;strong>Non-persistent (reflected)&lt;/strong> XSS vulnerabilities simply take user input
(e.g. via a form query parameter) and uses it as part of the HTML body
or other form of evaluation. The attacker can craft a URL containing
the attack and send it to the victim.&lt;/p></description></item></channel></rss>