<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[John's thoughts]]></title><description><![CDATA[My thoughts on various topics. Built with GatsbyJS.]]></description><link>https://johndpelingo.com</link><generator>GatsbyJS</generator><lastBuildDate>Sun, 09 Jan 2022 12:19:45 GMT</lastBuildDate><item><title><![CDATA[TypeScript | Type Keys and Values as Type]]></title><description><![CDATA[Now one can reuse the initial type definition instead of hard-coding a new type
with the same values twice. Playground
example.]]></description><link>https://johndpelingo.com/notes/typecript-type-keys-and-values-as-type/</link><guid isPermaLink="false">https://johndpelingo.com/notes/typecript-type-keys-and-values-as-type/</guid><pubDate>Sun, 29 Aug 2021 00:00:00 GMT</pubDate><content:encoded>&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;typescript&quot;&gt;&lt;pre class=&quot;language-typescript&quot;&gt;&lt;code class=&quot;language-typescript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Status&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  all&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;
  active&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;
  inactive&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;// &apos;all&apos; | &apos;active&apos; | &apos;inactive&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;StatusText&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;keyof&lt;/span&gt; Status
&lt;span class=&quot;token comment&quot;&gt;// 0 | 1 | 2&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;StatusNumber&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Status&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;StatusText&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;// Good&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; statusText&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; StatusText &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;active&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; statusNumber&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; StatusNumber &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;// Bad&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; wrongStatusText&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; StatusText &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;possible&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; wrongStatusNumber&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; StatusNumber &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now one can reuse the initial type definition instead of hard-coding a new type
with the same values twice.&lt;/p&gt;
&lt;p&gt;Playground
&lt;a href=&quot;https://www.typescriptlang.org/play?#code/C4TwDgpgBAysCGwCuBnKBeKBvAUFK8ANoQFxQAMeBAxsAJYBuEZAjFXQHby2PNQBMOAL44cAejFQA5EUJSoAH2nd6TeUqmcVvKTlCRYCZCgAqEAB7AMUANYQQAewBmhxKnGTyiqC2+D90HBuKABySAC2AEYQAE7WQcYA2gmoZpYAuqISUADiDg4AJjjUDhwoVuXBacBkKaYWVpgyPGrFpeVQlcZhUbG1Rqg90XGYFFmSAELwRSVlVgDuMaUA5nXV-VUN1lJgDigodJGEELqzHYsrdUN9rt0Rw9YAzEA&quot;&gt;example&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Rust Cheat Sheet]]></title><description><![CDATA[Non-peace Zone Monuments Name Size Recommended Radiation Protection Wood Crate Military Crate Elite Crate Utilities Puzzle Abandoned Cabins…]]></description><link>https://johndpelingo.com/posts/rust-cheat-sheet/</link><guid isPermaLink="false">https://johndpelingo.com/posts/rust-cheat-sheet/</guid><pubDate>Fri, 26 Feb 2021 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;Non-peace Zone Monuments&lt;/h1&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;Size&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;Recommended Radiation Protection&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;Wood Crate&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;Military Crate&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;Elite Crate&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;Utilities&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;Puzzle&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Abandoned Cabins&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Small&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Abandoned Supermarket&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Small&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lighthouse&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Small&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️️&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mining Outpost&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Small&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️🛠&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oxum’s Gas Station&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Small&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Junkyard&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The Dome&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;11%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;🛢🛢&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sewer Branch&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;10%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️♻️🛢&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;⚡🟩&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Harbor 1&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️🛢&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;⚡️🟩&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Harbor 2&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️🛢&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;⚡️🟩&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large Excavator Pit&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Satellite Dish&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;11%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️🛠🔍&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;⚡️🟩&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Power Plant&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;25%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️♻️🛢🛢🛠🔍⛽&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;⚡️🟩🟦&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Train Yard&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;25%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️️🛢🛠⛽&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;⚡(️🟩)🟦&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Airfield&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;10%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️♻️🛢🛠🔍&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;⚡⚡️🟩🟦&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Water Treatment Plant&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;25%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;-&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️🛢️🛢🛠🛠⛽&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;⚡️🟦&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small Oil Rig&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;️ -&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;️(🟩)🟦🟥&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large Oil Rig&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;️ -&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;🟩🟦🟥&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Military Tunnels&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;25%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;⚡️🟩🟦🟥&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Launch Site&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Large&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;50%&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;✅&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;♻️🛢🛠️🔍&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;⚡⚡️🟩🟥&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;Sprinklers&lt;/h1&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Number of Planter Boxes&lt;/th&gt;
&lt;th&gt;Output per Planter Box&lt;/th&gt;
&lt;th&gt;Ceiling Lights Needed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;180 ml/min&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;84 ml/min&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;60 ml/min&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;36 ml/min&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;36 ml/min&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;24 ml/min&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;24 ml/min&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;12 ml/min&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;12 ml/min&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;12 ml/min&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;12 ml/min&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;12 ml/min&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;12 ml/min&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;12 ml/min&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;12 ml/min&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;CCTV Camera Codes&lt;/h1&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Monument&lt;/th&gt;
&lt;th&gt;Camera Code&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Abandoned Cabins&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Abandoned Supermarket&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Airfield&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;AIRFIELDHELIPAD&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bandit Camp&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;CASINO&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;TOWNWEAPONS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fishing Village&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large Excavator Pit&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HQM Quarry&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Harbor 1&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Harbor 2&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Junkyard&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large Barn&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large Fishing Village&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large Oil Rig&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;OILRIG2HELI&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2EXHAUST&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2L6A&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2L6B&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2L6C&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2L6D&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2L5&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2L4&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2L3A&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2L3B&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2L2&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2L1&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG2DOCK&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Launch Site&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lighthouse&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Military Tunnels&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mining Outpost&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Outpost&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;COMPOUNDCRUDE&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;COMPOUNDMUSIC&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;COMPOUNDSTREET&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oxum’s Gas Station&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Power Plant&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ranch&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Satellite Dish&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sewer Branch&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small Oil Rig&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;OILRIG1HELI&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG1EXHAUST&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG1L4&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG1L3&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG1L2&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG1L1&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;OILRIG1DOCK&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stone Quarry&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sulfur Quarry&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The Dome&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;DOME1&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;DOMETOP&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Train Yard&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Water Treatment Plant&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;Large Excavator Pit&lt;/h1&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Resource&lt;/th&gt;
&lt;th&gt;Amount every 2 minutes (1 Diesel Fuel === 2 minutes)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;High Quality Metal Ore&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sulfur Ore&lt;/td&gt;
&lt;td&gt;750&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Metal Ore&lt;/td&gt;
&lt;td&gt;2000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stones&lt;/td&gt;
&lt;td&gt;5000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;Pager Codes&lt;/h1&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Monument&lt;/th&gt;
&lt;th&gt;Frequency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Large Excavator Pit&lt;/td&gt;
&lt;td&gt;4777 Mhz&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large Oil Rig&lt;/td&gt;
&lt;td&gt;4768 Mhz&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small Oil Rig&lt;/td&gt;
&lt;td&gt;4765 Mhz&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;Notes&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Negative genes have a stronger crossbreeding weight than positive genes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Useful Links&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;All Blueprints: &lt;a href=&quot;https://rustlabs.com/blueprint-tracker&quot;&gt;https://rustlabs.com/blueprint-tracker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;All Items: &lt;a href=&quot;https://rustlabs.com/group=itemlist&quot;&gt;https://rustlabs.com/group=itemlist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Detailed Information about Rust: &lt;a href=&quot;https://rustlabs.com/&quot;&gt;https://rustlabs.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Electricity: &lt;a href=&quot;https://www.rustrician.io/&quot;&gt;https://www.rustrician.io/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Genetics Calculator: &lt;a href=&quot;https://wgn.si/genetics/&quot;&gt;https://wgn.si/genetics/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Item List: &lt;a href=&quot;https://www.corrosionhour.com/rust-item-list/&quot;&gt;https://www.corrosionhour.com/rust-item-list/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Key Dictionary: &lt;a href=&quot;https://wiki.facepunch.com/rust/Keybinds#keydictionary&quot;&gt;https://wiki.facepunch.com/rust/Keybinds#keydictionary&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Maps: &lt;a href=&quot;https://rustmaps.com/&quot;&gt;https://rustmaps.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Monument Puzzles: Blue Solutions:
&lt;a href=&quot;https://www.rustafied.com/monument-puzzles-medium-blue-solutions&quot;&gt;https://www.rustafied.com/monument-puzzles-medium-blue-solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Monument Puzzles: Basic Green Solutions:
&lt;a href=&quot;https://www.rustafied.com/monument-puzzle-basic-green-solutions&quot;&gt;https://www.rustafied.com/monument-puzzle-basic-green-solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Monument Puzzles: Advanced Red Solutions:
&lt;a href=&quot;https://www.rustafied.com/monument-puzzles-advanced-red-solutions&quot;&gt;https://www.rustafied.com/monument-puzzles-advanced-red-solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Raiding Costs:
&lt;a href=&quot;https://steamcommunity.com/sharedfiles/filedetails/?id=2402073095&quot;&gt;https://steamcommunity.com/sharedfiles/filedetails/?id=2402073095&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Recycler Locations: &lt;a href=&quot;https://www.corrosionhour.com/rust-recycler-guide/&quot;&gt;https://www.corrosionhour.com/rust-recycler-guide/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Skin: &lt;a href=&quot;https://rustlabs.com/skins#order=index,desc&quot;&gt;https://rustlabs.com/skins#order=index,desc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Smelting Calculator: &lt;a href=&quot;https://rust-tools.github.io/rust-smelting-calculator/&quot;&gt;https://rust-tools.github.io/rust-smelting-calculator/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Sulfur Calculator: &lt;a href=&quot;https://rustraidcalculator.com/HTML/raidCalc.html&quot;&gt;https://rustraidcalculator.com/HTML/raidCalc.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Wiki: &lt;a href=&quot;https://rust.fandom.com/wiki/Rust_Wiki&quot;&gt;https://rust.fandom.com/wiki/Rust_Wiki&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Useful TypeScript Links]]></title><description><![CDATA[Helpful Sites for Typescript Developers Comprehensive guide to the language:
https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines…]]></description><link>https://johndpelingo.com/notes/useful-typescript-links/</link><guid isPermaLink="false">https://johndpelingo.com/notes/useful-typescript-links/</guid><pubDate>Fri, 04 Oct 2019 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;Helpful Sites for Typescript Developers&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Comprehensive guide to the language:
&lt;a href=&quot;https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines&quot;&gt;https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Coding guidelines of the TypeScript project’s codebase:
&lt;a href=&quot;https://github.com/microsoft/TypeScript-Handbook&quot;&gt;https://github.com/microsoft/TypeScript-Handbook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Common type transformations:
&lt;a href=&quot;https://www.typescriptlang.org/docs/handbook/utility-types.html&quot;&gt;https://www.typescriptlang.org/docs/handbook/utility-types.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Golang Quick Reference and Tips]]></title><description><![CDATA[Basic Types Zero Values  for numeric types  for the boolean type  (the empty string) for strings Pass by value When a pointer is passed to a…]]></description><link>https://johndpelingo.com/notes/golang-quick-reference-and-tips/</link><guid isPermaLink="false">https://johndpelingo.com/notes/golang-quick-reference-and-tips/</guid><pubDate>Sat, 21 Sep 2019 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;Basic Types&lt;/h1&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;bool

string

int // usually either 32 for 32-bit systems or 64 for 64-bit systems
int8  int16  int32  int64

uint // usually either 32 for 32-bit systems or 64 for 64-bit systems
uint8 uint16 uint32 uint64
uintptr // usually either 32 for 32-bit systems or 64 for 64-bit systems

byte // alias for uint8

rune // alias for int32
     // represents a Unicode code point

float32 float64

complex64 complex128 // real and imaginary components&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h1&gt;Zero Values&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;0&lt;/code&gt; for numeric types&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;false&lt;/code&gt; for the boolean type&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;&quot;&quot;&lt;/code&gt; (the empty string) for strings&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Pass by value&lt;/h1&gt;
&lt;p&gt;When a pointer is passed to a function, it is still passed by value in the sense
that a copy of the value of the pointer is created. While assigning new values
to the value that the pointer is pointing to mutates the value, assigning a new
address to the pointer won’t change the pointer value.&lt;/p&gt;
&lt;h1&gt;Arrays&lt;/h1&gt;
&lt;p&gt;Arrays are value types. This means that when they are assigned to a new
variable, a copy of the original array is assigned to the new variable. If
changes are made to the new variable, it will not be reflected in the original
array.&lt;/p&gt;
&lt;h1&gt;Slices&lt;/h1&gt;
&lt;p&gt;Slices are reference types. When a slice is assigned to a new variable, they
both point to the same internal data structure. Hence changes made in one will
reflect in the other.&lt;/p&gt;
&lt;h1&gt;Length and Capacity of a Slice&lt;/h1&gt;
&lt;p&gt;The length of the slice is the number of elements in the slice.&lt;/p&gt;
&lt;p&gt;The capacity of the slice is the number of elements in the underlying array
starting from the index from which the slice is created.&lt;/p&gt;
&lt;p&gt;Once the capacity is met, &lt;code class=&quot;language-text&quot;&gt;append&lt;/code&gt;ing to a slice will return a new slice with a
larger capacity and a &lt;strong&gt;new pointer address&lt;/strong&gt;. It’s evident in the below
example:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;go&quot;&gt;&lt;pre class=&quot;language-go&quot;&gt;&lt;code class=&quot;language-go&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;package&lt;/span&gt; main

&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;fmt&quot;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;change&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;s &lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;token builtin&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    s&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Go&quot;&lt;/span&gt;
    s &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;playground&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
    fmt&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Println&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    welcome &lt;span class=&quot;token operator&quot;&gt;:=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token builtin&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;hello&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;world&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;change&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;welcome&lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
    fmt&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Println&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;welcome&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h1&gt;Maps&lt;/h1&gt;
&lt;p&gt;Maps are reference types. When a map is assigned to a new variable, they both
point to the same internal data structure. Hence changes made in one will
reflect in the other.&lt;/p&gt;
&lt;h1&gt;Pointers&lt;/h1&gt;
&lt;p&gt;Do not pass a pointer to an array as a argument to a function. Use slice
instead.&lt;/p&gt;
&lt;h1&gt;Structs&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Structs are value types and are comparable if each of their fields are
comparable. Two struct variables are considered equal if their corresponding
fields are equal.&lt;/li&gt;
&lt;li&gt;Struct variables are not comparable if they contain fields which are not
comparable&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Methods&lt;/h1&gt;
&lt;h2&gt;When to use pointer receiver and when to use value receiver.&lt;/h2&gt;
&lt;p&gt;Generally, pointer receivers can be used when changes made to the receiver
inside the method should be visible to the caller.&lt;/p&gt;
&lt;p&gt;Pointers receivers can also be used in places where it’s expensive to copy a
data structure. Consider a struct that has many fields. Using this struct as a
value receiver in a method will need the entire struct to be copied which will
be expensive. In this case, if a pointer receiver is used, the struct will not
be copied and only a pointer to it will be used in the method.&lt;/p&gt;
&lt;p&gt;In all other situations, value receivers can be used.&lt;/p&gt;
&lt;h2&gt;Value receivers in methods vs Value arguments in functions&lt;/h2&gt;
&lt;p&gt;When a function has a value argument, it will accept only a value argument.&lt;/p&gt;
&lt;p&gt;When a method has a value receiver, it will accept both pointer and value
receivers.&lt;/p&gt;
&lt;h2&gt;Pointer receivers in methods vs Pointer arguments in functions&lt;/h2&gt;
&lt;p&gt;Similar to value arguments, functions with pointer arguments will accept only
pointers whereas methods with pointer receivers will accept both pointer and
value receiver.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Useful Developer Links]]></title><description><![CDATA[Helpful sites for developers career-wise Tools: Command-line explainer: https://explainshell.com/ Regex explainer: https://regex101.com…]]></description><link>https://johndpelingo.com/notes/useful-developer-links/</link><guid isPermaLink="false">https://johndpelingo.com/notes/useful-developer-links/</guid><pubDate>Wed, 11 Sep 2019 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;Helpful sites for developers career-wise&lt;/h1&gt;
&lt;p&gt;Tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Command-line explainer: &lt;a href=&quot;https://explainshell.com/&quot;&gt;https://explainshell.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Regex explainer: &lt;a href=&quot;https://regex101.com/&quot;&gt;https://regex101.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Learnings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://neilkakkar.com/things-I-learnt-from-a-senior-dev.html&quot;&gt;https://neilkakkar.com/things-I-learnt-from-a-senior-dev.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Guides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code style guides: &lt;a href=&quot;http://google.github.io/styleguide/&quot;&gt;http://google.github.io/styleguide/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Author’s guide to giving a good code review:
&lt;a href=&quot;https://google.github.io/eng-practices/review/reviewer/&quot;&gt;https://google.github.io/eng-practices/review/reviewer/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Author’s guide to getting through a code review:
&lt;a href=&quot;https://google.github.io/eng-practices/review/developer/&quot;&gt;https://google.github.io/eng-practices/review/developer/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Useful Golang Links]]></title><description><![CDATA[Helpful Sites for Absolute Golang Beginners Resources: A tour of Golang: https://tour.golang.org/ Annotated example programs: https…]]></description><link>https://johndpelingo.com/notes/useful-golang-links/</link><guid isPermaLink="false">https://johndpelingo.com/notes/useful-golang-links/</guid><pubDate>Mon, 02 Sep 2019 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;Helpful Sites for Absolute Golang Beginners&lt;/h1&gt;
&lt;p&gt;Resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A tour of Golang: &lt;a href=&quot;https://tour.golang.org/&quot;&gt;https://tour.golang.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Annotated example programs: &lt;a href=&quot;https://gobyexample.com&quot;&gt;https://gobyexample.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Golang snippets: &lt;a href=&quot;https://www.golangprograms.com/&quot;&gt;https://www.golangprograms.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Golang tutorial series: &lt;a href=&quot;https://golangbot.com/learn-golang-series/&quot;&gt;https://golangbot.com/learn-golang-series/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Golang course: &lt;a href=&quot;https://tutorialedge.net/course/golang/&quot;&gt;https://tutorialedge.net/course/golang/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Resources for new Go programmers:
&lt;a href=&quot;https://dave.cheney.net/resources-for-new-go-programmers&quot;&gt;https://dave.cheney.net/resources-for-new-go-programmers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Uber Go Style Guide: &lt;a href=&quot;https://github.com/uber-go/guide/blob/master/style.md&quot;&gt;https://github.com/uber-go/guide/blob/master/style.md&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;JSON to Golang struct: &lt;a href=&quot;https://mholt.github.io/json-to-go/&quot;&gt;https://mholt.github.io/json-to-go/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Tips:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Slice tricks: &lt;a href=&quot;https://github.com/golang/go/wiki/SliceTricks&quot;&gt;https://github.com/golang/go/wiki/SliceTricks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Twelve Go Best Practices: &lt;a href=&quot;https://talks.golang.org/2013/bestpractices.slide#1&quot;&gt;https://talks.golang.org/2013/bestpractices.slide#1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Error programming:
&lt;a href=&quot;https://peter.bourgon.org/blog/2019/09/11/programming-with-errors.html&quot;&gt;https://peter.bourgon.org/blog/2019/09/11/programming-with-errors.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://peter.bourgon.org/blog/&quot;&gt;https://peter.bourgon.org/blog/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Effective Go: &lt;a href=&quot;https://golang.org/doc/effective_go.html&quot;&gt;https://golang.org/doc/effective_go.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Internals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Slices internals: &lt;a href=&quot;https://blog.golang.org/go-slices-usage-and-internals&quot;&gt;https://blog.golang.org/go-slices-usage-and-internals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Golang modules: &lt;a href=&quot;https://blog.golang.org/using-go-modules&quot;&gt;https://blog.golang.org/using-go-modules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Scheduler saga: &lt;a href=&quot;https://www.youtube.com/watch?v=YHRO5WQGh0k&quot;&gt;https://www.youtube.com/watch?v=YHRO5WQGh0k&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Understanding channels: &lt;a href=&quot;https://www.youtube.com/watch?v=KBZlN0izeiY&quot;&gt;https://www.youtube.com/watch?v=KBZlN0izeiY&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Books:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An introduction to programming in Go: &lt;a href=&quot;https://www.golang-book.com/books/intro&quot;&gt;https://www.golang-book.com/books/intro&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Go bootcamp: &lt;a href=&quot;http://www.golangbootcamp.com/book&quot;&gt;http://www.golangbootcamp.com/book&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Px and Rem Typescale]]></title><description><![CDATA[Given that  is our base font size, the formula would be: Favorable Scale iels oot phemeral Unit]]></description><link>https://johndpelingo.com/notes/px-and-rem-typescale/</link><guid isPermaLink="false">https://johndpelingo.com/notes/px-and-rem-typescale/</guid><pubDate>Sat, 31 Aug 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Given that &lt;code class=&quot;language-text&quot;&gt;16px&lt;/code&gt; is our base font size, the formula would be:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;Value = Target Size / Base Size&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Favorable Scale&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;code class=&quot;language-text&quot;&gt;P&lt;/code&gt;i&lt;code class=&quot;language-text&quot;&gt;x&lt;/code&gt;els&lt;/th&gt;
&lt;th&gt;&lt;code class=&quot;language-text&quot;&gt;R&lt;/code&gt;oot &lt;code class=&quot;language-text&quot;&gt;Em&lt;/code&gt;phemeral Unit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;12px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;0.75rem&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;14px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;0875rem&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;16px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;1rem&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;18px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;1.125rem&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;20px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;1.25rem&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;24px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;1.5rem&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;30px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;1.875rem&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;36px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;2.25rem&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;48px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;3rem&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;60px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;3.75rem&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;72px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;4.5rem&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</content:encoded></item><item><title><![CDATA[Internet Explorer Shenanigans]]></title><description><![CDATA[window.scrollY and window.scrollX Alternatives for  and  are

and

respectively. These properties provide the best cross-browser support…]]></description><link>https://johndpelingo.com/notes/internet-explorer-shenanigans/</link><guid isPermaLink="false">https://johndpelingo.com/notes/internet-explorer-shenanigans/</guid><pubDate>Fri, 30 Aug 2019 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;window.scrollY and window.scrollX&lt;/h1&gt;
&lt;p&gt;Alternatives for &lt;code class=&quot;language-text&quot;&gt;window.scrollY&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;window.scrollX&lt;/code&gt; are
&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/Window/pageYOffset&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;window.pageYOffset&lt;/code&gt;&lt;/a&gt;
and
&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/Window/pageXOffset&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;window.pageXOffset&lt;/code&gt;&lt;/a&gt;
respectively. These properties provide the best cross-browser support.&lt;/p&gt;
&lt;h1&gt;Adding a cookie&lt;/h1&gt;
&lt;p&gt;Open the browser console and type &lt;code class=&quot;language-text&quot;&gt;document.cookie=&quot;&amp;lt;KEY&gt;=&amp;lt;VALUE&gt;&quot;;void(0);&lt;/code&gt;
where you replace the &lt;code class=&quot;language-text&quot;&gt;KEY&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;VALUE&lt;/code&gt; respectively with the correct values.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Useful Git Commands]]></title><description><![CDATA[Simple Commands Command Description  Display a list of available aliases  Delete local branch  Delete untracked files and folders  Allow…]]></description><link>https://johndpelingo.com/notes/useful-git-commands/</link><guid isPermaLink="false">https://johndpelingo.com/notes/useful-git-commands/</guid><pubDate>Wed, 17 Jul 2019 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;Simple Commands&lt;/h1&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git alias&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Display a list of available aliases&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git branch -D &amp;lt;BRANCH_NAME&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Delete local branch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git clean -fd&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Delete untracked files and folders&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git commit --allow-empty&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Allow empty commit with no change&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git push origin --delete &amp;lt;BRANCH_NAME&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Delete remote branch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git rebase -i HEAD~&amp;lt;N&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Squash multiple (&lt;code class=&quot;language-text&quot;&gt;N&lt;/code&gt;) commits into a potentially single commit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git reset -- &amp;lt;DIRECTORY_FILE_PATH&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unstage a file/directory and its contents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git reset --hard origin/&amp;lt;BRANCH_NAME&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reset local branch to remote branch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git stash apply &amp;lt;N&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Apply a specific &lt;code class=&quot;language-text&quot;&gt;&amp;lt;N&gt;&lt;/code&gt; stash which can be chosen from &lt;code class=&quot;language-text&quot;&gt;git stash list&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;Steps&lt;/h1&gt;
&lt;h2&gt;Rename Git Branch Locally and Remotely&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git branch -m &amp;lt;OLD_BRANCH&gt; &amp;lt;NEW_BRANCH&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Rename branch locally&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git push origin :&amp;lt;OLD_BRANCH&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Delete old remote branch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git push --set-upstream origin &amp;lt;NEW_BRANCH&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Push the new branch and set local branch to track the new remote branch&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Squash Last &lt;code class=&quot;language-text&quot;&gt;N&lt;/code&gt; Commits into 1&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git reset --soft HEAD~&amp;lt;N&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Soft reset the current branch head back &lt;code class=&quot;language-text&quot;&gt;N&lt;/code&gt; commits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git commit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Record changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;git push --force-with-lease&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Force push only if the remote refs have their current value to be the same as the remote-tracking branch&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;Helpful Links:&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://ohshitgit.com/&quot;&gt;http://ohshitgit.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Useful VIM Shortcuts]]></title><description><![CDATA[Essentials Command Description  The Most Important Vim Command™  Exit normal mode, enter  mode  Exit  mode, enter normal mode  Move around…]]></description><link>https://johndpelingo.com/notes/useful-vim-shortcuts/</link><guid isPermaLink="false">https://johndpelingo.com/notes/useful-vim-shortcuts/</guid><pubDate>Wed, 17 Jul 2019 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;Essentials&lt;/h1&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;ESC:q!&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The Most Important Vim Command™&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;i&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exit normal mode, enter &lt;code class=&quot;language-text&quot;&gt;i&lt;/code&gt; mode&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;ESC&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exit &lt;code class=&quot;language-text&quot;&gt;i&lt;/code&gt; mode, enter normal mode&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;arrow keys&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Move around&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Go to beginning of line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;$&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Go to end of line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;:w&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Save (write) a file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;:q&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Quit a file (must be saved)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;:wq&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Write and quit a file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;:q!&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Force-quit a file, discarding any changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;u&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Undo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;x&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Delete the character under the cursor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;dd&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Delete a line and move contents one line above&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;D&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Delete a line but don’t move contents one line above&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;cc&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Delete the contents of the line and go to &lt;code class=&quot;language-text&quot;&gt;i&lt;/code&gt; mode&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;o&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;append a new line below the current line and go to &lt;code class=&quot;language-text&quot;&gt;i&lt;/code&gt; mode&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;O&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;append a new line above the current line and go to &lt;code class=&quot;language-text&quot;&gt;i&lt;/code&gt; mode&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;p&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Put (paste) deleted text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;⌃F&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Go forward one screen&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;⌃B&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Go backward one screen&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;G&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Go to last line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;1G&lt;/code&gt; or &lt;code class=&quot;language-text&quot;&gt;gg&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Go to first line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;/&amp;lt;string&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Search for &amp;#x3C;string&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;Steps&lt;/h1&gt;
&lt;h2&gt;Copy and Paste a Whole Line&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;yy&lt;/code&gt; or &lt;code class=&quot;language-text&quot;&gt;Y&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Copy the line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;dd&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Or delete the line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;p&lt;/code&gt; or &lt;code class=&quot;language-text&quot;&gt;P&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Paste the copied or deleted line &lt;strong&gt;after&lt;/strong&gt; or &lt;strong&gt;before&lt;/strong&gt; the current line respectively&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;Detailed&lt;/h1&gt;
&lt;p&gt;This is a brief summary of the key shortcuts and acts as a reference. It is
taken from the contents of the file when running the below command in the
terminal:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;$ vimtutor&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Text Editing - Deletion&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;x&lt;/code&gt;: Delete the character under the cursor&lt;/p&gt;
&lt;h2&gt;Text Editing - Insertion&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;i&lt;/code&gt;: Insert text&lt;/p&gt;
&lt;h2&gt;Text Editing - Append&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;a:&lt;/code&gt; Append text&lt;/p&gt;
&lt;h2&gt;Deletion Commands&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;d$&lt;/code&gt; : Delete to the end of the line, INCLUDING the last character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;de&lt;/code&gt; : Delete to the end of the current word, INCLUDING the last character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;db&lt;/code&gt; : Delete to the beginning of the current word, EXCLUDING the first
character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;dw&lt;/code&gt; : Delete until the start of the next word, EXCLUDING its first character&lt;/p&gt;
&lt;h2&gt;Motions&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;$&lt;/code&gt; : Move the cursor to the end of the line, INCLUDING the last character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;e&lt;/code&gt; : Move the cursor to the end of the current word, INCLUDING the last
character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;b&lt;/code&gt;: Move the cursor to the beginning of the current word, EXCLUDING the first
character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;w&lt;/code&gt; : Move the cursor until the start of the next word, EXCLUDING its first
character&lt;/p&gt;
&lt;h2&gt;Count For A Motion&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;N$&lt;/code&gt; : Move the cursor &lt;strong&gt;N&lt;/strong&gt; lines to the end of the line, INCLUDING the last
character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;Ne&lt;/code&gt; : Move the cursor &lt;strong&gt;N&lt;/strong&gt; words forward to the end of the current word,
INCLUDING the last character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;Nb&lt;/code&gt; : Move the cursor &lt;strong&gt;N&lt;/strong&gt; words forward to the beginning of the current word,
EXCLUDING the first character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;Nw&lt;/code&gt; : Move the cursor &lt;strong&gt;N&lt;/strong&gt; words forward until the start of the next word,
EXCLUDING its first character&lt;/p&gt;
&lt;h2&gt;Count For A Deletion&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;dN$&lt;/code&gt; : Delete &lt;strong&gt;N&lt;/strong&gt; lines to the end of the line, INCLUDING the last character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;dNe&lt;/code&gt; : Delete &lt;strong&gt;N&lt;/strong&gt; words to the end of the current word, INCLUDING the last
character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;dNb&lt;/code&gt; : Delete &lt;strong&gt;N&lt;/strong&gt; words to the beginning of the current word, EXCLUDING the
first character&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;dNw&lt;/code&gt; : Delete &lt;strong&gt;N&lt;/strong&gt; words until the start of the next word, EXCLUDING its first
character&lt;/p&gt;
&lt;h2&gt;Operating On Lines&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;dd&lt;/code&gt; : Delete a whole line&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;dNd&lt;/code&gt; : Delete &lt;strong&gt;N&lt;/strong&gt; whole lines&lt;/p&gt;
&lt;h2&gt;Undo Command&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;u&lt;/code&gt;: Undo last command&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;Nu&lt;/code&gt;: Undo last &lt;strong&gt;N&lt;/strong&gt; commands&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;U&lt;/code&gt;: Fix a whole line&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;ctrl-r&lt;/code&gt;: Redo command&lt;/p&gt;
&lt;h2&gt;Put Command&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;p&lt;/code&gt;: Put previously deleted text after the cursor&lt;/p&gt;
&lt;h2&gt;Replace Command&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;rX&lt;/code&gt;: Replace the character at the cursor with X&lt;/p&gt;
&lt;h2&gt;Change Operator&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;ce&lt;/code&gt;: Change until the end of the word. Deletes the word and places us in Insert
mode.&lt;/p&gt;
&lt;p&gt;The change operator is used with the same motions as delete (&lt;code class=&quot;language-text&quot;&gt;d&lt;/code&gt;).&lt;/p&gt;
&lt;h2&gt;Cursor Location And File Status&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;ctrl-g&lt;/code&gt;: Show location in the file and the file status&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;NG&lt;/code&gt;: Move to &lt;strong&gt;N&lt;/strong&gt; line in the file&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;G&lt;/code&gt;: Move to the bottom of the file&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;gg&lt;/code&gt;: Move to the start of the file&lt;/p&gt;
&lt;h2&gt;Search Command&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;/&lt;/code&gt;: Followed by a phrase to search for the phrase&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;n&lt;/code&gt;: Search for the same phrase again&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;N&lt;/code&gt;: Search for the same phrase again in the opposite direction&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;?&lt;/code&gt;: Followed by a phrase to search for the phrase in the backward direction&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;ctrl-o&lt;/code&gt;: Go back where you come from&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;ctrl-i&lt;/code&gt;: Go forward where you come from&lt;/p&gt;
&lt;h2&gt;Matching Parenthesis Search&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;%&lt;/code&gt;: Find a matching ),], or }&lt;/p&gt;
&lt;h2&gt;Substitute Command&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;:s/old/new&lt;/code&gt;: Substitute ‘new’ for ‘old’ only for the first occurrence&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;:s/old/new/g&lt;/code&gt;: Substitute ‘new’ for ‘old’ globally in the line&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;:#,#:s/old/new&lt;/code&gt;: Substitute ‘new’ for ‘old’, where #,# are the line numbers of
the range of lines where the substitution is to be done&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;:%s/old/new/g&lt;/code&gt;: Substitute ‘new’ for ‘old’ for every occurrence in the whole
file&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;:%s/old/new/gc&lt;/code&gt;: Substitute ‘new’ for ‘old’ for every occurrence in the whole
file with a prompt whether to substitute or not&lt;/p&gt;
&lt;h2&gt;How To Execute An External Command&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;:!COMMAND&lt;/code&gt;: Followed by an external command to execute that command&lt;/p&gt;
&lt;h2&gt;Writing Other Files&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;:w FILENAME&lt;/code&gt;: Save the changes made to the text into a file named FILENAME&lt;/p&gt;
&lt;h2&gt;Selecting Text To Write&lt;/h2&gt;
&lt;p&gt;TODO: VIM Checkpoint&lt;/p&gt;
&lt;h1&gt;Resources&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://vim.rtorr.com/&quot;&gt;https://vim.rtorr.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[TypeScript | React Router Explicit Match Type]]></title><description><![CDATA[One can correctly type the  of a component connected with  or
component names passed directly in the  component by using the
 interface…]]></description><link>https://johndpelingo.com/notes/typescript-react-router-explicit-match-type/</link><guid isPermaLink="false">https://johndpelingo.com/notes/typescript-react-router-explicit-match-type/</guid><pubDate>Tue, 16 Jul 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;One can correctly type the &lt;code class=&quot;language-text&quot;&gt;match&lt;/code&gt; of a component connected with &lt;code class=&quot;language-text&quot;&gt;withRouter&lt;/code&gt; or
component names passed directly in the &lt;code class=&quot;language-text&quot;&gt;Route&lt;/code&gt; component by using the
&lt;code class=&quot;language-text&quot;&gt;RouteComponentProps&lt;/code&gt; interface defined in &lt;code class=&quot;language-text&quot;&gt;&apos;react-router-dom&apos;&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight has-highlighted-lines&quot; data-language=&quot;tsx&quot;&gt;&lt;pre class=&quot;language-tsx&quot;&gt;&lt;code class=&quot;language-tsx&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; createBrowserHistory &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;history&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; React&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;FC&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; useEffect &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;react&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; render &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;react-dom&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; RouteComponentProps&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; Route&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; Router&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; Switch &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;react-router-dom&apos;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;./styles.css&apos;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; browserHistory &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;createBrowserHistory&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; objectIdParameter &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;objectId&apos;&lt;/span&gt;

&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;IHomeProps&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  &lt;span class=&quot;token keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;RouteComponentProps&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;key &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;typeof&lt;/span&gt; objectIdParameter&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; Home&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;FC&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;IHomeProps&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; match &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;Home Page with id &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;match&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;params&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;objectId&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; App&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function-variable function&quot;&gt;FC&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token function&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    browserHistory&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;/42&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Router&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;history&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;browserHistory&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;token plain-text&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Switch&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;token plain-text&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Route&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;component&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;Home&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;/:&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;objectIdParameter&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;token plain-text&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Switch&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;token plain-text&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Router&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; rootElement &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;root&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;App&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; rootElement&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The above example can be seen in action in the below CodeSandbox:&lt;/p&gt;
&lt;iframe src=&quot;https://codesandbox.io/embed/mystifying-breeze-v99pz?fontsize=14&quot; title=&quot;Explicit Match Type&quot; allow=&quot;geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media&quot; style=&quot;width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;&quot; sandbox=&quot;allow-modals allow-forms allow-popups allow-scripts allow-same-origin&quot;&gt;&lt;/iframe&gt;</content:encoded></item><item><title><![CDATA[TypeScript | Known and Unknown Keys]]></title><description><![CDATA[There are cases where we have known and unknown keys in an object. Having at
least the known keys will help with TypeScript code assistance…]]></description><link>https://johndpelingo.com/notes/typescript-known-and-unknown-keys/</link><guid isPermaLink="false">https://johndpelingo.com/notes/typescript-known-and-unknown-keys/</guid><pubDate>Mon, 15 Jul 2019 00:00:00 GMT</pubDate><content:encoded>&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;typescript&quot;&gt;&lt;pre class=&quot;language-typescript&quot;&gt;&lt;code class=&quot;language-typescript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;IMyColor&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  hex&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;string&lt;/span&gt;
  rgb&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;string&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;key&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;any&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; iColor&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; IMyColor &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  hex&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;#bada55&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  rgb&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;rgb(1, 2, 3)&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  unknownColor&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;42&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// valid&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; whatColorInterface &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; iColor&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;whatIsThis &lt;span class=&quot;token comment&quot;&gt;// any&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;MyColorType&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;key&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;any&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  hex&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;string&lt;/span&gt;
  rgb&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;string&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; colorType&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; MyColorType &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  hex&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;#bada55&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  rgb&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;rgb(1, 2, 3)&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  unknownColor&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;42&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// valid&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; whatColorType &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; colorType&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;is this a valid key&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// any&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;There are cases where we have known and unknown keys in an object. Having at
least the known keys will help with TypeScript code assistance. But, it’s
generally better to avoid these kinds of types because it’s harder to guarantee
type safety.&lt;/p&gt;
&lt;p&gt;Playground
&lt;a href=&quot;http://www.typescriptlang.org/play/#code/JYOwLgpgTgZghgYwgAgJIFkCeBhA9gG1ymQG8AoZZACwgA8AuZAZzClAHMBuC5KdgI0Ys2ILjwDaAawiYhrDgF1GcEJm4BfMmQS4QLZMDyEojDDgJFkAXlI8aDZACIAxPzgATOAFYvjgDQ8fIJOQQAUAIx+yABMUQDMAJT+PACuIJIguADuIEZEjAAs0cgA9CXIAG5w+MDuZOrc2rr6WVRwYHlQqODQ8EjWBp0AdK3tqEwAKlTATJyl5SqYWmCYAA4oWJ0Tayg25JRSMnIi7ErIixrIAGS2lPbHHNyUQQ+iGo06emDIOsbb64xNhYoP9drdqHRGC43J4fMlngIoWFIjF4kkApQ0hlsrlgYVimVKtVavUPs1vqMOsDQQNfkRQeJHDNkGBpkxzkSau5kNJMI4FHNCYsyEA&quot;&gt;example&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Tools Used for Content]]></title><description><![CDATA[Below are the tools that I use for creating my content: Capitalizing titles: https://capitalizemytitle.com/ Chrome DevTools console script…]]></description><link>https://johndpelingo.com/notes/tools-used-for-content/</link><guid isPermaLink="false">https://johndpelingo.com/notes/tools-used-for-content/</guid><pubDate>Sat, 13 Jul 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Below are the tools that I use for creating my content:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Capitalizing titles: &lt;a href=&quot;https://capitalizemytitle.com/&quot;&gt;https://capitalizemytitle.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Chrome DevTools console script: &lt;code class=&quot;language-text&quot;&gt;copy(new Date().toISOString())&lt;/code&gt; to assign the
date published of a content&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.grammarly.com/&quot;&gt;Grammarly&lt;/a&gt; for grammar checking and spell
checking&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.thesaurus.com/&quot;&gt;Thesaurus&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[TypeScript | Array of Numbers as Type]]></title><description><![CDATA[Using  will get the contents of an array as a union. For arrays of arrays, unwrap the array contents as much needed. Playground
example.]]></description><link>https://johndpelingo.com/notes/typescript-array-of-numbers-as-type/</link><guid isPermaLink="false">https://johndpelingo.com/notes/typescript-array-of-numbers-as-type/</guid><pubDate>Fri, 12 Jul 2019 00:00:00 GMT</pubDate><content:encoded>&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;typescript&quot;&gt;&lt;pre class=&quot;language-typescript&quot;&gt;&lt;code class=&quot;language-typescript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; odd &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; even &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;// 1 | 3 | 5 | 7 | 9 | 0 | 2 | 4 | 6 | 8&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;SingleDigitNumber&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;typeof&lt;/span&gt; odd &lt;span class=&quot;token operator&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;typeof&lt;/span&gt; even&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token builtin&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; allNumbers &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;odd&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; even&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token comment&quot;&gt;// 1 | 3 | 5 | 7 | 9 | 0 | 2 | 4 | 6 | 8&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;SingleDigitNumber2&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;typeof&lt;/span&gt; allNumbers&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token builtin&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token builtin&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Using &lt;code class=&quot;language-text&quot;&gt;Arr[number]&lt;/code&gt; will get the contents of an array as a union.&lt;/p&gt;
&lt;p&gt;For arrays of arrays, unwrap the array contents as much needed.&lt;/p&gt;
&lt;p&gt;Playground
&lt;a href=&quot;http://www.typescriptlang.org/play/#code/MYewdgzgLgBCAm8YF4YG0CMAaGBmHArDgOw4CcAujAIYQyiRQDcAUA9DAKYBunYK6AAw4ATDgAsOAGw4AHFVr1w0ViwD0amBhgAfPLpgEDxA2QOCDIg+INSDsllACeAB04wAygEswAcwA2nAAiXr5eUAByAK4AtgBGnABOAgAUzm4gAGZwiAbpnFlcvGAAlGhgsQmJFKrssNT+-tHxSXSoaAjwODx8FOqa2nq4BkZ6JnpmehZ6Vno2enZ6DvmePgHBoeHNVVaoaa4F2Q1Nla1lFS3V5afVrEA&quot;&gt;example&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Useful SEO Links]]></title><description><![CDATA[Helpful tools to validate structured data https://search.google.com/structured-data/testing-tool/ http://linter.structured-data.org/]]></description><link>https://johndpelingo.com/notes/useful-seo-links/</link><guid isPermaLink="false">https://johndpelingo.com/notes/useful-seo-links/</guid><pubDate>Sun, 30 Jun 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Helpful tools to validate structured data&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://search.google.com/structured-data/testing-tool/&quot;&gt;https://search.google.com/structured-data/testing-tool/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://linter.structured-data.org/&quot;&gt;http://linter.structured-data.org/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Dummy Post]]></title><description><![CDATA[Dummy post]]></description><link>https://johndpelingo.com/posts/dummy-post/</link><guid isPermaLink="false">https://johndpelingo.com/posts/dummy-post/</guid><pubDate>Sun, 30 Jun 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Dummy post&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Markdown Syntax]]></title><description><![CDATA[Courtesy of https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet H1 H2 H3 H4 H5 H6 Alternatively, for H1 and H2, an underline…]]></description><link>https://johndpelingo.com/notes/markdown-syntax/</link><guid isPermaLink="false">https://johndpelingo.com/notes/markdown-syntax/</guid><pubDate>Sat, 22 Jun 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Courtesy of &lt;a href=&quot;https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet&quot;&gt;https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;H1&lt;/h1&gt;
&lt;h2&gt;H2&lt;/h2&gt;
&lt;h3&gt;H3&lt;/h3&gt;
&lt;h4&gt;H4&lt;/h4&gt;
&lt;h5&gt;H5&lt;/h5&gt;
&lt;h6&gt;H6&lt;/h6&gt;
&lt;p&gt;Alternatively, for H1 and H2, an underline-ish style:&lt;/p&gt;
&lt;h1&gt;Alt-H1&lt;/h1&gt;
&lt;h2&gt;Alt-H2&lt;/h2&gt;
&lt;p&gt;Emphasis, aka italics, with &lt;em&gt;asterisks&lt;/em&gt; or &lt;em&gt;underscores&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Strong emphasis, aka bold, with &lt;strong&gt;asterisks&lt;/strong&gt; or &lt;strong&gt;underscores&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Combined emphasis with &lt;strong&gt;asterisks and &lt;em&gt;underscores&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Strikethrough uses two tildes. &lt;del&gt;Scratch this.&lt;/del&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First ordered list item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Another item&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Unordered sub-list.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Actual numbers don’t matter, just that it’s a number&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ordered sub-list&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;And another item.&lt;/p&gt;
&lt;p&gt;You can have properly indented paragraphs within list items. Notice the blank
line above, and the leading spaces (at least one, but we’ll use three here to
also align the raw Markdown).&lt;/p&gt;
&lt;p&gt;To have a line break without a paragraph, you will need to use two trailing
spaces. Note that this line is separate, but within the same paragraph. (This
is contrary to the typical GFM line break behaviour, where trailing spaces
are not required.)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;Unordered list can use asterisks&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Or minuses&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Or pluses&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://www.google.com&quot;&gt;I’m an inline-style link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.google.com&quot; title=&quot;Google&amp;#x27;s Homepage&quot;&gt;I’m an inline-style link with title&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.mozilla.org&quot;&gt;I’m a reference-style link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;../blob/master/LICENSE&quot;&gt;I’m a relative reference to a repository file&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://slashdot.org&quot;&gt;You can use numbers for reference-style link definitions&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Or leave it empty and use the &lt;a href=&quot;https://www.reddit.com&quot;&gt;link text itself&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;URLs and URLs in angle brackets will automatically get turned into links.
&lt;a href=&quot;https://www.example.com&quot;&gt;https://www.example.com&lt;/a&gt; or &lt;a href=&quot;https://www.example.com&quot;&gt;https://www.example.com&lt;/a&gt; and sometimes example.com
(but not on Github, for example).&lt;/p&gt;
&lt;p&gt;Some text to show that the reference links can follow later.&lt;/p&gt;
&lt;p&gt;Here’s our logo (hover to see the title text):&lt;/p&gt;
&lt;p&gt;Inline-style:
&lt;img src=&quot;https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png&quot; alt=&quot;alt text&quot; title=&quot;Logo Title Text 1&quot;&gt;&lt;/p&gt;
&lt;p&gt;Reference-style: &lt;img src=&quot;https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png&quot; alt=&quot;alt text&quot; title=&quot;Logo Title Text 2&quot;&gt;&lt;/p&gt;
&lt;p&gt;Inline &lt;code class=&quot;language-text&quot;&gt;code&lt;/code&gt; has &lt;code class=&quot;language-text&quot;&gt;back-ticks around&lt;/code&gt; it.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight has-highlighted-lines&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; s &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;JavaScript syntax highlighting&apos;&lt;/span&gt;
&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;&lt;span class=&quot;token function&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;python&quot;&gt;&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;s &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Python syntax highlighting&quot;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;print&lt;/span&gt; s&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;diff&quot;&gt;&lt;pre class=&quot;language-diff&quot;&gt;&lt;code class=&quot;language-diff&quot;&gt;This is a diff code block
&lt;span class=&quot;token inserted-sign inserted&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt; this line is added
&lt;/span&gt;&lt;span class=&quot;token deleted-sign deleted&quot;&gt;&lt;span class=&quot;token prefix deleted&quot;&gt;-&lt;/span&gt; this line is deleted&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;No language indicated, so no syntax highlighting.
But let&apos;s throw in a &amp;lt;b&gt;tag&amp;lt;/b&gt;.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Colons can be used to align columns.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tables&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;Are&lt;/th&gt;
&lt;th align=&quot;right&quot;&gt;Cool&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;col 3 is&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;right-aligned&lt;/td&gt;
&lt;td align=&quot;right&quot;&gt;$1600&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;col 2 is&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;centered&lt;/td&gt;
&lt;td align=&quot;right&quot;&gt;$12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;zebra stripes&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;are neat&lt;/td&gt;
&lt;td align=&quot;right&quot;&gt;$1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;There must be at least 3 dashes separating each header cell. The outer pipes (|)
are optional, and you don’t need to make the raw Markdown line up prettily. You
can also use inline Markdown.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Markdown&lt;/th&gt;
&lt;th&gt;Less&lt;/th&gt;
&lt;th&gt;Pretty&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;Still&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;&lt;code class=&quot;language-text&quot;&gt;renders&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;nicely&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;Blockquotes are very handy in email to emulate reply text. This line is part
of the same quote.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Quote break.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is a very long line that will still be quoted properly when it wraps. Oh
boy let’s keep writing to make sure this is long enough to actually wrap for
everyone. Oh, you can &lt;em&gt;put&lt;/em&gt; &lt;strong&gt;Markdown&lt;/strong&gt; into a blockquote.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;dl&gt;
  &lt;dt&gt;Definition list&lt;/dt&gt;
  &lt;dd&gt;Is something people use sometimes.&lt;/dd&gt;
  &lt;dt&gt;Markdown in HTML&lt;/dt&gt;
  &lt;dd&gt;Does *not* work **very** well. Use HTML &lt;em&gt;tags&lt;/em&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Three or more…&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Hyphens&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Asterisks&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Underscores&lt;/p&gt;
&lt;p&gt;Here’s a line for us to start with.&lt;/p&gt;
&lt;p&gt;This line is separated from the one above by two newlines, so it will be a
&lt;em&gt;separate paragraph&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;This line is also a separate paragraph, but… This line is only separated by a
single newline, so it’s a separate line in the &lt;em&gt;same paragraph&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?feature=player_embedded&amp;v=I6R9WSClRfE&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/I6R9WSClRfE/0.jpg&quot; alt=&quot;IMAGE ALT TEXT HERE&quot; width=&quot;240&quot; height=&quot;180&quot; border=&quot;10&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=I6R9WSClRfE&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/I6R9WSClRfE/0.jpg&quot; alt=&quot;IMAGE ALT TEXT HERE&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[First Post]]></title><description><![CDATA[This post is just the first one to keep the site going. I might delete it
sometime when I have more content.]]></description><link>https://johndpelingo.com/posts/first-post/</link><guid isPermaLink="false">https://johndpelingo.com/posts/first-post/</guid><pubDate>Mon, 17 Jun 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This post is just the first one to keep the site going. I might delete it
sometime when I have more content.&lt;/p&gt;</content:encoded></item></channel></rss>