<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://bridgetownrb.com/" version="2.2.0">Bridgetown</generator><link href="https://andrewm.codes/feed.xml" rel="self" type="application/atom+xml" /><link href="https://andrewm.codes/" rel="alternate" type="text/html" /><updated>2026-05-20T19:23:19-07:00</updated><id>https://andrewm.codes/feed.xml</id><title type="html">andrewm.codes</title><subtitle>Senior software engineer, Ruby community podcaster, co-host of Remote Ruby. Posts, projects, and other writing.</subtitle><author><name>Andrew Mason</name></author><entry><title type="html">Unlock the Power of Learning with Dual Coding Theory</title><link href="https://andrewm.codes/dual-coding-theory/" rel="alternate" type="text/html" title="Unlock the Power of Learning with Dual Coding Theory" /><published>2023-02-12T16:16:36-07:00</published><updated>2023-02-12T16:16:36-07:00</updated><id>repo://posts.collection/_posts/dual-coding-theory.md</id><content type="html" xml:base="https://andrewm.codes/dual-coding-theory/">&lt;p&gt;Have you ever had difficulty understanding a concept or idea? Do you feel like the words just don’t “click” in your memory when you read them? If so, you may want to consider using dual coding theory to improve your learning and memory retention.&lt;/p&gt;

&lt;p&gt;Dual coding theory is based on the idea that we use both verbal and visual codes when processing and storing information in our brains. In other words, we not only use language to learn and remember, but we also use images and symbols to understand and store information.&lt;/p&gt;

&lt;p&gt;Using dual coding techniques can help learners of all ages, but it is especially helpful for those who struggle with traditional forms of learning, such as reading and writing. By presenting concepts in both verbal and visual formats, learners can better encode and organize the information, leading to improved comprehension and performance.&lt;/p&gt;

&lt;p&gt;For example, if you’re trying to learn the structure of an atom, you can read a definition of the atom and also look at a diagram to create a mental image of the concept. This combination of verbal and visual cues can help you better understand and remember the information.&lt;/p&gt;

&lt;p&gt;Research has shown that the use of dual coding can improve memory retention, comprehension, and problem-solving abilities. So if you’re looking for an effective way to improve your learning and performance, consider using dual coding theory and combining verbal and visual cues to better understand and remember information.&lt;/p&gt;</content><author><name>Andrew Mason</name></author><category term="learning" /><category term="memory" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://andrewm.codes/og/dual-coding-theory.png" /><media:content medium="image" url="https://andrewm.codes/og/dual-coding-theory.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Kill Process Running on a Specfic Port</title><link href="https://andrewm.codes/kill-process-on-port/" rel="alternate" type="text/html" title="Kill Process Running on a Specfic Port" /><published>2023-01-01T20:23:33-07:00</published><updated>2023-01-01T20:23:33-07:00</updated><id>repo://posts.collection/_posts/snippets/kill-process-on-port.md</id><content type="html" xml:base="https://andrewm.codes/kill-process-on-port/">&lt;p&gt;I often have to kill proccesses that weren’t stopped correctly on different ports and can never remember the command.&lt;/p&gt;

&lt;h2 id=&quot;snippet&quot;&gt;Snippet&lt;/h2&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;kill&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-9&lt;/span&gt; &lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;lsof &lt;span class=&quot;nt&quot;&gt;-ti&lt;/span&gt; tcp:4000&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Replace &lt;code class=&quot;highlighter-rouge&quot;&gt;4000&lt;/code&gt; in the script above with the port you want to kill the process on.&lt;/li&gt;
  &lt;li&gt;Run the script in your terminal.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;extending&quot;&gt;Extending&lt;/h2&gt;

&lt;p&gt;We can extract this into a function to make it easier to use.&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;terminate&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;port&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;lsof &lt;span class=&quot;nt&quot;&gt;-ti&lt;/span&gt; tcp:&lt;span class=&quot;nv&quot;&gt;$port&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-n&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$pid&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
    &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;kill&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$pid&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Killed process &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$pid&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; on port &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$port&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else
    &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;No process found on port &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$port&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then we can use it like this:&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;terminate 4000
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Andrew Mason</name></author><category term="snippets" /><category term="unix" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://andrewm.codes/og/kill-process-on-port.png" /><media:content medium="image" url="https://andrewm.codes/og/kill-process-on-port.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">INTP: My Personality Type</title><link href="https://andrewm.codes/personality/" rel="alternate" type="text/html" title="INTP: My Personality Type" /><published>2022-06-29T22:59:52-07:00</published><updated>2022-06-29T22:59:52-07:00</updated><id>repo://posts.collection/_posts/personality.md</id><content type="html" xml:base="https://andrewm.codes/personality/">&lt;p&gt;I find it very hard to describe my personality.&lt;/p&gt;

&lt;p&gt;INTP. I think the description below is pretty spot-on.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;INTPs are philosophical innovators, fascinated by logical analysis, systems, and design. They are preoccupied with theory, and search for the universal law behind everything they see. They want to understand the unifying themes of life, in all their complexity.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;INTPs are detached, analytical observers who can seem oblivious to the world around them because they are so deeply absorbed in thought. They spend much of their time in their own heads: exploring concepts, making connections, and seeking understanding of how things work. To the Architect, life is an ongoing inquiry into the mysteries of the universe. 1&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To really understand me, you have to understand that I have &lt;a href=&quot;/adhd/&quot;&gt;Combined Type ADHD&lt;/a&gt;, which means I struggle a lot with my hyperactivity and attention span.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/adhd/&quot;&gt;View this post&lt;/a&gt; for more details and why I talk openly about it.&lt;/p&gt;

&lt;p&gt;Recently I have increasingly more aware of my inate perfectionism and how it negatively affects me.&lt;/p&gt;</content><author><name>Andrew Mason</name></author><category term="personal" /><category term="adhd" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://andrewm.codes/og/personality.png" /><media:content medium="image" url="https://andrewm.codes/og/personality.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Living with ADHD: The Benefits of Openness and Vulnerability</title><link href="https://andrewm.codes/adhd/" rel="alternate" type="text/html" title="Living with ADHD: The Benefits of Openness and Vulnerability" /><published>2022-06-29T22:59:52-07:00</published><updated>2022-06-29T22:59:52-07:00</updated><id>repo://posts.collection/_posts/adhd.md</id><content type="html" xml:base="https://andrewm.codes/adhd/">&lt;!-- ResponsiveImage.new(file: &quot;v1665648326/andrewm.codes/mountain-profile_cg5jg0.jpg&quot;, loading: :eager)  --&gt;

&lt;p&gt;I have Combined Type ADHD and &lt;strong&gt;it’s a big part of what makes me…me.&lt;/strong&gt; It isn’t my &lt;a href=&quot;/personality/&quot;&gt;entire personality&lt;/a&gt;, but it is constantly affecting me to the point I feel &lt;strong&gt;it’s important to know about when you meet or interact with me.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I didn’t know I had it until late in college and I often think about how different my life would have been had I known, and gotten help for it, earlier.&lt;/p&gt;

&lt;p&gt;Because of this and because it is such a big part of my life, &lt;strong&gt;I talk very openly about my ADHD&lt;/strong&gt; on &lt;a href=&quot;/about/&quot;&gt;social media&lt;/a&gt;, on &lt;a href=&quot;/podcasts/&quot;&gt;podcasts&lt;/a&gt;, and to hiring managers.&lt;/p&gt;

&lt;p&gt;Since I became very vocal about it, I have met so many other ADHD developers, some of whom were afraid to admit they had it previously because of the stigma. Even more importantly, &lt;strong&gt;several folks have told me they realized they had ADHD&lt;/strong&gt; after hearing me talk about the symptoms and have gotten help.&lt;/p&gt;

&lt;p&gt;There are companies out there who wouldn’t consider hiring me because of my ADHD, but every time I hear from someone who benefitted from me discussing it openly, &lt;strong&gt;I don’t care.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Medication completely changed my life and I currently take Vyvanse to help manage my ADHD.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you want to talk about ADHD&lt;/strong&gt;, hit me up on &lt;a href=&quot;https://twitter.com/andrewmcodes&quot;&gt;Twitter&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;ADHD is being a perfectionist without the capability of motivating yourself to achieve said perfection.
- &lt;a href=&quot;https://twitter.com/avresco/status/1286441624361287681&quot;&gt;@avresco&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;</content><author><name>Andrew Mason</name></author><category term="personal" /><category term="adhd" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://andrewm.codes/og/adhd.png" /><media:content medium="image" url="https://andrewm.codes/og/adhd.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">How to Add a Progress Bar Around Your Twitter Avatar</title><link href="https://andrewm.codes/twitter-avatar/" rel="alternate" type="text/html" title="How to Add a Progress Bar Around Your Twitter Avatar" /><published>2022-05-24T14:34:24-07:00</published><updated>2022-05-24T14:34:24-07:00</updated><id>repo://posts.collection/_posts/twitter-avatar.md</id><content type="html" xml:base="https://andrewm.codes/twitter-avatar/">&lt;p&gt;My &lt;a href=&quot;https://twitter.com/andrewmcodes&quot;&gt;Twitter avatar&lt;/a&gt; is outlined by a blue, previously green, progress bar that I get asked about often.&lt;/p&gt;

&lt;p&gt;The progress bar is updated in real-time every time I get a new follower. When I reach 10 new followers, the progress bar resets and the loop begins again.&lt;/p&gt;

&lt;p&gt;To achieve this effect, I use &lt;a href=&quot;https://blackmagic.so/&quot;&gt;BlackMagic.so&lt;/a&gt;, a suite of tools for influencers to enhance &lt;a href=&quot;https://twitter.com/andrewmcodes&quot;&gt;Twitter&lt;/a&gt; from &lt;a href=&quot;https://twitter.com/tdinh_me&quot;&gt;Tony Dinh.&lt;/a&gt; Their main product is an analytics tools, but they have a free tool named &lt;a href=&quot;https://blackmagic.so/profile-progress-bar&quot;&gt;Profile Progress Bar&lt;/a&gt;, which you can use to add a progress bar to your Twitter avatar.&lt;/p&gt;

&lt;figure class=&quot;not-prose space-y-1&quot;&gt;
  &lt;div class=&quot;aspect-auto&quot;&gt;
        &lt;img src=&quot;https://res.cloudinary.com/andrewmcodes/image/upload/v1666073663/posts/twitter-avatar/20220505050712Z_BlackMagic.so2&quot; alt=&quot;BlackMagic.so Profile Progress Bar Twitter Tool&quot; loading=&quot;lazy&quot; class=&quot;rounded-lg object-cover object-center shadow-lg ring-1 ring-slate-6 mx-auto&quot; /&gt;

  &lt;/div&gt;
    &lt;figcaption class=&quot;text-center text-sm text-slate-11&quot;&gt;    The BlackMagic.so Profile Progress Bar Twitter Tool
&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Connect your &lt;a href=&quot;https://twitter.com/andrewmcodes&quot;&gt;Twitter account&lt;/a&gt; to BlackMagic.so to add a progress bar to your Twitter avatar. You can customize the colors and progress value to your liking and start the real-time updates.&lt;/p&gt;

&lt;p&gt;BlackMagic.so has several other free, and paid tools, but this is currently the only one I use.&lt;/p&gt;

&lt;p&gt;There is no real reason other than it’s fun.&lt;/p&gt;

&lt;p&gt;Want to see it increment? &lt;a href=&quot;https://twitter.com/andrewmcodes&quot;&gt;Follow me on Twitter! 😉&lt;/a&gt;&lt;/p&gt;</content><author><name>Andrew Mason</name></author><category term="twitter" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://andrewm.codes/og/twitter-avatar.png" /><media:content medium="image" url="https://andrewm.codes/og/twitter-avatar.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Ruby on Rails - The Best Way to Develop Web Applications</title><link href="https://andrewm.codes/ruby-rails-develop-web-applications/" rel="alternate" type="text/html" title="Ruby on Rails - The Best Way to Develop Web Applications" /><published>2022-05-12T11:34:00-07:00</published><updated>2022-05-12T11:43:00-07:00</updated><id>repo://posts.collection/_posts/ruby-rails-develop-web-applications.md</id><content type="html" xml:base="https://andrewm.codes/ruby-rails-develop-web-applications/">&lt;p&gt;I have not finished writing this post yet so this serves a placeholder to remind me.&lt;/p&gt;

&lt;p&gt;Let me know if you are waiting on it! That will give me incentive to finish it.&lt;/p&gt;</content><author><name>Andrew Mason</name></author><category term="wip" /><category term="rails" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://andrewm.codes/og/ruby-rails-develop-web-applications.png" /><media:content medium="image" url="https://andrewm.codes/og/ruby-rails-develop-web-applications.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Minimalist Habit Tracking Template for Obsidian</title><link href="https://andrewm.codes/minimalist-habit-tracker-template-for-obsidian/" rel="alternate" type="text/html" title="Minimalist Habit Tracking Template for Obsidian" /><published>2022-05-12T11:34:00-07:00</published><updated>2022-05-12T11:34:00-07:00</updated><id>repo://posts.collection/_posts/minimalist-habit-tracker-template-for-obsidian.md</id><content type="html" xml:base="https://andrewm.codes/minimalist-habit-tracker-template-for-obsidian/">&lt;p&gt;In &lt;a href=&quot;https://obsidian.md&quot;&gt;Obsidian&lt;/a&gt;, there are usually many different ways to implement a feature that you would like to have in your vault. Habit tracking is a way to help you track and implement habits in your daily life.&lt;/p&gt;

&lt;h2 id=&quot;daily-notes&quot;&gt;Daily Notes&lt;/h2&gt;

&lt;p&gt;If you are already creating daily notes in Obsidian, via the &lt;a href=&quot;https://help.obsidian.md/Plugins/Daily+notes&quot;&gt;Daily Notes core plugin&lt;/a&gt; or the &lt;a href=&quot;https://github.com/liamcain/obsidian-periodic-notes&quot;&gt;Periodic Notes community plugin&lt;/a&gt;, it makes sense to track your habits here as well. In order to accomplish this, we can leverage the power of &lt;a href=&quot;https://github.com/blacksmithgu/obsidian-dataview&quot;&gt;Dataview&lt;/a&gt; and templates to create a minimal dashboard for tracking our habit’s progress for the week.&lt;/p&gt;

&lt;p&gt;Moving forward, I will assume you have &lt;a href=&quot;https://github.com/liamcain/obsidian-periodic-notes&quot;&gt;Periodic Notes&lt;/a&gt; or &lt;a href=&quot;https://help.obsidian.md/Plugins/Daily+notes&quot;&gt;Daily Notes&lt;/a&gt; plugin enabled and configured with a template. You do not have to use the &lt;a href=&quot;https://github.com/SilentVoid13/Templater&quot;&gt;Templater community plugin&lt;/a&gt;, the &lt;a href=&quot;https://help.obsidian.md/Plugins/Templates&quot;&gt;Templates core plugin&lt;/a&gt; will work as well. I will be using Templater in the examples below, but you can sub out any of the special syntax for &lt;a href=&quot;https://help.obsidian.md/Plugins/Templates&quot;&gt;Obsidian Templates&lt;/a&gt; equivalent.&lt;/p&gt;

&lt;h2 id=&quot;daily-note-template&quot;&gt;Daily Note Template&lt;/h2&gt;

&lt;p&gt;Here is an example daily note template with Templater, which includes the habits we want to track:&lt;/p&gt;

&lt;div class=&quot;language-md highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gh&quot;&gt;# &amp;lt;u&amp;gt;&amp;lt;% moment(tp.file.title).format(&quot;MMMM Do, YYYY&quot;) %&amp;gt; (missing)&amp;lt;/u&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;u&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;tp.date.yesterday&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;(&quot;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;YYYY-MM-DD&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&quot;)&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt; (missing)&lt;span class=&quot;nt&quot;&gt;&amp;lt;/u&amp;gt;&lt;/span&gt; | &lt;span class=&quot;nt&quot;&gt;&amp;lt;u&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;tp.date.tomorrow&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;(&quot;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;YYYY-MM-DD&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&quot;)&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt; (missing)&lt;span class=&quot;nt&quot;&gt;&amp;lt;/u&amp;gt;&lt;/span&gt;

&lt;span class=&quot;gu&quot;&gt;## Habits&lt;/span&gt;

&lt;span class=&quot;gs&quot;&gt;**Reading**&lt;/span&gt;::
&lt;span class=&quot;gs&quot;&gt;**Sleep**&lt;/span&gt;:: 0
&lt;span class=&quot;gs&quot;&gt;**Exercise**&lt;/span&gt;:: 0
&lt;span class=&quot;gs&quot;&gt;**Highlights**&lt;/span&gt;:: 0
&lt;span class=&quot;gs&quot;&gt;**Mindfulness**&lt;/span&gt;:: 0

&lt;span class=&quot;gu&quot;&gt;## Notes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We will use this template for our daily notes. Whenever we create a new daily note, we can fill in the values for our habits. An example of a daily note with the habits filled in:&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;Obsidian Daily Note Template&quot; src=&quot;https://res.cloudinary.com/andrewmcodes/image/upload/w_800,q_auto,f_auto/v1652347823/posts/minimalist-habit-tracker-template-for-obsidian/daily-note-template_nj1yx5&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;dashboard&quot;&gt;Dashboard&lt;/h2&gt;

&lt;p&gt;Now we can create a minimal dashboard to track our habits throughout the week. Make sure &lt;a href=&quot;https://github.com/blacksmithgu/obsidian-dataview&quot;&gt;Dataview&lt;/a&gt; is enabled and create a new note for your dashboard with the following:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-dataview&quot;&gt;TABLE WITHOUT ID
  file.link as Date,
  choice(exercise &amp;gt; 30, &quot;✅&quot;, &quot;❌&quot;) as Exercise,
  choice(sleep &amp;gt; 6, &quot;✅&quot;, &quot;❌&quot;) as Sleep,
  choice(highlights &amp;gt;= 3, &quot;✅&quot;, &quot;❌&quot;) as Highlights,
  choice(mindfulness &amp;gt; 10, &quot;✅&quot;, &quot;❌&quot;) as Mindfulness,
  reading as Reading
FROM &quot;daily&quot;
WHERE file.day &amp;lt;= date(now) AND file.day &amp;gt;= date(now) - dur(7days)
SORT file.day ASC
&lt;/code&gt;&lt;/pre&gt;

&lt;div class=&quot;my-6 rounded-xl border p-4 leading-6 [&amp;amp;&amp;gt;:first-child]:mt-0 [&amp;amp;&amp;gt;:last-child]:mb-0 bg-sage-2 text-sage-11 border-sage-6&quot;&gt;&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;FROM &quot;daily&quot;&lt;/code&gt; determines which pages are collected and displayed. In this case, we are only collecting notes in the &lt;code class=&quot;highlighter-rouge&quot;&gt;daily&lt;/code&gt; folder. You can select based on other sources like tags and links. Refer to the &lt;a href=&quot;https://blacksmithgu.github.io/obsidian-dataview/query/queries/#from&quot;&gt;Dataview FROM documentation&lt;/a&gt; for more information.&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;After we accumulate more daily notes, our dashboard will look something like:&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;Obsidian Habit Tracker Dashboard&quot; src=&quot;https://res.cloudinary.com/andrewmcodes/image/upload/w_800,q_auto,f_auto/v1652347824/posts/minimalist-habit-tracker-template-for-obsidian/habit-tracker-dashboard_asfzri&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;This is my preferred method for creating a habit tracking dashboard, but as I said in the beginning, there are multiple ways of accomplishing this behavior.&lt;/p&gt;

&lt;p&gt;You can extend this pattern to create dashboards for other features, such as: mood tracking, reading list, journaling, etc.&lt;/p&gt;

&lt;p&gt;Let me know what you come up with on &lt;a href=&quot;https://twitter.com/andrewmcodes&quot;&gt;Twitter!&lt;/a&gt;&lt;/p&gt;</content><author><name>Andrew Mason</name></author><category term="obsidian" /><category term="dataview" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://andrewm.codes/og/minimalist-habit-tracker-template-for-obsidian.png" /><media:content medium="image" url="https://andrewm.codes/og/minimalist-habit-tracker-template-for-obsidian.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Create Repository from Current Directory with the GitHub CLI</title><link href="https://andrewm.codes/gh-create-repo/" rel="alternate" type="text/html" title="Create Repository from Current Directory with the GitHub CLI" /><published>2022-03-30T01:00:00-07:00</published><updated>2022-03-30T01:00:00-07:00</updated><id>repo://posts.collection/_posts/snippets/gh-create-repo.md</id><content type="html" xml:base="https://andrewm.codes/gh-create-repo/">&lt;div class=&quot;not-prose&quot;&gt;
  &lt;div class=&quot;flex flex-nowrap items-center text-sm&quot;&gt;
    &lt;span class=&quot;py-1 px-2 rounded-l-md text-slate-12 bg-slate-3&quot;&gt;$&amp;nbsp;&lt;/span&gt;
    &lt;code class=&quot;py-1 px-2 font-mono bg-slate-3 rounded-r-md&quot;&gt;gh repo create your-repo --public --source=. --push&lt;/code&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Make sure you have the GitHub CLI installed and you are signed in&lt;/li&gt;
  &lt;li&gt;Run the command above to create a public repo from the current directory and push&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;resources&quot;&gt;Resources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://cli.github.com/&quot;&gt;GitHub CLI Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Andrew Mason</name></author><category term="snippets" /><category term="gh" /><category term="github" /><category term="cli" /><category term="terminal" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://andrewm.codes/og/gh-create-repo.png" /><media:content medium="image" url="https://andrewm.codes/og/gh-create-repo.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">How to Deploy Your Bridgetown Site to Github Pages</title><link href="https://andrewm.codes/deploy-bridgetown-to-github-pages/" rel="alternate" type="text/html" title="How to Deploy Your Bridgetown Site to Github Pages" /><published>2022-03-23T00:47:00-07:00</published><updated>2022-03-24T00:47:00-07:00</updated><id>repo://posts.collection/_posts/deploy-bridgetown-to-github-pages.md</id><content type="html" xml:base="https://andrewm.codes/deploy-bridgetown-to-github-pages/">&lt;p&gt;With the release of &lt;a href=&quot;https://www.bridgetownrb.com/release/reaching-1.0-next-generation-progressive-site-generator/&quot;&gt;Bridgetown version 1.0&lt;/a&gt; came several new &lt;a href=&quot;https://www.bridgetownrb.com/docs/bundled-configurations&quot;&gt;bundled configurations&lt;/a&gt; for deployment, in addition to other powerful new features.&lt;/p&gt;

&lt;p&gt;I was personally able to introduce a bundled configuration for deploying to Vercel in &lt;a href=&quot;https://github.com/bridgetownrb/bridgetown/pull/483&quot;&gt;bridgetownrb/bridgetown#483.&lt;/a&gt; After the final v1 release, I was pouring over the changes and, to my delight, I discovered that a bundled configuration for GitHub Pages was added in &lt;a href=&quot;https://github.com/bridgetownrb/bridgetown/pull/503&quot;&gt;bridgetown/bridgetownrb#503&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Before I explain why I was overjoyed with this addition from &lt;a href=&quot;https://twitter.com/ayushn21&quot;&gt;Ayush&lt;/a&gt;, let’s deploy a Bridgetown site to GitHub Pages using this new configuration to see how it works!&lt;/p&gt;

&lt;h2 id=&quot;requirements&quot;&gt;Requirements&lt;/h2&gt;

&lt;p&gt;Make sure &lt;a href=&quot;https://www.bridgetownrb.com/docs&quot;&gt;Bridgetown v1.0 or higher is installed&lt;/a&gt;, otherwise the &lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; bundled configuration will not be available.&lt;/p&gt;

&lt;p&gt;⚠️ This tutorial assumes you are creating a &lt;a href=&quot;https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites&quot;&gt;“Project Site”&lt;/a&gt;. If you are trying to create a user or organization site, you may not need to make the configuration changes below.&lt;/p&gt;

&lt;h2 id=&quot;getting-started&quot;&gt;Getting Started&lt;/h2&gt;

&lt;p&gt;If you have an existing Bridgetown site you want to deploy to GitHub Pages, run &lt;code class=&quot;highlighter-rouge&quot;&gt;bin/bridgetown configure gh-pages&lt;/code&gt; from the root of your project to add the necessary files and skip the following step.&lt;/p&gt;

&lt;p&gt;If you do not have an existing site, let’s create a new one with the &lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; configuration.&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;bridgetown new bridgetown-gh-pages-demo &lt;span class=&quot;nt&quot;&gt;-t&lt;/span&gt; erb &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; gh-pages &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;bridgetown-gh-pages-demo
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If done correctly, you will see the following output in your terminal, accompanied by further instructions: &lt;code class=&quot;highlighter-rouge&quot;&gt;🎉 A GitHub action to deploy your site to GitHub pages has been configured!&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;updates-for-github-pages&quot;&gt;Updates for GitHub Pages&lt;/h2&gt;

&lt;p&gt;We need to make two updates to our site to make it work correctly on GitHub Pages as detailed in the configuration output.&lt;/p&gt;

&lt;p&gt;The URL of our deployed site will be &lt;code class=&quot;highlighter-rouge&quot;&gt;https://&amp;lt;username&amp;gt;.github.io/&amp;lt;repository&amp;gt;/&lt;/code&gt;, where &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;repository&amp;gt;&lt;/code&gt; acts as a base path for the site. For me, that URL was &lt;code class=&quot;highlighter-rouge&quot;&gt;https://andrewmcodes.github.io/bridgetown-gh-pages-demo/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;First, we need to update the &lt;code class=&quot;highlighter-rouge&quot;&gt;base_path&lt;/code&gt; in our Bridgetown config file &lt;code class=&quot;highlighter-rouge&quot;&gt;bridgetown.config.yml&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-diff highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gd&quot;&gt;- base_path: &quot;&quot;
&lt;/span&gt;&lt;span class=&quot;gi&quot;&gt;+ base_path: &quot;/bridgetown-gh-pages-demo&quot;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Secondly, &lt;a href=&quot;https://esbuild.github.io&quot;&gt;esbuild&lt;/a&gt; is now the default build tool in Bridgetown v1.0, and we need to tell it that our &lt;code class=&quot;highlighter-rouge&quot;&gt;publicPath&lt;/code&gt; is now prefixed with &lt;code class=&quot;highlighter-rouge&quot;&gt;/bridgetown-gh-pages-demo&lt;/code&gt; in &lt;code class=&quot;highlighter-rouge&quot;&gt;esbuild.config.js&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-diff highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gd&quot;&gt;- const esbuildOptions = {}
&lt;/span&gt;&lt;span class=&quot;gi&quot;&gt;+ const esbuildOptions = { publicPath: &quot;/bridgetown-gh-pages-demo/_bridgetown/static&quot; }
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That should be all the setup we need to do!&lt;/p&gt;

&lt;p&gt;⚠️ One thing you may need to check for on an existing site is that you are using &lt;code class=&quot;highlighter-rouge&quot;&gt;resource.relative_url&lt;/code&gt; instead of passing the location directly to any anchor tags for example. &lt;code class=&quot;highlighter-rouge&quot;&gt;#relative_url&lt;/code&gt; will correctly add the base path we configured in &lt;code class=&quot;highlighter-rouge&quot;&gt;bridgetown.config.yml&lt;/code&gt; to the links that you will otherwise have to add manually.&lt;/p&gt;

&lt;h2 id=&quot;pushing-our-work&quot;&gt;Pushing Our Work&lt;/h2&gt;

&lt;p&gt;Let’s add and commit this code:&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git add &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;chore: initial commit&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next, create your repository using your preferred method. I find myself reaching for the &lt;a href=&quot;https://cli.github.com/&quot;&gt;GitHub CLI&lt;/a&gt; these days:&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gh repo create bridgetown-gh-pages-demo &lt;span class=&quot;nt&quot;&gt;--public&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--source&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--push&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you set up the repository from the GitHub UI, don’t forget to add the remote origin and push, which the CLI command above handles for us:&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git remote add origin https://github.com/USERNAME/bridgetown-gh-pages-demo.git
git push &lt;span class=&quot;nt&quot;&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;configure-github-pages-and-deploy&quot;&gt;Configure GitHub Pages and Deploy&lt;/h2&gt;

&lt;p&gt;You may have noticed an action started automatically when you pushed your code, which kicked off a GitHub Pages deploy. Once the action completes successfully, we should have a branch named &lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; with our static site contents.&lt;/p&gt;

&lt;p&gt;The last thing we need to do is tell GitHub Pages to use the &lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; branch as it’s source in &lt;code class=&quot;highlighter-rouge&quot;&gt;Settings -&amp;gt; Pages&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Navigate to the settings page and set the source from &lt;code class=&quot;highlighter-rouge&quot;&gt;None&lt;/code&gt; to &lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; and click save.&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;GitHub Pages Public URL&quot; src=&quot;https://res.cloudinary.com/andrewmcodes/image/upload/w_800,q_auto,f_auto/v1648021946/posts/deploy-bridgetown-to-github-pages/20220323061751Z_Safari_Pages_cfmcb4&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once the automatic deployment completes, your site URL should be displayed! Navigate to it in your browser and verify everything works correctly.&lt;/p&gt;

&lt;h2 id=&quot;success&quot;&gt;Success!&lt;/h2&gt;

&lt;p&gt;&lt;img alt=&quot;GitHub Pages Public URL&quot; src=&quot;https://res.cloudinary.com/andrewmcodes/image/upload/w_800,q_auto,f_auto/v1648021947/posts/deploy-bridgetown-to-github-pages/20220323061936Z_Safari_Your_awesome_title_This_site_is_totally_awesome_a5kova&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I want to give another big shoutout to &lt;a href=&quot;https://twitter.com/ayushn21&quot;&gt;Ayush&lt;/a&gt; for adding this bundled configuration to Bridgetown v1.0!&lt;/p&gt;

&lt;p&gt;Why? Because now the former art that I had been (lazily) maintaining can be archived and taken off my plate. 🎉&lt;/p&gt;

&lt;h2 id=&quot;farewell-old-code&quot;&gt;Farewell Old Code&lt;/h2&gt;

&lt;p&gt;In the summer of 2020, I created &lt;a href=&quot;https://github.com/andrewmcodes/bridgetown-gh-pages-action&quot;&gt;bridgetown-gh-pages-action&lt;/a&gt;, which attempted to solve the same problem of making deploying your Bridgetown site to GitHub Pages automatic and seamless.&lt;/p&gt;

&lt;p&gt;Unfortunately, as I discovered with many of the GitHub Actions I created earlier on, maintenance was a pain, it was not flexible, and the issues were specific to the users environment and almost impossible to debug.&lt;/p&gt;

&lt;p&gt;With the introduction of the new &lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; bundled configuration, I will be archiving this action and it will not receive any future updates.&lt;/p&gt;

&lt;h2 id=&quot;final-thoughts&quot;&gt;Final Thoughts&lt;/h2&gt;

&lt;p&gt;I am interested to see whether this configuration will cause similar issues and churn that I went through on this and several other actions now that it is in Bridgetown. The reality is that these actions are great at the golden path, but tend to fall over if the user has left that path.&lt;/p&gt;

&lt;p&gt;By the way, if you are in this situation, you should be creating your own custom action with the library versions you need, not reaching for something off the shelf.&lt;/p&gt;

&lt;p&gt;For now, I will be keeping my eyes on the issues to see if I can pitch in when the inevitable “bug” report comes in.&lt;/p&gt;</content><author><name>Andrew Mason</name></author><category term="bridgetown" /><category term="github-pages" /><category term="github-actions" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://andrewm.codes/og/deploy-bridgetown-to-github-pages.png" /><media:content medium="image" url="https://andrewm.codes/og/deploy-bridgetown-to-github-pages.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Enable Repeating Keys in VS Code on macOS</title><link href="https://andrewm.codes/vscode-enable-repeating-keys-macos/" rel="alternate" type="text/html" title="Enable Repeating Keys in VS Code on macOS" /><published>2022-02-27T00:37:44-07:00</published><updated>2022-02-27T00:37:00-07:00</updated><id>repo://posts.collection/_posts/snippets/vscode-enable-repeating-keys-macos.md</id><content type="html" xml:base="https://andrewm.codes/vscode-enable-repeating-keys-macos/">&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# VS Code&lt;/span&gt;
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled &lt;span class=&quot;nt&quot;&gt;-bool&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;false&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# VS Code - Insiders&lt;/span&gt;
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled &lt;span class=&quot;nt&quot;&gt;-bool&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Run the first command above to enable repeating keys in VS Code&lt;/li&gt;
  &lt;li&gt;If you use VS Code Insiders, run the second command as well&lt;/li&gt;
  &lt;li&gt;You may need to restart VS Code, but repeating keys should now be enabled&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;resources&quot;&gt;Resources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://code.visualstudio.com/insiders/&quot;&gt;Visual Studio Code Insiders Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Andrew Mason</name></author><category term="snippets" /><category term="mac-defaults" /><category term="macos" /><category term="vim" /><category term="vs-code" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://andrewm.codes/og/vscode-enable-repeating-keys-macos.png" /><media:content medium="image" url="https://andrewm.codes/og/vscode-enable-repeating-keys-macos.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>