<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Johnny Kerchel</title>
    <description>The latest articles on DEV Community by Johnny Kerchel (@johnnyc0rp).</description>
    <link>https://dev.to/johnnyc0rp</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4099253%2F79eb2a75-ca83-46f9-b477-0ee7918416f5.png</url>
      <title>DEV Community: Johnny Kerchel</title>
      <link>https://dev.to/johnnyc0rp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/johnnyc0rp"/>
    <language>en</language>
    <item>
      <title>I built a GitHub contribution snake that grows one segment per active day</title>
      <dc:creator>Johnny Kerchel</dc:creator>
      <pubDate>Fri, 28 Aug 2026 16:16:48 +0000</pubDate>
      <link>https://dev.to/johnnyc0rp/i-built-a-github-contribution-snake-that-grows-one-segment-per-active-day-151m</link>
      <guid>https://dev.to/johnnyc0rp/i-built-a-github-contribution-snake-that-grows-one-segment-per-active-day-151m</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJohnnyC0rp%2Fgrowing-contribution-snake%2Foutput%2Fgithub-contribution-grid-snake.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJohnnyC0rp%2Fgrowing-contribution-snake%2Foutput%2Fgithub-contribution-grid-snake.svg" alt="A blue animated snake eating active days on a GitHub contribution grid" width="856" height="121"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most contribution-snake animations use the graph as a board. I wanted the activity data to affect the snake itself.&lt;/p&gt;

&lt;p&gt;In this version, the snake starts with three segments and gains exactly one segment whenever it reaches a day with at least one contribution. Ten commits on one date still count as one active day and one new segment.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;A GitHub Actions workflow runs at 17 minutes past every hour, or on demand:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It reads the selected account's public contribution calendar through GitHub's GraphQL API.&lt;/li&gt;
&lt;li&gt;The generator builds a route that visits every cell once. It starts with a Hamiltonian backbone, then applies seeded backbite moves so the path is less mechanical while remaining deterministic.&lt;/li&gt;
&lt;li&gt;The snake follows that route. Each active day increases the body length by one segment.&lt;/li&gt;
&lt;li&gt;The generator writes one self-contained SVG. The head uses &lt;code&gt;animateMotion&lt;/code&gt;; the body uses animated stroke dash values; eaten contribution cells disappear at the matching frame.&lt;/li&gt;
&lt;li&gt;The validated SVG is committed to an &lt;code&gt;output&lt;/code&gt; branch and served through &lt;code&gt;raw.githubusercontent.com&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The route seed combines the username with the latest calendar date. That keeps a generated result stable while still allowing the route to change as the contribution calendar advances.&lt;/p&gt;

&lt;p&gt;The SVG also follows the viewer's light or dark color scheme. It contains no scripts or external resources, and the validator rejects credential-like text before publishing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add it to a GitHub profile
&lt;/h2&gt;

&lt;p&gt;No source edits, package installation, server, personal access token, or repository secret are required.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://github.com/JohnnyC0rp/growing-contribution-snake/fork" rel="noopener noreferrer"&gt;Fork the repository&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Open the fork's &lt;strong&gt;Actions&lt;/strong&gt; tab and enable workflows.&lt;/li&gt;
&lt;li&gt;Run &lt;strong&gt;Generate contribution snake&lt;/strong&gt; once with &lt;strong&gt;Run workflow&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add this image to the profile repository's &lt;code&gt;README.md&lt;/code&gt;, replacing &lt;code&gt;YOUR_GITHUB_USERNAME&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://raw.githubusercontent.com/YOUR_GITHUB_USERNAME/growing-contribution-snake/output/github-contribution-grid-snake.svg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Growing GitHub contribution snake"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"100%"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The workflow uses the fork owner's username by default. To render another public profile, add an Actions repository variable named &lt;code&gt;PROFILE_USERNAME&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The generator is dependency-free JavaScript for Node.js 20, and the project is available under the MIT license.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/JohnnyC0rp" rel="noopener noreferrer"&gt;
        JohnnyC0rp
      &lt;/a&gt; / &lt;a href="https://github.com/JohnnyC0rp/growing-contribution-snake" rel="noopener noreferrer"&gt;
        growing-contribution-snake
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A fork-ready GitHub contribution snake that grows as it eats real activity, generated automatically with GitHub Actions.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Growing Contribution Snake&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://github.com/JohnnyC0rp/growing-contribution-snake/actions/workflows/generate.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/JohnnyC0rp/growing-contribution-snake/actions/workflows/generate.yml/badge.svg" alt="Generate contribution snake"&gt;&lt;/a&gt;
&lt;a href="https://github.com/JohnnyC0rp/growing-contribution-snake/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667" alt="MIT License"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A real GitHub contribution snake that gains one body segment whenever it eats an active day. The dependency-free generator serves it as a small static SVG file from GitHub instead of a cold-starting web service.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Live demo&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/JohnnyC0rp/growing-contribution-snake/output/github-contribution-grid-snake.svg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJohnnyC0rp%2Fgrowing-contribution-snake%2Foutput%2Fgithub-contribution-grid-snake.svg" alt="Animated snake eating JohnnyC0rp's GitHub contribution graph" width="100%"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Use it on a profile&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;No source edits, package installation, server, Vercel project, personal access token, or repository secret are required.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Fork this repository.&lt;/li&gt;
&lt;li&gt;Open the fork's &lt;strong&gt;Actions&lt;/strong&gt; tab and enable workflows.&lt;/li&gt;
&lt;li&gt;Run &lt;strong&gt;Generate contribution snake&lt;/strong&gt; once with &lt;strong&gt;Run workflow&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add the following image to the profile repository's &lt;code&gt;README.md&lt;/code&gt;, replacing &lt;code&gt;YOUR_GITHUB_USERNAME&lt;/code&gt; in the repository URL:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-kos"&gt;&amp;lt;&lt;/span&gt;&lt;span class="pl-ent"&gt;img&lt;/span&gt; &lt;span class="pl-c1"&gt;src&lt;/span&gt;="&lt;span class="pl-s"&gt;https://raw.githubusercontent.com/YOUR_GITHUB_USERNAME/growing-contribution-snake/output/github-contribution-grid-snake.svg&lt;/span&gt;" &lt;span class="pl-c1"&gt;alt&lt;/span&gt;="&lt;span class="pl-s"&gt;Growing GitHub contribution snake&lt;/span&gt;" &lt;span class="pl-c1"&gt;width&lt;/span&gt;="&lt;span class="pl-s"&gt;100%&lt;/span&gt;"&lt;span class="pl-kos"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;The workflow defaults to the fork owner automatically. If the target profile has a different name, create an Actions repository variable named &lt;code&gt;PROFILE_USERNAME&lt;/code&gt;; no code change is needed.&lt;/p&gt;
&lt;p&gt;If the fork is renamed, replace…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/JohnnyC0rp/growing-contribution-snake" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;I would especially value feedback on two things: whether the motion is easy to follow, and whether the fork-to-profile setup is clear without reading the source.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>github</category>
      <category>javascript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
