<feed xmlns="http://www.w3.org/2005/Atom">
  
    <title>Er Demo</title>
  
  <link href="https://15c5c002.er-6wj.pages.dev/index.xml" rel="self"/>
  <link href="https://15c5c002.er-6wj.pages.dev/"/>
  <updated>2026-01-15T00:00:00+00:00</updated>
  <id>https://15c5c002.er-6wj.pages.dev/</id>
  <generator>Hugo -- gohugo.io</generator>
  <entry>
    <title type="html"><![CDATA[Mermaid Diagrams in Org Mode]]></title>
    <link href="https://15c5c002.er-6wj.pages.dev/posts/mermaid-org/"/>
    <id>https://15c5c002.er-6wj.pages.dev/posts/mermaid-org/</id>
    <published>2025-10-13T00:00:00+00:00</published>
    <updated>2025-10-13T00:00:00+00:00</updated>
    <content type="html"><![CDATA[
<p>
Mermaid also works in Org content. Use a source block whose language is
<code class="verbatim">mermaid</code>; the theme converts Hugo&#39;s highlighted Org output before rendering
the diagram.</p>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Release states
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<p>
State diagrams can summarize a workflow without maintaining a separate image:</p>
<div class="src src-mermaid">
<pre tabindex="0"><code class="language-mermaid" data-lang="mermaid">stateDiagram-v2
    [*] --&gt; Draft
    Draft --&gt; Review: Open pull request
    Review --&gt; Draft: Request changes
    Review --&gt; Published: Approve and merge
    Published --&gt; [*]</code></pre>
</div>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
Content model
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<p>
Entity relationship diagrams are useful for describing structured content:</p>
<div class="src src-mermaid">
<pre tabindex="0"><code class="language-mermaid" data-lang="mermaid">erDiagram
    AUTHOR ||--o{ POST : writes
    POST }o--o{ TAG : uses
    AUTHOR {
        string name
        string email
    }
    POST {
        string title
        date published
    }
    TAG {
        string name
    }</code></pre>
</div>
<p>
Like the Markdown examples, these diagrams use the site&#39;s active palette and
hand-drawn style, and are re-rendered when the light or dark theme changes.</p>
</div>
</div>
]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Mermaid Diagrams in Markdown]]></title>
    <link href="https://15c5c002.er-6wj.pages.dev/posts/mermaid-markdown/"/>
    <id>https://15c5c002.er-6wj.pages.dev/posts/mermaid-markdown/</id>
    <published>2025-10-12T00:00:00+00:00</published>
    <updated>2025-10-12T00:00:00+00:00</updated>
    <content type="html"><![CDATA[<p>Mermaid diagrams can live beside prose as ordinary fenced code blocks. The
theme loads Mermaid only when a page contains at least one diagram and gives
the result a hand-drawn appearance.</p>
<h2 id="publishing-workflow">Publishing workflow</h2>
<p>This flowchart shows a small documentation pipeline:</p>
<pre class="mermaid">flowchart LR
    A[Write Markdown] --&gt; B{Preview locally}
    B --&gt;|Needs work| A
    B --&gt;|Looks good| C[Build with Hugo]
    C --&gt; D[Deploy site]</pre>
<h2 id="request-lifecycle">Request lifecycle</h2>
<p>Sequence diagrams are useful for documenting interactions between services:</p>
<pre class="mermaid">sequenceDiagram
    actor Reader
    participant Browser
    participant HugoSite as Hugo site
    Reader-&gt;&gt;Browser: Open an article
    Browser-&gt;&gt;HugoSite: Request generated page
    HugoSite--&gt;&gt;Browser: Return HTML
    Browser-&gt;&gt;Browser: Render Mermaid diagram
    Browser--&gt;&gt;Reader: Display the article</pre>
<p>The same blocks follow the selected light or dark color palette.</p>
]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Citing the classics (Markdown)]]></title>
    <link href="https://15c5c002.er-6wj.pages.dev/posts/citing-the-classics-md/"/>
    <id>https://15c5c002.er-6wj.pages.dev/posts/citing-the-classics-md/</id>
    <published>2025-10-04T00:00:00+00:00</published>
    <updated>2025-10-04T00:00:00+00:00</updated>
    <content type="html"><![CDATA[<p>This post demonstrates the theme&rsquo;s footnote treatment. The inline marker
is a bracketed superscript number like Wikipedia or a research paper<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>,
and each note carries a back-link <code>↩</code> that returns you to the spot you were
reading.</p>
<p>Repeat citations are supported in Markdown: cite the same source twice and
Hugo emits two separate <code>fnref</code> anchors, with one back-link per use on
the note itself<sup id="fnref1:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>. Clicking either back-link returns to the
matching site.</p>
<p>Long-form notes work too<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup>, including emphasis, links, and
multi-sentence prose. The note body sits in the footnotes block at the
bottom of the post, separated by a thin rule and labelled &ldquo;Notes&rdquo;.</p>
<p>Try this: click <code>[1]</code> above, then click the <code>↩</code> next to &ldquo;Knuth (1974)&rdquo;.
Notice the brief background flash on the target — that&rsquo;s pure CSS using
<code>:target</code> and the theme&rsquo;s <code>--color-background-alt</code>, so it works in both
light and dark mode without JS.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Knuth, D. E. (1974). &ldquo;Structured Programming with go to
Statements.&rdquo; <em>Computing Surveys</em>, 6(4), 261-301. The original
citation of &ldquo;premature optimization is the root of all evil.&rdquo;&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a>&#160;<a href="#fnref1:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>This page also exercises the theme&rsquo;s other typography
bits — the prose measure stays at ~65ch, but the footnotes block
follows the same narrow measure rather than expanding to the wider
canvas reserved for code and figures. That makes notes feel like
part of the reading column rather than a separate widget.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[The little languages that wouldn&#39;t die]]></title>
    <link href="https://15c5c002.er-6wj.pages.dev/posts/citing-the-classics-org/"/>
    <id>https://15c5c002.er-6wj.pages.dev/posts/citing-the-classics-org/</id>
    <published>2025-10-04T00:00:00+00:00</published>
    <updated>2025-10-04T00:00:00+00:00</updated>
    <content type="html"><![CDATA[<p>
Every few years someone declares Lisp dead, and every few years the
obituary is filed alongside the previous one. The pattern is old
enough now to be its own genre<sup class="footnote-reference"><a id="footnote-reference-1" href="#footnote-1">1</a></sup>.</p>
<p>
A similar story plays out with Smalltalk. The language slid out of the
mainstream after Sun&#39;s licensing fees made commercial use awkward in
the early 90s<sup class="footnote-reference"><a id="footnote-reference-2" href="#footnote-2">2</a></sup>, and yet every modern object system carries
its fingerprints: live image-based development, the model-view-
controller pattern<sup class="footnote-reference"><a id="footnote-reference-3" href="#footnote-3">3</a></sup>, the very notion of &#34;sending messages&#34;
to objects.</p>
<p>
Forth&#39;s story is stranger. It&#39;s still inside enough firmware that you
have probably executed Forth bytecode today without knowing it — the
Open Firmware standard adopted by Apple, Sun, and IBM<sup class="footnote-reference"><a id="footnote-reference-4" href="#footnote-4">4</a></sup> runs
on a stack VM derived directly from Charles Moore&#39;s 1970s work.</p>
<p>
The lesson isn&#39;t that these languages were ahead of their time, or
that the mainstream is wrong, or that you should rewrite your CRUD app
in any of them. It&#39;s that paradigms move at one timescale and the code
that depends on them moves at another, and the &#34;dead&#34; languages often
end up doing more lifting per surviving line than the trendy ones.</p>
<div class="footnotes">
<hr class="footnotes-separatator"/>
<div class="footnote-definitions">
<div class="footnote-definition">
<sup id="footnote-1"><a href="#footnote-reference-1">1</a></sup>
<div class="footnote-body">
<p>Graham, P. (2003). &#34;Beating the Averages.&#34; Reprinted in
<em>Hackers &amp; Painters</em>, O&#39;Reilly, 2004. Graham frames the recurring
Lisp-is-dead claim as a feature of the language&#39;s culture rather than
its technical position.</p>
</div>
</div>
<div class="footnote-definition">
<sup id="footnote-2"><a href="#footnote-reference-2">2</a></sup>
<div class="footnote-body">
<p>Goldberg, A. (1994). &#34;The Story of Smalltalk.&#34; <em>HOPL II</em>.
Goldberg&#39;s first-hand account of the language&#39;s commercial trajectory
at ParcPlace and IBM.</p>
</div>
</div>
<div class="footnote-definition">
<sup id="footnote-3"><a href="#footnote-reference-3">3</a></sup>
<div class="footnote-body">
<p>Reenskaug, T. (1979). &#34;Models - Views - Controllers.&#34;
Internal Xerox PARC memo. The original MVC formulation, written while
Reenskaug was visiting the Learning Research Group; the pattern was
shipped first in Smalltalk-80.</p>
</div>
</div>
<div class="footnote-definition">
<sup id="footnote-4"><a href="#footnote-reference-4">4</a></sup>
<div class="footnote-body">
<p>IEEE Std 1275-1994. &#34;Standard for Boot (Initialization
Configuration) Firmware: Core Requirements and Practices.&#34; Used by
Sun&#39;s SPARC machines, Apple&#39;s Open Firmware (1994 – 2006), and IBM&#39;s
RS/6000 line.</p>
</div>
</div>
</div>
</div>
]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Showcasing Programming Language Syntax Highlighting in Org Mode]]></title>
    <link href="https://15c5c002.er-6wj.pages.dev/posts/code/"/>
    <id>https://15c5c002.er-6wj.pages.dev/posts/code/</id>
    <published>2025-06-29T00:00:00+00:00</published>
    <updated>2025-06-29T00:00:00+00:00</updated>
    <content type="html"><![CDATA[
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Introduction
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<p>
Org mode provides excellent support for syntax highlighting across numerous programming languages. This post demonstrates how different languages appear when embedded in Org documents using source code blocks. Each example shows both the practical code and how Org mode beautifully renders the syntax.</p>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
Python: Data Processing Made Simple&#xa0;&#xa0;&#xa0;<span class="tags"><span class="tag-python">python</span>&#xa0;<span class="tag-data">data</span></span>
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<p>
Python&#39;s clean syntax makes it perfect for data manipulation and analysis:</p>
<div class="src src-python">
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">import</span> <span style="color:#8fbcbb">pandas</span> <span style="color:#d08770;font-weight:bold">as</span> <span style="color:#8fbcbb">pd</span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">import</span> <span style="color:#8fbcbb">numpy</span> <span style="color:#d08770;font-weight:bold">as</span> <span style="color:#8fbcbb">np</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">def</span> <span style="color:#88c0d0">analyze_sales_data</span><span style="color:#eceff4">(</span>filename<span style="color:#eceff4">):</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a3be8c">&#34;&#34;&#34;Analyze sales data and return key metrics.&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span>    df <span style="color:#5e81ac">=</span> pd<span style="color:#5e81ac">.</span>read_csv<span style="color:#eceff4">(</span>filename<span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#4c566a;font-style:italic"># Calculate monthly totals</span>
</span></span><span style="display:flex;"><span>    monthly_sales <span style="color:#5e81ac">=</span> df<span style="color:#5e81ac">.</span>groupby<span style="color:#eceff4">(</span><span style="color:#a3be8c">&#39;month&#39;</span><span style="color:#eceff4">)[</span><span style="color:#a3be8c">&#39;sales&#39;</span><span style="color:#eceff4">]</span><span style="color:#5e81ac">.</span>sum<span style="color:#eceff4">()</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#4c566a;font-style:italic"># Find top performing products</span>
</span></span><span style="display:flex;"><span>    top_products <span style="color:#5e81ac">=</span> df<span style="color:#5e81ac">.</span>groupby<span style="color:#eceff4">(</span><span style="color:#a3be8c">&#39;product&#39;</span><span style="color:#eceff4">)[</span><span style="color:#a3be8c">&#39;sales&#39;</span><span style="color:#eceff4">]</span><span style="color:#5e81ac">.</span>sum<span style="color:#eceff4">()</span><span style="color:#5e81ac">.</span>sort_values<span style="color:#eceff4">(</span>ascending<span style="color:#5e81ac">=</span><span style="color:#d08770;font-weight:bold">False</span><span style="color:#eceff4">)</span><span style="color:#5e81ac">.</span>head<span style="color:#eceff4">(</span><span style="color:#b48ead">5</span><span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">return</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a3be8c">&#39;total_revenue&#39;</span><span style="color:#eceff4">:</span> df<span style="color:#eceff4">[</span><span style="color:#a3be8c">&#39;sales&#39;</span><span style="color:#eceff4">]</span><span style="color:#5e81ac">.</span>sum<span style="color:#eceff4">(),</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a3be8c">&#39;average_monthly&#39;</span><span style="color:#eceff4">:</span> monthly_sales<span style="color:#5e81ac">.</span>mean<span style="color:#eceff4">(),</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a3be8c">&#39;top_products&#39;</span><span style="color:#eceff4">:</span> top_products<span style="color:#5e81ac">.</span>to_dict<span style="color:#eceff4">()</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Usage example</span>
</span></span><span style="display:flex;"><span>results <span style="color:#5e81ac">=</span> analyze_sales_data<span style="color:#eceff4">(</span><span style="color:#a3be8c">&#39;sales_2024.csv&#39;</span><span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">print</span><span style="color:#eceff4">(</span><span style="color:#a3be8c">f</span><span style="color:#a3be8c">&#34;Total revenue: $</span><span style="color:#a3be8c">{</span>results<span style="color:#eceff4">[</span><span style="color:#a3be8c">&#39;total_revenue&#39;</span><span style="color:#eceff4">]</span><span style="color:#a3be8c">:</span><span style="color:#a3be8c">,.2f</span><span style="color:#a3be8c">}</span><span style="color:#a3be8c">&#34;</span><span style="color:#eceff4">)</span></span></span></code></pre></div>
</div>
</div>
</div>
<div id="outline-container-headline-3" class="outline-2">
<h2 id="headline-3">
JavaScript: Modern Web Development&#xa0;&#xa0;&#xa0;<span class="tags"><span class="tag-javascript">javascript</span>&#xa0;<span class="tag-web">web</span>&#xa0;<span class="tag-frontend">frontend</span></span>
</h2>
<div id="outline-text-headline-3" class="outline-text-2">
<p>
JavaScript showcases modern ES6+ features and asynchronous programming:</p>
<div class="src src-javascript">
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic">// Fetch and process user data with modern async/await
</span></span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">class</span> UserManager <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    constructor<span style="color:#eceff4">(</span>apiUrl<span style="color:#eceff4">)</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">this</span><span style="color:#eceff4">.</span>apiUrl <span style="color:#5e81ac">=</span> apiUrl<span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">this</span><span style="color:#eceff4">.</span>cache <span style="color:#5e81ac">=</span> <span style="color:#d08770;font-weight:bold">new</span> Map<span style="color:#eceff4">();</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">async</span> fetchUser<span style="color:#eceff4">(</span>userId<span style="color:#eceff4">)</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">if</span> <span style="color:#eceff4">(</span><span style="color:#d08770;font-weight:bold">this</span><span style="color:#eceff4">.</span>cache<span style="color:#eceff4">.</span>has<span style="color:#eceff4">(</span>userId<span style="color:#eceff4">))</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">return</span> <span style="color:#d08770;font-weight:bold">this</span><span style="color:#eceff4">.</span>cache<span style="color:#eceff4">.</span>get<span style="color:#eceff4">(</span>userId<span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">try</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">const</span> response <span style="color:#5e81ac">=</span> <span style="color:#d08770;font-weight:bold">await</span> fetch<span style="color:#eceff4">(</span><span style="color:#a3be8c">`</span><span style="color:#a3be8c">${</span><span style="color:#d08770;font-weight:bold">this</span><span style="color:#eceff4">.</span>apiUrl<span style="color:#a3be8c">}</span><span style="color:#a3be8c">/users/</span><span style="color:#a3be8c">${</span>userId<span style="color:#a3be8c">}</span><span style="color:#a3be8c">`</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">if</span> <span style="color:#eceff4">(</span><span style="color:#5e81ac">!</span>response<span style="color:#eceff4">.</span>ok<span style="color:#eceff4">)</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>                <span style="color:#d08770;font-weight:bold">throw</span> <span style="color:#d08770;font-weight:bold">new</span> <span style="color:#5e81ac">Error</span><span style="color:#eceff4">(</span><span style="color:#a3be8c">`HTTP error! status: </span><span style="color:#a3be8c">${</span>response<span style="color:#eceff4">.</span>status<span style="color:#a3be8c">}</span><span style="color:#a3be8c">`</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">const</span> user <span style="color:#5e81ac">=</span> <span style="color:#d08770;font-weight:bold">await</span> response<span style="color:#eceff4">.</span>json<span style="color:#eceff4">();</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">this</span><span style="color:#eceff4">.</span>cache<span style="color:#eceff4">.</span>set<span style="color:#eceff4">(</span>userId<span style="color:#eceff4">,</span> user<span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">return</span> user<span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span> <span style="color:#d08770;font-weight:bold">catch</span> <span style="color:#eceff4">(</span>error<span style="color:#eceff4">)</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            console<span style="color:#eceff4">.</span>error<span style="color:#eceff4">(</span><span style="color:#a3be8c">&#39;Failed to fetch user:&#39;</span><span style="color:#eceff4">,</span> error<span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">return</span> <span style="color:#d08770;font-weight:bold">null</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#4c566a;font-style:italic">// Arrow function with destructuring
</span></span></span><span style="display:flex;"><span>    formatUserDisplay <span style="color:#5e81ac">=</span> <span style="color:#eceff4">({</span> name<span style="color:#eceff4">,</span> email<span style="color:#eceff4">,</span> role <span style="color:#5e81ac">=</span> <span style="color:#a3be8c">&#39;user&#39;</span> <span style="color:#eceff4">})</span> <span style="color:#eceff4">=&gt;</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">return</span> <span style="color:#a3be8c">`</span><span style="color:#a3be8c">${</span>name<span style="color:#a3be8c">}</span><span style="color:#a3be8c"> (</span><span style="color:#a3be8c">${</span>email<span style="color:#a3be8c">}</span><span style="color:#a3be8c">) - </span><span style="color:#a3be8c">${</span>role<span style="color:#eceff4">.</span>toUpperCase<span style="color:#eceff4">()</span><span style="color:#a3be8c">}</span><span style="color:#a3be8c">`</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">};</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic">// Usage with template literals
</span></span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">const</span> userManager <span style="color:#5e81ac">=</span> <span style="color:#d08770;font-weight:bold">new</span> UserManager<span style="color:#eceff4">(</span><span style="color:#a3be8c">&#39;https://api.example.com&#39;</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">const</span> user <span style="color:#5e81ac">=</span> <span style="color:#d08770;font-weight:bold">await</span> userManager<span style="color:#eceff4">.</span>fetchUser<span style="color:#eceff4">(</span><span style="color:#b48ead">123</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>console<span style="color:#eceff4">.</span>log<span style="color:#eceff4">(</span><span style="color:#a3be8c">`Welcome: </span><span style="color:#a3be8c">${</span>userManager<span style="color:#eceff4">.</span>formatUserDisplay<span style="color:#eceff4">(</span>user<span style="color:#eceff4">)</span><span style="color:#a3be8c">}</span><span style="color:#a3be8c">`</span><span style="color:#eceff4">);</span></span></span></code></pre></div>
</div>
</div>
</div>
<div id="outline-container-headline-4" class="outline-2">
<h2 id="headline-4">
Rust: Systems Programming with Safety&#xa0;&#xa0;&#xa0;<span class="tags"><span class="tag-rust">rust</span>&#xa0;<span class="tag-systems">systems</span>&#xa0;<span class="tag-memory">memory</span></span>
</h2>
<div id="outline-text-headline-4" class="outline-text-2">
<p>
Rust demonstrates memory safety and performance with its unique ownership system:</p>
<div class="src src-rust">
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-rust" data-lang="rust"><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">use</span> std::collections::HashMap<span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">use</span> std::fs::File<span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">use</span> std::io::<span style="color:#eceff4">{</span>BufRead<span style="color:#eceff4">,</span> BufReader<span style="color:#eceff4">,</span> <span style="color:#5e81ac">Result</span><span style="color:#eceff4">};</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac;font-style:italic">#[derive(Debug, Clone)]</span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">struct</span> <span style="color:#8fbcbb">LogEntry</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    timestamp: <span style="color:#5e81ac">String</span><span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>    level: <span style="color:#5e81ac">String</span><span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>    message: <span style="color:#5e81ac">String</span><span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">impl</span> LogEntry <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">fn</span> <span style="color:#88c0d0">new</span><span style="color:#eceff4">(</span>line: <span style="color:#d08770">&amp;</span><span style="color:#d08770">str</span><span style="color:#eceff4">)</span> -&gt; <span style="color:#5e81ac">Option</span><span style="color:#5e81ac">&lt;</span><span style="color:#5e81ac">Self</span><span style="color:#5e81ac">&gt;</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">let</span> parts: <span style="color:#5e81ac">Vec</span><span style="color:#5e81ac">&lt;&amp;</span><span style="color:#d08770">str</span><span style="color:#5e81ac">&gt;</span> <span style="color:#5e81ac">=</span> line<span style="color:#eceff4">.</span>splitn<span style="color:#eceff4">(</span><span style="color:#b48ead">3</span><span style="color:#eceff4">,</span> <span style="color:#a3be8c">&#39; &#39;</span><span style="color:#eceff4">).</span>collect<span style="color:#eceff4">();</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">if</span> parts<span style="color:#eceff4">.</span>len<span style="color:#eceff4">()</span> <span style="color:#5e81ac">==</span> <span style="color:#b48ead">3</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#5e81ac">Some</span><span style="color:#eceff4">(</span>LogEntry <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>                timestamp: <span style="color:#8fbcbb">parts</span><span style="color:#eceff4">[</span><span style="color:#b48ead">0</span><span style="color:#eceff4">].</span>to_string<span style="color:#eceff4">(),</span>
</span></span><span style="display:flex;"><span>                level: <span style="color:#8fbcbb">parts</span><span style="color:#eceff4">[</span><span style="color:#b48ead">1</span><span style="color:#eceff4">].</span>to_string<span style="color:#eceff4">(),</span>
</span></span><span style="display:flex;"><span>                message: <span style="color:#8fbcbb">parts</span><span style="color:#eceff4">[</span><span style="color:#b48ead">2</span><span style="color:#eceff4">].</span>to_string<span style="color:#eceff4">(),</span>
</span></span><span style="display:flex;"><span>            <span style="color:#eceff4">})</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span> <span style="color:#d08770;font-weight:bold">else</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#5e81ac">None</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">fn</span> <span style="color:#88c0d0">analyze_log_file</span><span style="color:#eceff4">(</span>filename: <span style="color:#d08770">&amp;</span><span style="color:#d08770">str</span><span style="color:#eceff4">)</span> -&gt; <span style="color:#5e81ac">Result</span><span style="color:#5e81ac">&lt;</span>HashMap<span style="color:#5e81ac">&lt;</span><span style="color:#5e81ac">String</span><span style="color:#eceff4">,</span> <span style="color:#d08770">usize</span><span style="color:#5e81ac">&gt;&gt;</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">let</span> file <span style="color:#5e81ac">=</span> File::open<span style="color:#eceff4">(</span>filename<span style="color:#eceff4">)</span><span style="color:#5e81ac">?</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">let</span> reader <span style="color:#5e81ac">=</span> BufReader::new<span style="color:#eceff4">(</span>file<span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">let</span> <span style="color:#d08770;font-weight:bold">mut</span> level_counts <span style="color:#5e81ac">=</span> HashMap::new<span style="color:#eceff4">();</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">for</span> line <span style="color:#d08770;font-weight:bold">in</span> reader<span style="color:#eceff4">.</span>lines<span style="color:#eceff4">()</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">let</span> line <span style="color:#5e81ac">=</span> line<span style="color:#5e81ac">?</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">if</span> <span style="color:#d08770;font-weight:bold">let</span> <span style="color:#5e81ac">Some</span><span style="color:#eceff4">(</span>entry<span style="color:#eceff4">)</span> <span style="color:#5e81ac">=</span> LogEntry::new<span style="color:#eceff4">(</span><span style="color:#5e81ac">&amp;</span>line<span style="color:#eceff4">)</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#5e81ac">*</span>level_counts<span style="color:#eceff4">.</span>entry<span style="color:#eceff4">(</span>entry<span style="color:#eceff4">.</span>level<span style="color:#eceff4">).</span>or_insert<span style="color:#eceff4">(</span><span style="color:#b48ead">0</span><span style="color:#eceff4">)</span> <span style="color:#5e81ac">+=</span> <span style="color:#b48ead">1</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">Ok</span><span style="color:#eceff4">(</span>level_counts<span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">fn</span> <span style="color:#88c0d0">main</span><span style="color:#eceff4">()</span> -&gt; <span style="color:#5e81ac">Result</span><span style="color:#5e81ac">&lt;</span><span style="color:#eceff4">()</span><span style="color:#5e81ac">&gt;</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">match</span> analyze_log_file<span style="color:#eceff4">(</span><span style="color:#a3be8c">&#34;app.log&#34;</span><span style="color:#eceff4">)</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        <span style="color:#5e81ac">Ok</span><span style="color:#eceff4">(</span>counts<span style="color:#eceff4">)</span> <span style="color:#5e81ac">=&gt;</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#88c0d0">println!</span><span style="color:#eceff4">(</span><span style="color:#a3be8c">&#34;Log level distribution:&#34;</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">for</span> <span style="color:#eceff4">(</span>level<span style="color:#eceff4">,</span> count<span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">in</span> <span style="color:#5e81ac">&amp;</span>counts <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>                <span style="color:#88c0d0">println!</span><span style="color:#eceff4">(</span><span style="color:#a3be8c">&#34;  </span><span style="color:#a3be8c">{}</span><span style="color:#a3be8c">: </span><span style="color:#a3be8c">{}</span><span style="color:#a3be8c">&#34;</span><span style="color:#eceff4">,</span> level<span style="color:#eceff4">,</span> count<span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>        <span style="color:#5e81ac">Err</span><span style="color:#eceff4">(</span>e<span style="color:#eceff4">)</span> <span style="color:#5e81ac">=&gt;</span> <span style="color:#88c0d0">eprintln!</span><span style="color:#eceff4">(</span><span style="color:#a3be8c">&#34;Error reading log file: </span><span style="color:#a3be8c">{}</span><span style="color:#a3be8c">&#34;</span><span style="color:#eceff4">,</span> e<span style="color:#eceff4">),</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">Ok</span><span style="color:#eceff4">(())</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span></span></span></code></pre></div>
</div>
</div>
</div>
<div id="outline-container-headline-5" class="outline-2">
<h2 id="headline-5">
Go: Concurrent Network Programming&#xa0;&#xa0;&#xa0;<span class="tags"><span class="tag-golang">golang</span>&#xa0;<span class="tag-concurrency">concurrency</span>&#xa0;<span class="tag-networking">networking</span></span>
</h2>
<div id="outline-text-headline-5" class="outline-text-2">
<p>
Go excels at concurrent programming with goroutines and channels:</p>
<div class="src src-go">
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-go" data-lang="go"><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">package</span> main
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">import</span> <span style="color:#eceff4">(</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a3be8c">&#34;context&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a3be8c">&#34;fmt&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a3be8c">&#34;net/http&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a3be8c">&#34;sync&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a3be8c">&#34;time&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">type</span> HealthChecker <span style="color:#d08770;font-weight:bold">struct</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    urls     <span style="color:#eceff4">[]</span><span style="color:#d08770">string</span>
</span></span><span style="display:flex;"><span>    timeout  time<span style="color:#eceff4">.</span>Duration
</span></span><span style="display:flex;"><span>    client   <span style="color:#5e81ac">*</span>http<span style="color:#eceff4">.</span>Client
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">type</span> HealthResult <span style="color:#d08770;font-weight:bold">struct</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    URL      <span style="color:#d08770">string</span>
</span></span><span style="display:flex;"><span>    Status   <span style="color:#d08770">string</span>
</span></span><span style="display:flex;"><span>    Duration time<span style="color:#eceff4">.</span>Duration
</span></span><span style="display:flex;"><span>    Error    <span style="color:#d08770">error</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">func</span> <span style="color:#88c0d0">NewHealthChecker</span><span style="color:#eceff4">(</span>urls <span style="color:#eceff4">[]</span><span style="color:#d08770">string</span><span style="color:#eceff4">,</span> timeout time<span style="color:#eceff4">.</span>Duration<span style="color:#eceff4">)</span> <span style="color:#5e81ac">*</span>HealthChecker <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">return</span> <span style="color:#5e81ac">&amp;</span>HealthChecker<span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        urls<span style="color:#eceff4">:</span>    urls<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        timeout<span style="color:#eceff4">:</span> timeout<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        client<span style="color:#eceff4">:</span> <span style="color:#5e81ac">&amp;</span>http<span style="color:#eceff4">.</span>Client<span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            Timeout<span style="color:#eceff4">:</span> timeout<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">},</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">func</span> <span style="color:#eceff4">(</span>hc <span style="color:#5e81ac">*</span>HealthChecker<span style="color:#eceff4">)</span> <span style="color:#88c0d0">checkURL</span><span style="color:#eceff4">(</span>ctx context<span style="color:#eceff4">.</span>Context<span style="color:#eceff4">,</span> url <span style="color:#d08770">string</span><span style="color:#eceff4">)</span> HealthResult <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    start <span style="color:#5e81ac">:=</span> time<span style="color:#eceff4">.</span><span style="color:#88c0d0">Now</span><span style="color:#eceff4">()</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    req<span style="color:#eceff4">,</span> err <span style="color:#5e81ac">:=</span> http<span style="color:#eceff4">.</span><span style="color:#88c0d0">NewRequestWithContext</span><span style="color:#eceff4">(</span>ctx<span style="color:#eceff4">,</span> <span style="color:#a3be8c">&#34;GET&#34;</span><span style="color:#eceff4">,</span> url<span style="color:#eceff4">,</span> <span style="color:#d08770;font-weight:bold">nil</span><span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">if</span> err <span style="color:#5e81ac">!=</span> <span style="color:#d08770;font-weight:bold">nil</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">return</span> HealthResult<span style="color:#eceff4">{</span>URL<span style="color:#eceff4">:</span> url<span style="color:#eceff4">,</span> Status<span style="color:#eceff4">:</span> <span style="color:#a3be8c">&#34;ERROR&#34;</span><span style="color:#eceff4">,</span> Error<span style="color:#eceff4">:</span> err<span style="color:#eceff4">,</span> Duration<span style="color:#eceff4">:</span> time<span style="color:#eceff4">.</span><span style="color:#88c0d0">Since</span><span style="color:#eceff4">(</span>start<span style="color:#eceff4">)}</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    resp<span style="color:#eceff4">,</span> err <span style="color:#5e81ac">:=</span> hc<span style="color:#eceff4">.</span>client<span style="color:#eceff4">.</span><span style="color:#88c0d0">Do</span><span style="color:#eceff4">(</span>req<span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">if</span> err <span style="color:#5e81ac">!=</span> <span style="color:#d08770;font-weight:bold">nil</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">return</span> HealthResult<span style="color:#eceff4">{</span>URL<span style="color:#eceff4">:</span> url<span style="color:#eceff4">,</span> Status<span style="color:#eceff4">:</span> <span style="color:#a3be8c">&#34;DOWN&#34;</span><span style="color:#eceff4">,</span> Error<span style="color:#eceff4">:</span> err<span style="color:#eceff4">,</span> Duration<span style="color:#eceff4">:</span> time<span style="color:#eceff4">.</span><span style="color:#88c0d0">Since</span><span style="color:#eceff4">(</span>start<span style="color:#eceff4">)}</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">defer</span> resp<span style="color:#eceff4">.</span>Body<span style="color:#eceff4">.</span><span style="color:#88c0d0">Close</span><span style="color:#eceff4">()</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    status <span style="color:#5e81ac">:=</span> <span style="color:#a3be8c">&#34;UP&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">if</span> resp<span style="color:#eceff4">.</span>StatusCode <span style="color:#5e81ac">&gt;=</span> <span style="color:#b48ead">400</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        status <span style="color:#eceff4">=</span> <span style="color:#a3be8c">&#34;DOWN&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">return</span> HealthResult<span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        URL<span style="color:#eceff4">:</span>      url<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        Status<span style="color:#eceff4">:</span>   status<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        Duration<span style="color:#eceff4">:</span> time<span style="color:#eceff4">.</span><span style="color:#88c0d0">Since</span><span style="color:#eceff4">(</span>start<span style="color:#eceff4">),</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">func</span> <span style="color:#eceff4">(</span>hc <span style="color:#5e81ac">*</span>HealthChecker<span style="color:#eceff4">)</span> <span style="color:#88c0d0">CheckAll</span><span style="color:#eceff4">(</span>ctx context<span style="color:#eceff4">.</span>Context<span style="color:#eceff4">)</span> <span style="color:#eceff4">[]</span>HealthResult <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    results <span style="color:#5e81ac">:=</span> <span style="color:#5e81ac">make</span><span style="color:#eceff4">([]</span>HealthResult<span style="color:#eceff4">,</span> <span style="color:#5e81ac">len</span><span style="color:#eceff4">(</span>hc<span style="color:#eceff4">.</span>urls<span style="color:#eceff4">))</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">var</span> wg sync<span style="color:#eceff4">.</span>WaitGroup
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">for</span> i<span style="color:#eceff4">,</span> url <span style="color:#5e81ac">:=</span> <span style="color:#d08770;font-weight:bold">range</span> hc<span style="color:#eceff4">.</span>urls <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        wg<span style="color:#eceff4">.</span><span style="color:#88c0d0">Add</span><span style="color:#eceff4">(</span><span style="color:#b48ead">1</span><span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">go</span> <span style="color:#d08770;font-weight:bold">func</span><span style="color:#eceff4">(</span>index <span style="color:#d08770">int</span><span style="color:#eceff4">,</span> u <span style="color:#d08770">string</span><span style="color:#eceff4">)</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">defer</span> wg<span style="color:#eceff4">.</span><span style="color:#88c0d0">Done</span><span style="color:#eceff4">()</span>
</span></span><span style="display:flex;"><span>            results<span style="color:#eceff4">[</span>index<span style="color:#eceff4">]</span> <span style="color:#eceff4">=</span> hc<span style="color:#eceff4">.</span><span style="color:#88c0d0">checkURL</span><span style="color:#eceff4">(</span>ctx<span style="color:#eceff4">,</span> u<span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}(</span>i<span style="color:#eceff4">,</span> url<span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    wg<span style="color:#eceff4">.</span><span style="color:#88c0d0">Wait</span><span style="color:#eceff4">()</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">return</span> results
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">func</span> <span style="color:#88c0d0">main</span><span style="color:#eceff4">()</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    urls <span style="color:#5e81ac">:=</span> <span style="color:#eceff4">[]</span><span style="color:#d08770">string</span><span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a3be8c">&#34;https://google.com&#34;</span><span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a3be8c">&#34;https://github.com&#34;</span><span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a3be8c">&#34;https://stackoverflow.com&#34;</span><span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    checker <span style="color:#5e81ac">:=</span> <span style="color:#88c0d0">NewHealthChecker</span><span style="color:#eceff4">(</span>urls<span style="color:#eceff4">,</span> <span style="color:#b48ead">5</span><span style="color:#5e81ac">*</span>time<span style="color:#eceff4">.</span>Second<span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>    ctx<span style="color:#eceff4">,</span> cancel <span style="color:#5e81ac">:=</span> context<span style="color:#eceff4">.</span><span style="color:#88c0d0">WithTimeout</span><span style="color:#eceff4">(</span>context<span style="color:#eceff4">.</span><span style="color:#88c0d0">Background</span><span style="color:#eceff4">(),</span> <span style="color:#b48ead">10</span><span style="color:#5e81ac">*</span>time<span style="color:#eceff4">.</span>Second<span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">defer</span> <span style="color:#88c0d0">cancel</span><span style="color:#eceff4">()</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    results <span style="color:#5e81ac">:=</span> checker<span style="color:#eceff4">.</span><span style="color:#88c0d0">CheckAll</span><span style="color:#eceff4">(</span>ctx<span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    fmt<span style="color:#eceff4">.</span><span style="color:#88c0d0">Println</span><span style="color:#eceff4">(</span><span style="color:#a3be8c">&#34;Health Check Results:&#34;</span><span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">for</span> _<span style="color:#eceff4">,</span> result <span style="color:#5e81ac">:=</span> <span style="color:#d08770;font-weight:bold">range</span> results <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>        fmt<span style="color:#eceff4">.</span><span style="color:#88c0d0">Printf</span><span style="color:#eceff4">(</span><span style="color:#a3be8c">&#34;%-25s %-6s %v\n&#34;</span><span style="color:#eceff4">,</span> result<span style="color:#eceff4">.</span>URL<span style="color:#eceff4">,</span> result<span style="color:#eceff4">.</span>Status<span style="color:#eceff4">,</span> result<span style="color:#eceff4">.</span>Duration<span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">if</span> result<span style="color:#eceff4">.</span>Error <span style="color:#5e81ac">!=</span> <span style="color:#d08770;font-weight:bold">nil</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            fmt<span style="color:#eceff4">.</span><span style="color:#88c0d0">Printf</span><span style="color:#eceff4">(</span><span style="color:#a3be8c">&#34;  Error: %v\n&#34;</span><span style="color:#eceff4">,</span> result<span style="color:#eceff4">.</span>Error<span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span></span></span></code></pre></div>
</div>
</div>
</div>
<div id="outline-container-headline-6" class="outline-2">
<h2 id="headline-6">
SQL: Database Queries and Analytics&#xa0;&#xa0;&#xa0;<span class="tags"><span class="tag-sql">sql</span>&#xa0;<span class="tag-database">database</span>&#xa0;<span class="tag-analytics">analytics</span></span>
</h2>
<div id="outline-text-headline-6" class="outline-text-2">
<p>
SQL demonstrates complex data querying and analysis capabilities:</p>
<div class="src src-sql">
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-sql" data-lang="sql"><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic">-- Complex analytics query showcasing various SQL features
</span></span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">WITH</span> monthly_metrics <span style="color:#d08770;font-weight:bold">AS</span> <span style="color:#eceff4">(</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">SELECT</span>
</span></span><span style="display:flex;"><span>        DATE_TRUNC<span style="color:#eceff4">(</span><span style="color:#a3be8c">&#39;month&#39;</span><span style="color:#eceff4">,</span> order_date<span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> <span style="color:#d08770;font-weight:bold">month</span><span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        customer_id<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">COUNT</span><span style="color:#eceff4">(</span><span style="color:#5e81ac">*</span><span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> order_count<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">SUM</span><span style="color:#eceff4">(</span>total_amount<span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> monthly_spend<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">AVG</span><span style="color:#eceff4">(</span>total_amount<span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> avg_order_value
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">FROM</span> orders
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">WHERE</span> order_date <span style="color:#5e81ac">&gt;=</span> <span style="color:#d08770;font-weight:bold">CURRENT_DATE</span> <span style="color:#5e81ac">-</span> <span style="color:#5e81ac">INTERVAL</span> <span style="color:#a3be8c">&#39;12 months&#39;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">GROUP</span> <span style="color:#d08770;font-weight:bold">BY</span> DATE_TRUNC<span style="color:#eceff4">(</span><span style="color:#a3be8c">&#39;month&#39;</span><span style="color:#eceff4">,</span> order_date<span style="color:#eceff4">),</span> customer_id
</span></span><span style="display:flex;"><span><span style="color:#eceff4">),</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>customer_segments <span style="color:#d08770;font-weight:bold">AS</span> <span style="color:#eceff4">(</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">SELECT</span>
</span></span><span style="display:flex;"><span>        customer_id<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">CASE</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">WHEN</span> <span style="color:#d08770;font-weight:bold">SUM</span><span style="color:#eceff4">(</span>monthly_spend<span style="color:#eceff4">)</span> <span style="color:#5e81ac">&gt;=</span> <span style="color:#b48ead">5000</span> <span style="color:#d08770;font-weight:bold">THEN</span> <span style="color:#a3be8c">&#39;VIP&#39;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">WHEN</span> <span style="color:#d08770;font-weight:bold">SUM</span><span style="color:#eceff4">(</span>monthly_spend<span style="color:#eceff4">)</span> <span style="color:#5e81ac">&gt;=</span> <span style="color:#b48ead">1000</span> <span style="color:#d08770;font-weight:bold">THEN</span> <span style="color:#a3be8c">&#39;Premium&#39;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">WHEN</span> <span style="color:#d08770;font-weight:bold">SUM</span><span style="color:#eceff4">(</span>monthly_spend<span style="color:#eceff4">)</span> <span style="color:#5e81ac">&gt;=</span> <span style="color:#b48ead">500</span> <span style="color:#d08770;font-weight:bold">THEN</span> <span style="color:#a3be8c">&#39;Regular&#39;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">ELSE</span> <span style="color:#a3be8c">&#39;Basic&#39;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">END</span> <span style="color:#d08770;font-weight:bold">as</span> segment<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">COUNT</span><span style="color:#eceff4">(</span><span style="color:#d08770;font-weight:bold">DISTINCT</span> <span style="color:#d08770;font-weight:bold">month</span><span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> active_months<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">SUM</span><span style="color:#eceff4">(</span>monthly_spend<span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> total_spend<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">AVG</span><span style="color:#eceff4">(</span>avg_order_value<span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> lifetime_avg_order
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">FROM</span> monthly_metrics
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">GROUP</span> <span style="color:#d08770;font-weight:bold">BY</span> customer_id
</span></span><span style="display:flex;"><span><span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">SELECT</span>
</span></span><span style="display:flex;"><span>    cs<span style="color:#eceff4">.</span>segment<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">COUNT</span><span style="color:#eceff4">(</span><span style="color:#5e81ac">*</span><span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> customer_count<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>    ROUND<span style="color:#eceff4">(</span><span style="color:#d08770;font-weight:bold">AVG</span><span style="color:#eceff4">(</span>cs<span style="color:#eceff4">.</span>total_spend<span style="color:#eceff4">),</span> <span style="color:#b48ead">2</span><span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> avg_annual_spend<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>    ROUND<span style="color:#eceff4">(</span><span style="color:#d08770;font-weight:bold">AVG</span><span style="color:#eceff4">(</span>cs<span style="color:#eceff4">.</span>lifetime_avg_order<span style="color:#eceff4">),</span> <span style="color:#b48ead">2</span><span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> avg_order_value<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>    ROUND<span style="color:#eceff4">(</span><span style="color:#d08770;font-weight:bold">AVG</span><span style="color:#eceff4">(</span>cs<span style="color:#eceff4">.</span>active_months<span style="color:#eceff4">),</span> <span style="color:#b48ead">1</span><span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> avg_active_months<span style="color:#eceff4">,</span>
</span></span><span style="display:flex;"><span>    <span style="color:#4c566a;font-style:italic">-- Calculate retention rate
</span></span></span><span style="display:flex;"><span>    ROUND<span style="color:#eceff4">(</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">COUNT</span><span style="color:#eceff4">(</span><span style="color:#d08770;font-weight:bold">CASE</span> <span style="color:#d08770;font-weight:bold">WHEN</span> cs<span style="color:#eceff4">.</span>active_months <span style="color:#5e81ac">&gt;=</span> <span style="color:#b48ead">6</span> <span style="color:#d08770;font-weight:bold">THEN</span> <span style="color:#b48ead">1</span> <span style="color:#d08770;font-weight:bold">END</span><span style="color:#eceff4">)</span> <span style="color:#5e81ac">*</span> <span style="color:#b48ead">100</span><span style="color:#eceff4">.</span><span style="color:#b48ead">0</span> <span style="color:#5e81ac">/</span> <span style="color:#d08770;font-weight:bold">COUNT</span><span style="color:#eceff4">(</span><span style="color:#5e81ac">*</span><span style="color:#eceff4">),</span>
</span></span><span style="display:flex;"><span>        <span style="color:#b48ead">1</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">)</span> <span style="color:#d08770;font-weight:bold">as</span> retention_rate_6m
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">FROM</span> customer_segments cs
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">JOIN</span> customers <span style="color:#d08770;font-weight:bold">c</span> <span style="color:#d08770;font-weight:bold">ON</span> cs<span style="color:#eceff4">.</span>customer_id <span style="color:#5e81ac">=</span> <span style="color:#d08770;font-weight:bold">c</span><span style="color:#eceff4">.</span>id
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">GROUP</span> <span style="color:#d08770;font-weight:bold">BY</span> cs<span style="color:#eceff4">.</span>segment
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">ORDER</span> <span style="color:#d08770;font-weight:bold">BY</span> avg_annual_spend <span style="color:#d08770;font-weight:bold">DESC</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic">-- Create an index for performance
</span></span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">CREATE</span> <span style="color:#d08770;font-weight:bold">INDEX</span> CONCURRENTLY idx_orders_customer_date
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">ON</span> orders <span style="color:#eceff4">(</span>customer_id<span style="color:#eceff4">,</span> order_date <span style="color:#d08770;font-weight:bold">DESC</span><span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">WHERE</span> order_date <span style="color:#5e81ac">&gt;=</span> <span style="color:#d08770;font-weight:bold">CURRENT_DATE</span> <span style="color:#5e81ac">-</span> <span style="color:#5e81ac">INTERVAL</span> <span style="color:#a3be8c">&#39;12 months&#39;</span><span style="color:#eceff4">;</span></span></span></code></pre></div>
</div>
</div>
</div>
<div id="outline-container-headline-7" class="outline-2">
<h2 id="headline-7">
HTML/CSS: Modern Web Styling&#xa0;&#xa0;&#xa0;<span class="tags"><span class="tag-html">html</span>&#xa0;<span class="tag-css">css</span>&#xa0;<span class="tag-web">web</span>&#xa0;<span class="tag-responsive">responsive</span></span>
</h2>
<div id="outline-text-headline-7" class="outline-text-2">
<p>
HTML and CSS showcase modern web development with responsive design:</p>
<div class="src src-html">
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-html" data-lang="html"><span style="display:flex;"><span><span style="color:#5e81ac;font-style:italic">&lt;!DOCTYPE html&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">html</span> <span style="color:#8fbcbb">lang</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;en&#34;</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">head</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">meta</span> <span style="color:#8fbcbb">charset</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;UTF-8&#34;</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">meta</span> <span style="color:#8fbcbb">name</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;viewport&#34;</span> <span style="color:#8fbcbb">content</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;width=device-width, initial-scale=1.0&#34;</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">title</span><span style="color:#eceff4">&gt;</span>Modern Card Component<span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">title</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">style</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">:</span><span style="color:#d08770">root</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            --primary-color<span style="color:#eceff4">:</span> <span style="color:#b48ead">#6366f1</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            --secondary-color<span style="color:#eceff4">:</span> <span style="color:#b48ead">#8b5cf6</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            --text-dark<span style="color:#eceff4">:</span> <span style="color:#b48ead">#1f2937</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            --text-light<span style="color:#eceff4">:</span> <span style="color:#b48ead">#6b7280</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            --border-radius<span style="color:#eceff4">:</span> <span style="color:#b48ead">12</span><span style="color:#d08770">px</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            --shadow<span style="color:#eceff4">:</span> <span style="color:#b48ead">0</span> <span style="color:#b48ead">10</span><span style="color:#d08770">px</span> <span style="color:#b48ead">25</span><span style="color:#d08770">px</span> <span style="color:#5e81ac">rgba</span><span style="color:#eceff4">(</span><span style="color:#b48ead">0</span><span style="color:#eceff4">,</span> <span style="color:#b48ead">0</span><span style="color:#eceff4">,</span> <span style="color:#b48ead">0</span><span style="color:#eceff4">,</span> <span style="color:#b48ead">0.1</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">.</span><span style="color:#8fbcbb">card-container</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">display</span><span style="color:#eceff4">:</span> <span style="color:#d08770;font-weight:bold">grid</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">grid-template-columns</span><span style="color:#eceff4">:</span> <span style="color:#88c0d0">repeat</span><span style="color:#eceff4">(</span><span style="color:#d08770;font-weight:bold">auto</span><span style="color:#5e81ac">-</span>fit<span style="color:#eceff4">,</span> <span style="color:#88c0d0">minmax</span><span style="color:#eceff4">(</span><span style="color:#b48ead">300</span><span style="color:#d08770">px</span><span style="color:#eceff4">,</span> <span style="color:#b48ead">1</span>fr<span style="color:#eceff4">));</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">gap</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">2</span><span style="color:#d08770">rem</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">padding</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">2</span><span style="color:#d08770">rem</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">font-family</span><span style="color:#eceff4">:</span> <span style="color:#a3be8c">&#39;Inter&#39;</span><span style="color:#eceff4">,</span> system-ui<span style="color:#eceff4">,</span> <span style="color:#d08770;font-weight:bold">sans-serif</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">.</span><span style="color:#8fbcbb">card</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">background</span><span style="color:#eceff4">:</span> <span style="color:#5e81ac">linear-gradient</span><span style="color:#eceff4">(</span><span style="color:#b48ead">135</span><span style="color:#d08770">deg</span><span style="color:#eceff4">,</span> <span style="color:#d08770;font-weight:bold">white</span> <span style="color:#b48ead">0</span><span style="color:#d08770">%</span><span style="color:#eceff4">,</span> <span style="color:#b48ead">#f8fafc</span> <span style="color:#b48ead">100</span><span style="color:#d08770">%</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">border-radius</span><span style="color:#eceff4">:</span> <span style="color:#88c0d0">var</span><span style="color:#eceff4">(</span><span style="color:#5e81ac">--</span>border<span style="color:#5e81ac">-</span>radius<span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">box-shadow</span><span style="color:#eceff4">:</span> <span style="color:#88c0d0">var</span><span style="color:#eceff4">(</span><span style="color:#5e81ac">--</span>shadow<span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">overflow</span><span style="color:#eceff4">:</span> <span style="color:#d08770;font-weight:bold">hidden</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">transition</span><span style="color:#eceff4">:</span> <span style="color:#d08770;font-weight:bold">transform</span> <span style="color:#b48ead">0.3</span><span style="color:#d08770">s</span> <span style="color:#d08770;font-weight:bold">ease</span><span style="color:#eceff4">,</span> <span style="color:#d08770;font-weight:bold">box-shadow</span> <span style="color:#b48ead">0.3</span><span style="color:#d08770">s</span> <span style="color:#d08770;font-weight:bold">ease</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">position</span><span style="color:#eceff4">:</span> <span style="color:#d08770;font-weight:bold">relative</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">.</span><span style="color:#8fbcbb">card</span><span style="color:#eceff4">:</span><span style="color:#d08770">hover</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">transform</span><span style="color:#eceff4">:</span> <span style="color:#5e81ac">translateY</span><span style="color:#eceff4">(</span><span style="color:#b48ead">-8</span><span style="color:#d08770">px</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">box-shadow</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">0</span> <span style="color:#b48ead">20</span><span style="color:#d08770">px</span> <span style="color:#b48ead">40</span><span style="color:#d08770">px</span> <span style="color:#5e81ac">rgba</span><span style="color:#eceff4">(</span><span style="color:#b48ead">0</span><span style="color:#eceff4">,</span> <span style="color:#b48ead">0</span><span style="color:#eceff4">,</span> <span style="color:#b48ead">0</span><span style="color:#eceff4">,</span> <span style="color:#b48ead">0.15</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">.</span><span style="color:#8fbcbb">card</span><span style="color:#eceff4">::</span><span style="color:#d08770">before</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">content</span><span style="color:#eceff4">:</span> <span style="color:#a3be8c">&#39;&#39;</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">position</span><span style="color:#eceff4">:</span> <span style="color:#d08770;font-weight:bold">absolute</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">top</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">0</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">left</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">0</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">right</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">0</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">height</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">4</span><span style="color:#d08770">px</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">background</span><span style="color:#eceff4">:</span> <span style="color:#5e81ac">linear-gradient</span><span style="color:#eceff4">(</span><span style="color:#b48ead">90</span><span style="color:#d08770">deg</span><span style="color:#eceff4">,</span> <span style="color:#88c0d0">var</span><span style="color:#eceff4">(</span><span style="color:#5e81ac">--</span>primary<span style="color:#5e81ac">-</span><span style="color:#d08770;font-weight:bold">color</span><span style="color:#eceff4">),</span> <span style="color:#88c0d0">var</span><span style="color:#eceff4">(</span><span style="color:#5e81ac">--</span>secondary<span style="color:#5e81ac">-</span><span style="color:#d08770;font-weight:bold">color</span><span style="color:#eceff4">));</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">.</span><span style="color:#8fbcbb">card-content</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">padding</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">1.5</span><span style="color:#d08770">rem</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">.</span><span style="color:#8fbcbb">card-title</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">font-size</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">1.25</span><span style="color:#d08770">rem</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">font-weight</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">600</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">color</span><span style="color:#eceff4">:</span> <span style="color:#88c0d0">var</span><span style="color:#eceff4">(</span><span style="color:#5e81ac">--</span><span style="color:#d08770;font-weight:bold">text</span><span style="color:#5e81ac">-</span>dark<span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">margin-bottom</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">0.5</span><span style="color:#d08770">rem</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">.</span><span style="color:#8fbcbb">card-description</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">color</span><span style="color:#eceff4">:</span> <span style="color:#88c0d0">var</span><span style="color:#eceff4">(</span><span style="color:#5e81ac">--</span><span style="color:#d08770;font-weight:bold">text</span><span style="color:#5e81ac">-</span>light<span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">line-height</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">1.6</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">margin-bottom</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">1</span><span style="color:#d08770">rem</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">.</span><span style="color:#8fbcbb">card-actions</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">display</span><span style="color:#eceff4">:</span> <span style="color:#d08770;font-weight:bold">flex</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">gap</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">0.75</span><span style="color:#d08770">rem</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">.</span><span style="color:#8fbcbb">btn</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">padding</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">0.5</span><span style="color:#d08770">rem</span> <span style="color:#b48ead">1</span><span style="color:#d08770">rem</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">border-radius</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">6</span><span style="color:#d08770">px</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">font-weight</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">500</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">text-decoration</span><span style="color:#eceff4">:</span> <span style="color:#d08770;font-weight:bold">none</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">transition</span><span style="color:#eceff4">:</span> <span style="color:#d08770;font-weight:bold">all</span> <span style="color:#b48ead">0.2</span><span style="color:#d08770">s</span> <span style="color:#d08770;font-weight:bold">ease</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">cursor</span><span style="color:#eceff4">:</span> <span style="color:#d08770;font-weight:bold">pointer</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">.</span><span style="color:#8fbcbb">btn-primary</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">background</span><span style="color:#eceff4">:</span> <span style="color:#88c0d0">var</span><span style="color:#eceff4">(</span><span style="color:#5e81ac">--</span>primary<span style="color:#5e81ac">-</span><span style="color:#d08770;font-weight:bold">color</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">color</span><span style="color:#eceff4">:</span> <span style="color:#d08770;font-weight:bold">white</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">.</span><span style="color:#8fbcbb">btn-primary</span><span style="color:#eceff4">:</span><span style="color:#d08770">hover</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">background</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">#4f46e5</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">transform</span><span style="color:#eceff4">:</span> <span style="color:#5e81ac">translateY</span><span style="color:#eceff4">(</span><span style="color:#b48ead">-1</span><span style="color:#d08770">px</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">@</span><span style="color:#d08770;font-weight:bold">media</span> <span style="color:#5e81ac">(</span><span style="color:#5e81ac">max-width</span><span style="color:#5e81ac">:</span> <span style="color:#5e81ac">768px</span><span style="color:#5e81ac">)</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>            <span style="color:#eceff4">.</span><span style="color:#8fbcbb">card-container</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>                <span style="color:#d08770;font-weight:bold">grid-template-columns</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">1</span>fr<span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>                <span style="color:#d08770;font-weight:bold">padding</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">1</span><span style="color:#d08770">rem</span><span style="color:#eceff4">;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">style</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">head</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">body</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">div</span> <span style="color:#8fbcbb">class</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;card-container&#34;</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">article</span> <span style="color:#8fbcbb">class</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;card&#34;</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">div</span> <span style="color:#8fbcbb">class</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;card-content&#34;</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>                <span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">h2</span> <span style="color:#8fbcbb">class</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;card-title&#34;</span><span style="color:#eceff4">&gt;</span>Modern Web Development<span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">h2</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>                <span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">p</span> <span style="color:#8fbcbb">class</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;card-description&#34;</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>                    Explore the latest trends in web development with modern CSS Grid,
</span></span><span style="display:flex;"><span>                    Flexbox, and responsive design principles.
</span></span><span style="display:flex;"><span>                <span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">p</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>                <span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">div</span> <span style="color:#8fbcbb">class</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;card-actions&#34;</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>                    <span style="color:#eceff4">&lt;</span><span style="color:#5e81ac">a</span> <span style="color:#8fbcbb">href</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;#&#34;</span> <span style="color:#8fbcbb">class</span><span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;btn btn-primary&#34;</span><span style="color:#eceff4">&gt;</span>Learn More<span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">a</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>                <span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">div</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">div</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">article</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">div</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">body</span><span style="color:#eceff4">&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">&lt;/</span><span style="color:#5e81ac">html</span><span style="color:#eceff4">&gt;</span></span></span></code></pre></div>
</div>
</div>
</div>
<div id="outline-container-headline-8" class="outline-2">
<h2 id="headline-8">
Shell Scripting: System Administration&#xa0;&#xa0;&#xa0;<span class="tags"><span class="tag-bash">bash</span>&#xa0;<span class="tag-shell">shell</span>&#xa0;<span class="tag-sysadmin">sysadmin</span>&#xa0;<span class="tag-automation">automation</span></span>
</h2>
<div id="outline-text-headline-8" class="outline-text-2">
<p>
Bash scripting for system administration and automation:</p>
<div class="src src-bash">
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#5e81ac;font-style:italic">#!/bin/bash
</span></span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Advanced backup script with logging and error handling</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">set</span> -euo pipefail  <span style="color:#4c566a;font-style:italic"># Exit on error, undefined vars, pipe failures</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Configuration</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">readonly</span> SCRIPT_NAME<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>0<span style="color:#eceff4">##*/</span><span style="color:#a3be8c">}</span><span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">readonly</span> BACKUP_DIR<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;/backup&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">readonly</span> LOG_FILE<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;/var/log/backup.log&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">readonly</span> MAX_BACKUPS<span style="color:#5e81ac">=</span><span style="color:#b48ead">7</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">readonly</span> TIMESTAMP<span style="color:#5e81ac">=</span><span style="color:#d08770;font-weight:bold">$(</span>date +<span style="color:#a3be8c">&#34;%Y%m%d_%H%M%S&#34;</span><span style="color:#d08770;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Color codes for output</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">readonly</span> RED<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#39;\033[0;31m&#39;</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">readonly</span> GREEN<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#39;\033[0;32m&#39;</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">readonly</span> YELLOW<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#39;\033[1;33m&#39;</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">readonly</span> NC<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#39;\033[0m&#39;</span> <span style="color:#4c566a;font-style:italic"># No Color</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Logging function</span>
</span></span><span style="display:flex;"><span>log<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> level<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span>$1<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">shift</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> message<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span>$*<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> timestamp<span style="color:#5e81ac">=</span><span style="color:#d08770;font-weight:bold">$(</span>date <span style="color:#a3be8c">&#39;+%Y-%m-%d %H:%M:%S&#39;</span><span style="color:#d08770;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">echo</span> -e <span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>timestamp<span style="color:#a3be8c">}</span><span style="color:#a3be8c"> [</span><span style="color:#a3be8c">${</span>level<span style="color:#a3be8c">}</span><span style="color:#a3be8c">] </span><span style="color:#a3be8c">${</span>message<span style="color:#a3be8c">}</span><span style="color:#a3be8c">&#34;</span> <span style="color:#eceff4">|</span> tee -a <span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>LOG_FILE<span style="color:#a3be8c">}</span><span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>log_info<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span> log <span style="color:#a3be8c">&#34;INFO&#34;</span> <span style="color:#a3be8c">&#34;</span>$@<span style="color:#a3be8c">&#34;</span><span style="color:#eceff4">;</span> <span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>log_warn<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span> log <span style="color:#a3be8c">&#34;WARN&#34;</span> <span style="color:#a3be8c">&#34;</span>$@<span style="color:#a3be8c">&#34;</span><span style="color:#eceff4">;</span> <span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>log_error<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span> log <span style="color:#a3be8c">&#34;ERROR&#34;</span> <span style="color:#a3be8c">&#34;</span>$@<span style="color:#a3be8c">&#34;</span><span style="color:#eceff4">;</span> <span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Error handling</span>
</span></span><span style="display:flex;"><span>cleanup<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> exit_code<span style="color:#5e81ac">=</span>$?
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">if</span> <span style="color:#5e81ac">[[</span> $exit_code -ne <span style="color:#b48ead">0</span> <span style="color:#5e81ac">]]</span><span style="color:#eceff4">;</span> <span style="color:#d08770;font-weight:bold">then</span>
</span></span><span style="display:flex;"><span>        log_error <span style="color:#a3be8c">&#34;Script failed with exit code </span>$exit_code<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">fi</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">exit</span> $exit_code
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">trap</span> cleanup EXIT
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Check if running as root</span>
</span></span><span style="display:flex;"><span>check_root<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">if</span> <span style="color:#5e81ac">[[</span> $EUID -ne <span style="color:#b48ead">0</span> <span style="color:#5e81ac">]]</span><span style="color:#eceff4">;</span> <span style="color:#d08770;font-weight:bold">then</span>
</span></span><span style="display:flex;"><span>        log_error <span style="color:#a3be8c">&#34;This script must be run as root&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#5e81ac">exit</span> <span style="color:#b48ead">1</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">fi</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Create backup directory structure</span>
</span></span><span style="display:flex;"><span>setup_backup_dir<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> backup_path<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>BACKUP_DIR<span style="color:#a3be8c">}</span><span style="color:#a3be8c">/</span><span style="color:#a3be8c">${</span>TIMESTAMP<span style="color:#a3be8c">}</span><span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">if</span> ! mkdir -p <span style="color:#a3be8c">&#34;</span>$backup_path<span style="color:#a3be8c">&#34;</span><span style="color:#eceff4">;</span> <span style="color:#d08770;font-weight:bold">then</span>
</span></span><span style="display:flex;"><span>        log_error <span style="color:#a3be8c">&#34;Failed to create backup directory: </span>$backup_path<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">return</span> <span style="color:#b48ead">1</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">fi</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">echo</span> <span style="color:#a3be8c">&#34;</span>$backup_path<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Database backup function</span>
</span></span><span style="display:flex;"><span>backup_database<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> db_name<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span>$1<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> backup_path<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span>$2<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> db_file<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>backup_path<span style="color:#a3be8c">}</span><span style="color:#a3be8c">/</span><span style="color:#a3be8c">${</span>db_name<span style="color:#a3be8c">}</span><span style="color:#a3be8c">_</span><span style="color:#a3be8c">${</span>TIMESTAMP<span style="color:#a3be8c">}</span><span style="color:#a3be8c">.sql&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    log_info <span style="color:#a3be8c">&#34;Starting database backup for: </span>$db_name<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">if</span> <span style="color:#5e81ac">command</span> -v mysqldump &gt;/dev/null 2&gt;<span style="color:#eceff4">&amp;</span>1<span style="color:#eceff4">;</span> <span style="color:#d08770;font-weight:bold">then</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">if</span> mysqldump --single-transaction --routines --triggers <span style="color:#ebcb8b">\
</span></span></span><span style="display:flex;"><span>           --user<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>DB_USER<span style="color:#d08770;font-weight:bold">:-</span>root<span style="color:#a3be8c">}</span><span style="color:#a3be8c">&#34;</span> --password<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>DB_PASS<span style="color:#a3be8c">}</span><span style="color:#a3be8c">&#34;</span> <span style="color:#ebcb8b">\
</span></span></span><span style="display:flex;"><span>           <span style="color:#a3be8c">&#34;</span>$db_name<span style="color:#a3be8c">&#34;</span> &gt; <span style="color:#a3be8c">&#34;</span>$db_file<span style="color:#a3be8c">&#34;</span><span style="color:#eceff4">;</span> <span style="color:#d08770;font-weight:bold">then</span>
</span></span><span style="display:flex;"><span>            log_info <span style="color:#a3be8c">&#34;Database backup completed: </span>$db_file<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>            gzip <span style="color:#a3be8c">&#34;</span>$db_file<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">return</span> <span style="color:#b48ead">0</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">else</span>
</span></span><span style="display:flex;"><span>            log_error <span style="color:#a3be8c">&#34;Database backup failed for: </span>$db_name<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#d08770;font-weight:bold">return</span> <span style="color:#b48ead">1</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">fi</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">else</span>
</span></span><span style="display:flex;"><span>        log_warn <span style="color:#a3be8c">&#34;mysqldump not found, skipping database backup&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">return</span> <span style="color:#b48ead">1</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">fi</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># File system backup</span>
</span></span><span style="display:flex;"><span>backup_files<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> source_dir<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span>$1<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> backup_path<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span>$2<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> archive_name<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>backup_path<span style="color:#a3be8c">}</span><span style="color:#a3be8c">/files_</span><span style="color:#a3be8c">${</span>TIMESTAMP<span style="color:#a3be8c">}</span><span style="color:#a3be8c">.tar.gz&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    log_info <span style="color:#a3be8c">&#34;Starting file backup from: </span>$source_dir<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#4c566a;font-style:italic"># Exclude common unnecessary files</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> exclude_patterns<span style="color:#5e81ac">=(</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a3be8c">&#34;*.log&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a3be8c">&#34;*.tmp&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a3be8c">&#34;*cache*&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a3be8c">&#34;node_modules&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a3be8c">&#34;.git&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> tar_excludes<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">for</span> pattern in <span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>exclude_patterns<span style="color:#eceff4">[@]</span><span style="color:#a3be8c">}</span><span style="color:#a3be8c">&#34;</span><span style="color:#eceff4">;</span> <span style="color:#d08770;font-weight:bold">do</span>
</span></span><span style="display:flex;"><span>        tar_excludes<span style="color:#5e81ac">+=</span><span style="color:#a3be8c">&#34;--exclude=</span><span style="color:#a3be8c">${</span>pattern<span style="color:#a3be8c">}</span><span style="color:#a3be8c"> &#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">done</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">if</span> tar czf <span style="color:#a3be8c">&#34;</span>$archive_name<span style="color:#a3be8c">&#34;</span> $tar_excludes -C <span style="color:#a3be8c">&#34;</span><span style="color:#d08770;font-weight:bold">$(</span>dirname <span style="color:#a3be8c">&#34;</span>$source_dir<span style="color:#a3be8c">&#34;</span><span style="color:#d08770;font-weight:bold">)</span><span style="color:#a3be8c">&#34;</span> <span style="color:#ebcb8b">\
</span></span></span><span style="display:flex;"><span>       <span style="color:#a3be8c">&#34;</span><span style="color:#d08770;font-weight:bold">$(</span>basename <span style="color:#a3be8c">&#34;</span>$source_dir<span style="color:#a3be8c">&#34;</span><span style="color:#d08770;font-weight:bold">)</span><span style="color:#a3be8c">&#34;</span><span style="color:#eceff4">;</span> <span style="color:#d08770;font-weight:bold">then</span>
</span></span><span style="display:flex;"><span>        log_info <span style="color:#a3be8c">&#34;File backup completed: </span>$archive_name<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">return</span> <span style="color:#b48ead">0</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">else</span>
</span></span><span style="display:flex;"><span>        log_error <span style="color:#a3be8c">&#34;File backup failed for: </span>$source_dir<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#d08770;font-weight:bold">return</span> <span style="color:#b48ead">1</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">fi</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Cleanup old backups</span>
</span></span><span style="display:flex;"><span>cleanup_old_backups<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span>
</span></span><span style="display:flex;"><span>    log_info <span style="color:#a3be8c">&#34;Cleaning up old backups (keeping </span>$MAX_BACKUPS<span style="color:#a3be8c">)&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#4c566a;font-style:italic"># Find and remove old backup directories</span>
</span></span><span style="display:flex;"><span>    find <span style="color:#a3be8c">&#34;</span>$BACKUP_DIR<span style="color:#a3be8c">&#34;</span> -maxdepth <span style="color:#b48ead">1</span> -type d -name <span style="color:#a3be8c">&#34;[0-9]*_[0-9]*&#34;</span> <span style="color:#ebcb8b">\
</span></span></span><span style="display:flex;"><span>         -printf <span style="color:#a3be8c">&#39;%T@ %p\n&#39;</span> <span style="color:#eceff4">|</span> sort -nr <span style="color:#eceff4">|</span> tail -n +<span style="color:#d08770;font-weight:bold">$((</span>MAX_BACKUPS <span style="color:#5e81ac">+</span> <span style="color:#b48ead">1</span><span style="color:#d08770;font-weight:bold">))</span> <span style="color:#eceff4">|</span> <span style="color:#ebcb8b">\
</span></span></span><span style="display:flex;"><span>         cut -d<span style="color:#a3be8c">&#39; &#39;</span> -f2- <span style="color:#eceff4">|</span> <span style="color:#d08770;font-weight:bold">while</span> <span style="color:#5e81ac">read</span> -r old_backup<span style="color:#eceff4">;</span> <span style="color:#d08770;font-weight:bold">do</span>
</span></span><span style="display:flex;"><span>        log_info <span style="color:#a3be8c">&#34;Removing old backup: </span>$old_backup<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>        rm -rf <span style="color:#a3be8c">&#34;</span>$old_backup<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">done</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Main backup function</span>
</span></span><span style="display:flex;"><span>main<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span>
</span></span><span style="display:flex;"><span>    log_info <span style="color:#a3be8c">&#34;Starting backup process&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    check_root
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> backup_path
</span></span><span style="display:flex;"><span>    backup_path<span style="color:#5e81ac">=</span><span style="color:#d08770;font-weight:bold">$(</span>setup_backup_dir<span style="color:#d08770;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#4c566a;font-style:italic"># Backup databases</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">while</span> IFS<span style="color:#5e81ac">=</span> <span style="color:#5e81ac">read</span> -r database<span style="color:#eceff4">;</span> <span style="color:#d08770;font-weight:bold">do</span>
</span></span><span style="display:flex;"><span>        <span style="color:#5e81ac">[[</span> -n <span style="color:#a3be8c">&#34;</span>$database<span style="color:#a3be8c">&#34;</span> <span style="color:#5e81ac">]]</span> <span style="color:#5e81ac">&amp;&amp;</span> backup_database <span style="color:#a3be8c">&#34;</span>$database<span style="color:#a3be8c">&#34;</span> <span style="color:#a3be8c">&#34;</span>$backup_path<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">done</span> <span style="color:#5e81ac">&lt;&lt;&lt;</span> <span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>DATABASES<span style="color:#d08770;font-weight:bold">:-</span><span style="color:#a3be8c">}</span><span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#4c566a;font-style:italic"># Backup file systems</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">local</span> directories<span style="color:#5e81ac">=(</span><span style="color:#a3be8c">&#34;/etc&#34;</span> <span style="color:#a3be8c">&#34;/home&#34;</span> <span style="color:#a3be8c">&#34;/var/www&#34;</span><span style="color:#5e81ac">)</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">for</span> dir in <span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>directories<span style="color:#eceff4">[@]</span><span style="color:#a3be8c">}</span><span style="color:#a3be8c">&#34;</span><span style="color:#eceff4">;</span> <span style="color:#d08770;font-weight:bold">do</span>
</span></span><span style="display:flex;"><span>        <span style="color:#5e81ac">[[</span> -d <span style="color:#a3be8c">&#34;</span>$dir<span style="color:#a3be8c">&#34;</span> <span style="color:#5e81ac">]]</span> <span style="color:#5e81ac">&amp;&amp;</span> backup_files <span style="color:#a3be8c">&#34;</span>$dir<span style="color:#a3be8c">&#34;</span> <span style="color:#a3be8c">&#34;</span>$backup_path<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">done</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    cleanup_old_backups
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    log_info <span style="color:#a3be8c">&#34;Backup process completed successfully&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">echo</span> -e <span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>GREEN<span style="color:#a3be8c">}</span><span style="color:#a3be8c">✓ Backup completed: </span>$backup_path<span style="color:#a3be8c">${</span>NC<span style="color:#a3be8c">}</span><span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Script usage</span>
</span></span><span style="display:flex;"><span>usage<span style="color:#5e81ac">()</span> <span style="color:#5e81ac">{</span>
</span></span><span style="display:flex;"><span>    cat <span style="color:#a3be8c">&lt;&lt; EOF
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">Usage: $SCRIPT_NAME [OPTIONS]
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">A comprehensive backup script for databases and file systems.
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">OPTIONS:
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">    -h, --help      Show this help message
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">    -d, --database  Database name to backup
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">    -v, --verbose   Enable verbose output
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">EXAMPLES:
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">    $SCRIPT_NAME
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">    $SCRIPT_NAME -d myapp_production
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">ENVIRONMENT VARIABLES:
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">    DB_USER         Database username (default: root)
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">    DB_PASS         Database password
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">    DATABASES       Newline-separated list of databases to backup
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">EOF</span>
</span></span><span style="display:flex;"><span><span style="color:#5e81ac">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Parse command line arguments</span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">while</span> <span style="color:#5e81ac">[[</span> $# -gt <span style="color:#b48ead">0</span> <span style="color:#5e81ac">]]</span><span style="color:#eceff4">;</span> <span style="color:#d08770;font-weight:bold">do</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">case</span> $1 in
</span></span><span style="display:flex;"><span>        -h<span style="color:#eceff4">|</span>--help<span style="color:#5e81ac">)</span>
</span></span><span style="display:flex;"><span>            usage
</span></span><span style="display:flex;"><span>            <span style="color:#5e81ac">exit</span> <span style="color:#b48ead">0</span>
</span></span><span style="display:flex;"><span>            <span style="color:#eceff4">;;</span>
</span></span><span style="display:flex;"><span>        -d<span style="color:#eceff4">|</span>--database<span style="color:#5e81ac">)</span>
</span></span><span style="display:flex;"><span>            DATABASES<span style="color:#5e81ac">=</span><span style="color:#a3be8c">&#34;</span><span style="color:#a3be8c">${</span>DATABASES<span style="color:#d08770;font-weight:bold">:-</span><span style="color:#a3be8c">}${</span>2<span style="color:#a3be8c">}</span><span style="color:#a3be8c">\n&#34;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#5e81ac">shift</span> <span style="color:#b48ead">2</span>
</span></span><span style="display:flex;"><span>            <span style="color:#eceff4">;;</span>
</span></span><span style="display:flex;"><span>        -v<span style="color:#eceff4">|</span>--verbose<span style="color:#5e81ac">)</span>
</span></span><span style="display:flex;"><span>            <span style="color:#5e81ac">set</span> -x
</span></span><span style="display:flex;"><span>            <span style="color:#5e81ac">shift</span>
</span></span><span style="display:flex;"><span>            <span style="color:#eceff4">;;</span>
</span></span><span style="display:flex;"><span>        *<span style="color:#5e81ac">)</span>
</span></span><span style="display:flex;"><span>            log_error <span style="color:#a3be8c">&#34;Unknown option: </span>$1<span style="color:#a3be8c">&#34;</span>
</span></span><span style="display:flex;"><span>            usage
</span></span><span style="display:flex;"><span>            <span style="color:#5e81ac">exit</span> <span style="color:#b48ead">1</span>
</span></span><span style="display:flex;"><span>            <span style="color:#eceff4">;;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#d08770;font-weight:bold">esac</span>
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">done</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#4c566a;font-style:italic"># Run main function</span>
</span></span><span style="display:flex;"><span>main <span style="color:#a3be8c">&#34;</span>$@<span style="color:#a3be8c">&#34;</span></span></span></code></pre></div>
</div>
</div>
</div>
<div id="outline-container-headline-9" class="outline-2">
<h2 id="headline-9">
Conclusion&#xa0;&#xa0;&#xa0;<span class="tags"><span class="tag-summary">summary</span></span>
</h2>
<div id="outline-text-headline-9" class="outline-text-2">
<p>
Org mode&#39;s syntax highlighting capabilities make it an excellent choice for technical documentation, blog posts, and educational materials. The examples above demonstrate how different programming languages are beautifully rendered with appropriate color coding and formatting.</p>
<p>
Key benefits of using Org mode for technical content:</p>
<ul>
<li><strong><strong>Universal Language Support</strong></strong>: From systems languages like Rust and Go to web technologies like JavaScript and CSS</li>
<li><strong><strong>Consistent Formatting</strong></strong>: All code blocks maintain consistent indentation and styling</li>
<li><strong><strong>Export Flexibility</strong></strong>: Content can be exported to HTML, PDF, LaTeX, and many other formats</li>
<li><strong><strong>Literate Programming</strong></strong>: Code and documentation can be seamlessly integrated</li>
</ul>
<p>Whether you&#39;re writing technical tutorials, documenting APIs, or creating educational content, Org mode provides the tools needed to present code clearly and professionally.</p>
<pre class="example">
To use these code blocks in your own Org documents, simply use:
#+BEGIN_SRC language_name
your code here
#+END_SRC
</pre>
</div>
</div>
<div id="outline-container-headline-10" class="outline-2">
<h2 id="headline-10">
About This Post
</h2>
<div id="outline-text-headline-10" class="outline-text-2">
<p>
This demonstration was created to showcase the versatility of Org mode&#39;s syntax highlighting across different programming paradigms - from data science with Python to systems programming with Rust, from web development with JavaScript and HTML/CSS to database work with SQL, and system administration with Bash scripting.</p>
<p>
Each example represents real-world, practical code that demonstrates both the language&#39;s capabilities and Org mode&#39;s excellent presentation features.</p>
</div>
</div>
]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[The Art of Simple Pasta: A Weekend Kitchen Adventure]]></title>
    <link href="https://15c5c002.er-6wj.pages.dev/posts/cooking/"/>
    <id>https://15c5c002.er-6wj.pages.dev/posts/cooking/</id>
    <published>2025-06-13T00:00:00+00:00</published>
    <updated>2025-06-13T00:00:00+00:00</updated>
    <content type="html"><![CDATA[
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Introduction
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<p>
There&#39;s something magical about the simplicity of a perfectly cooked pasta dish. Today, I&#39;m sharing my go-to recipe for <em>Aglio e Olio</em> - a classic Italian pasta that proves you don&#39;t need many ingredients to create something extraordinary.</p>
<p>
<img src="ingredients.jpg" alt="ingredients.jpg" title="ingredients.jpg" /></p>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
Ingredients
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<ul>
<li>400g spaghetti</li>
<li>6 cloves garlic, thinly sliced</li>
<li>1/2 cup extra virgin olive oil</li>
<li>1 tsp red pepper flakes</li>
<li>Fresh parsley, chopped</li>
<li>Parmigiano-Reggiano cheese</li>
<li>Sea salt and black pepper</li>
</ul>
</div>
</div>
<div id="outline-container-headline-3" class="outline-2">
<h2 id="headline-3">
The Cooking Process
</h2>
<div id="outline-text-headline-3" class="outline-text-2">
<div id="outline-container-headline-4" class="outline-3">
<h3 id="headline-4">
Preparing the Base
</h3>
<div id="outline-text-headline-4" class="outline-text-3">
<p>
The secret to great <em>Aglio e Olio</em> lies in the gentle cooking of garlic in olive oil. Heat the oil in a large pan over medium-low heat, then add the sliced garlic. The goal is golden, fragrant garlic - never brown or burnt.</p>
<p>
<img src="garlic.jpg" alt="garlic.jpg" title="garlic.jpg" /></p>
</div>
</div>
<div id="outline-container-headline-5" class="outline-3">
<h3 id="headline-5">
Bringing It Together
</h3>
<div id="outline-text-headline-5" class="outline-text-3">
<p>
Once your spaghetti is al dente, reserve a cup of the starchy pasta water before draining. This liquid gold will help create a silky sauce that clings to every strand.</p>
<p>
Add the hot pasta directly to the garlic oil, along with a splash of pasta water. Toss vigorously - this is where the magic happens as the starch emulsifies with the oil.</p>
<p>
<img src="pasta.jpg" alt="pasta.jpg" title="pasta.jpg" /></p>
</div>
</div>
</div>
</div>
<div id="outline-container-headline-6" class="outline-2">
<h2 id="headline-6">
The Final Touch
</h2>
<div id="outline-text-headline-6" class="outline-text-2">
<p>
Finish with fresh parsley, a generous grating of cheese, and a crack of black pepper. The dish should be glossy, aromatic, and utterly irresistible.</p>
<p>
<img src="serve.jpg" alt="serve.jpg" title="serve.jpg" /></p>
</div>
</div>
<div id="outline-container-headline-7" class="outline-2">
<h2 id="headline-7">
Reflection
</h2>
<div id="outline-text-headline-7" class="outline-text-2">
<p>
Cooking this dish reminds me why I love simple Italian cuisine. With just a handful of quality ingredients and proper technique, you can create something that feeds both the body and soul. The key is respecting each component and understanding how they work together.</p>
<div id="outline-container-headline-8" class="outline-3">
<h3 id="headline-8">
Tips for Success
</h3>
<div id="outline-text-headline-8" class="outline-text-3">
<ul>
<li>Use the best olive oil you can afford</li>
<li>Don&#39;t rush the garlic - low and slow is the way</li>
<li>Save that pasta water - it&#39;s crucial for the sauce</li>
<li>Serve immediately while everything is hot</li>
</ul>
<p><em>Buon appetito!</em></p>
<blockquote>
<p>&#34;The best meals are often the simplest ones, made with love and attention to detail.&#34;</p>
</blockquote>
</div>
</div>
</div>
</div>
]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Emacs Org Mode: The Swiss Army Knife of Text Organization]]></title>
    <link href="https://15c5c002.er-6wj.pages.dev/posts/org-mode/"/>
    <id>https://15c5c002.er-6wj.pages.dev/posts/org-mode/</id>
    <published>2025-06-09T00:00:00+00:00</published>
    <updated>2025-06-09T00:00:00+00:00</updated>
    <content type="html"><![CDATA[
<p>
In the vast ecosystem of text editors and productivity tools, few applications can match the power and flexibility of Emacs Org Mode. What started as a simple outlining tool has evolved into a comprehensive system for managing everything from daily tasks to complex projects, research notes, and even entire websites.</p>
<div id="outline-container-headline-1" class="outline-3">
<h3 id="headline-1">
What is Org Mode?
</h3>
<div id="outline-text-headline-1" class="outline-text-3">
<p>Org Mode is a major mode for the Emacs text editor that combines the simplicity of plain text with the power of structured data. At its core, it&#39;s a markup language that uses intuitive syntax to create hierarchical documents. But calling it just a markup language would be like calling a smartphone just a phone – it vastly understates its capabilities.
The beauty of Org Mode lies in its philosophy: everything is plain text, but that text can be incredibly intelligent. Your documents remain readable in any text editor, yet they can transform into formatted exports, dynamic agendas, calculation spreadsheets, and executable code notebooks.</p>
</div>
</div>
<div id="outline-container-headline-2" class="outline-3">
<h3 id="headline-2">
The Building Blocks: Headlines and Structure
</h3>
<div id="outline-text-headline-2" class="outline-text-3">
<p>Org Mode documents are built around a simple but powerful concept: headlines. Using asterisks to denote heading levels, you can create deeply nested structures that mirror how you actually think about information:</p>
<pre class="example">
Project Alpha

** Research Phase
*** Literature Review
*** Market Analysis

** Development Phase
*** Frontend Development
*** Backend Development
*** Testing
</pre>
<p>
This hierarchical structure isn&#39;t just for show. You can fold and unfold sections, move entire subtrees around, and navigate through your document structure with keyboard shortcuts that make reorganizing thoughts as fluid as having them.</p>
</div>
</div>
<div id="outline-container-headline-3" class="outline-3">
<h3 id="headline-3">
Task Management That Actually Works
</h3>
<div id="outline-text-headline-3" class="outline-text-3">
<p>Where Org Mode truly shines is in task management. By adding simple keywords like <code class="verbatim">TODO</code> and <code class="verbatim">DONE</code> to your headlines, you transform your outline into a powerful task tracking system. But it goes much deeper than basic to-do lists.
You can assign priorities, set deadlines, schedule tasks, track time spent, and create dependencies between tasks. The agenda view aggregates all your tasks from multiple files, giving you a unified dashboard of everything that needs your attention. Unlike rigid project management tools, Org Mode adapts to your workflow rather than forcing you to adapt to it.</p>
</div>
</div>
<div id="outline-container-headline-4" class="outline-3">
<h3 id="headline-4">
Beyond Text: Tables, Code, and Literate Programming
</h3>
<div id="outline-text-headline-4" class="outline-text-3">
<p>Org Mode&#39;s tables are surprisingly sophisticated. You can create spreadsheet-like functionality with formulas, automatic calculations, and even plotting capabilities. Need to track expenses, calculate project budgets, or maintain a simple database? Org tables handle it elegantly while remaining completely portable.
The code block feature enables something called &#34;literate programming&#34; – you can write executable code directly in your documents, run it, and capture the results. This makes Org Mode invaluable for data analysis, documentation, and reproducible research. Your analysis, explanation, and results live together in one coherent document.</p>
</div>
</div>
<div id="outline-container-headline-5" class="outline-3">
<h3 id="headline-5">
Publishing and Sharing Your Work
</h3>
<div id="outline-text-headline-5" class="outline-text-3">
<p>One of Org Mode&#39;s most impressive features is its export system. A single Org file can be transformed into HTML, PDF, LaTeX, slides, or numerous other formats. This means you can write once and publish anywhere, from academic papers to blog posts to presentation slides.
The HTML export is particularly noteworthy. Many websites and blogs are generated directly from Org Mode files, allowing authors to maintain their content in a familiar, structured format while producing professional web output. The <a href="https://orgmode.org/">Org Mode website</a> documents the available publishing workflows.</p>
</div>
</div>
<div id="outline-container-headline-6" class="outline-3">
<h3 id="headline-6">
The Learning Curve Reality
</h3>
<div id="outline-text-headline-6" class="outline-text-3">
<p>Org Mode isn&#39;t without its challenges. It lives within Emacs, which itself has a steep learning curve. The keybindings are numerous, and the full feature set can be overwhelming. You&#39;ll likely spend time customizing and configuring to match your specific needs.
However, the investment pays dividends. Once you internalize the basic concepts, Org Mode becomes a natural extension of your thinking process. The friction between having an idea and capturing it, organizing it, and acting on it virtually disappears.</p>
</div>
</div>
<div id="outline-container-headline-7" class="outline-3">
<h3 id="headline-7">
Getting Started: Your First Steps
</h3>
<div id="outline-text-headline-7" class="outline-text-3">
<p>If you&#39;re intrigued by Org Mode&#39;s possibilities, start simple. Install Emacs, open a new <code class="verbatim">.org</code> file, and begin with basic headlines and text. Gradually introduce features like TODO keywords, scheduling, and tables as you become comfortable.
The key is to let Org Mode grow with your needs rather than trying to master everything at once. Many users find that what begins as simple note-taking evolves into a comprehensive personal knowledge management system.</p>
</div>
</div>
<div id="outline-container-headline-8" class="outline-3">
<h3 id="headline-8">
Why Org Mode Matters in 2025
</h3>
<div id="outline-text-headline-8" class="outline-text-3">
<p>In an age of proprietary productivity apps and cloud-dependent tools, Org Mode represents something increasingly rare: a powerful, flexible system that puts you in complete control of your data. Your files are yours, readable by any text editor, and will remain accessible decades from now.
For researchers, writers, programmers, and anyone who works with complex information, Org Mode offers a level of integration and customization that&#39;s simply not available in other tools. It&#39;s not just software – it&#39;s a framework for thinking, organizing, and creating that adapts to your unique workflow.
Whether you&#39;re managing a simple task list or orchestrating complex research projects, Org Mode provides the tools to match your ambition. The question isn&#39;t whether it can handle your workflow – it&#39;s whether you&#39;re ready to discover what becomes possible when your tools finally get out of your way.</p>
</div>
</div>
]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[The Complete Markdown Guide: Write Better Documentation in Minutes]]></title>
    <link href="https://15c5c002.er-6wj.pages.dev/posts/markdown-guide/"/>
    <id>https://15c5c002.er-6wj.pages.dev/posts/markdown-guide/</id>
    <published>2025-05-28T00:00:00+00:00</published>
    <updated>2025-05-28T00:00:00+00:00</updated>
    <content type="html"><![CDATA[<p><em>Published on June 29, 2025 • 15 min read</em></p>
<p>Markdown has become the universal language of documentation, powering everything from GitHub README files to technical blogs and project wikis. Whether you&rsquo;re a developer documenting your code, a writer crafting blog posts, or a project manager creating clear specifications, mastering Markdown will transform how you communicate ideas.</p>
<p>This comprehensive guide will take you from Markdown novice to power user, covering everything you need to know to write clean, professional documentation.</p>
<h2 id="what-is-markdown">What is Markdown?</h2>
<p>Markdown is a lightweight markup language created by John Gruber in 2004. It allows you to format text using simple, readable syntax that converts to HTML. The beauty of Markdown lies in its simplicity—you can focus on writing content without getting bogged down in complex formatting.</p>
<p>Think of Markdown as a middle ground between plain text and rich text editors. It&rsquo;s more structured than plain text but far simpler than HTML or Word documents.</p>
<h2 id="basic-text-formatting">Basic Text Formatting</h2>
<h3 id="headers">Headers</h3>
<p>Headers create document structure and hierarchy. Use hash symbols (<code>#</code>) to create headers:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span><span style="color:#88c0d0;font-weight:bold"># Main Title (H1)
</span></span></span><span style="display:flex;"><span><span style="color:#88c0d0;font-weight:bold">## Section Header (H2)
</span></span></span><span style="display:flex;"><span><span style="color:#88c0d0;font-weight:bold">### Subsection Header (H3)
</span></span></span><span style="display:flex;"><span><span style="color:#88c0d0;font-weight:bold">#### Minor Header (H4)
</span></span></span><span style="display:flex;"><span><span style="color:#88c0d0;font-weight:bold">##### Small Header (H5)
</span></span></span><span style="display:flex;"><span><span style="color:#88c0d0;font-weight:bold">###### Smallest Header (H6)
</span></span></span></code></pre></div><p><strong>Pro tip:</strong> Always include a space after the hash symbols for better compatibility across Markdown parsers.</p>
<h3 id="emphasis-and-styling">Emphasis and Styling</h3>
<p>Make your text stand out with these formatting options:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span>*Italic text* or <span style="font-style:italic">_italic text_</span>
</span></span><span style="display:flex;"><span><span style="font-weight:bold">**Bold text**</span> or <span style="font-weight:bold">__bold text__</span>
</span></span><span style="display:flex;"><span><span style="font-style:italic">**</span>*Bold and italic*** or <span style="font-weight:bold">___bold and italic___</span>
</span></span><span style="display:flex;"><span><span style="color:#c5727a">~~Strikethrough text~~</span>
</span></span><span style="display:flex;"><span><span style="color:#a3be8c">`Inline code`</span> or code snippets
</span></span></code></pre></div><h3 id="paragraphs-and-line-breaks">Paragraphs and Line Breaks</h3>
<p>Create paragraphs by separating text with blank lines. For a line break within a paragraph, end a line with two spaces or use a backslash:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span>This is paragraph one.
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>This is paragraph two.
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>This line ends with two spaces
</span></span><span style="display:flex;"><span>And continues on the next line.
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>This line ends with a backslash\
</span></span><span style="display:flex;"><span>And also continues on the next line.
</span></span></code></pre></div><h2 id="lists-and-organization">Lists and Organization</h2>
<h3 id="unordered-lists">Unordered Lists</h3>
<p>Create bullet points using asterisks (<code>*</code>), plus signs (<code>+</code>), or hyphens (<code>-</code>):</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">*</span> First item
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">*</span> Second item
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">*</span> Third item
</span></span><span style="display:flex;"><span>  <span style="color:#d08770;font-weight:bold">*</span> Nested item
</span></span><span style="display:flex;"><span>  <span style="color:#d08770;font-weight:bold">*</span> Another nested item
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">*</span> Fourth item
</span></span></code></pre></div><h3 id="ordered-lists">Ordered Lists</h3>
<p>Use numbers followed by periods for numbered lists:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">1.</span> First step
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">2.</span> Second step
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">3.</span> Third step
</span></span><span style="display:flex;"><span>   <span style="color:#d08770;font-weight:bold">1.</span> Sub-step A
</span></span><span style="display:flex;"><span>   <span style="color:#d08770;font-weight:bold">2.</span> Sub-step B
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">4.</span> Fourth step
</span></span></code></pre></div><h3 id="task-lists">Task Lists</h3>
<p>Create interactive checkboxes (supported by many platforms):</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">- [x]</span> Completed task
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">- [ ]</span> Incomplete task
</span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">- [ ]</span> Another task to do
</span></span></code></pre></div><h2 id="links-and-images">Links and Images</h2>
<h3 id="links">Links</h3>
<p>Create links using square brackets for the text and parentheses for the URL:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span>[<span style="color:#5e81ac">Link text</span>](<span style="color:#8fbcbb">https://example.com</span>)
</span></span><span style="display:flex;"><span>[<span style="color:#5e81ac">Link with title</span>](<span style="color:#8fbcbb">https://example.com &#34;This appears on hover&#34;</span>)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>You can also use reference-style links:
</span></span><span style="display:flex;"><span>[Link text][reference]
</span></span><span style="display:flex;"><span>[Another link][reference]
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>[reference]: https://example.com &#34;Optional title&#34;
</span></span></code></pre></div><p>Rendered example: <a href="https://example.com">Visit example.com</a> to see how links appear in body text.</p>
<h3 id="images">Images</h3>
<p>Images use similar syntax to links but start with an exclamation mark:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span>![<span style="color:#5e81ac">Alt text</span>](<span style="color:#8fbcbb">image-url.jpg</span>)
</span></span><span style="display:flex;"><span>![<span style="color:#5e81ac">Alt text</span>](<span style="color:#8fbcbb">image-url.jpg &#34;Optional title&#34;</span>)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>Reference-style images work too:
</span></span><span style="display:flex;"><span>![Alt text][image-reference]
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>[image-reference]: image-url.jpg &#34;Optional title&#34;
</span></span></code></pre></div><h2 id="code-and-technical-writing">Code and Technical Writing</h2>
<h3 id="inline-code">Inline Code</h3>
<p>Wrap code in backticks for inline formatting:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span>Use the <span style="color:#a3be8c">`console.log()`</span> function to debug your JavaScript.
</span></span></code></pre></div><h3 id="code-blocks">Code Blocks</h3>
<p>Create code blocks using triple backticks with optional language specification:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span><span style="color:#a3be8c">```javascript
</span></span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">function</span> greetUser<span style="color:#eceff4">(</span>name<span style="color:#eceff4">)</span> <span style="color:#eceff4">{</span>
</span></span><span style="display:flex;"><span>    console<span style="color:#eceff4">.</span>log<span style="color:#eceff4">(</span><span style="color:#a3be8c">`Hello, </span><span style="color:#a3be8c">${</span>name<span style="color:#a3be8c">}</span><span style="color:#a3be8c">!`</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span><span style="color:#eceff4">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>greetUser<span style="color:#eceff4">(</span><span style="color:#a3be8c">&#34;World&#34;</span><span style="color:#eceff4">);</span>
</span></span><span style="display:flex;"><span><span style="color:#a3be8c">```</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#a3be8c">```python
</span></span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">def</span> <span style="color:#88c0d0">greet_user</span><span style="color:#eceff4">(</span>name<span style="color:#eceff4">):</span>
</span></span><span style="display:flex;"><span>    <span style="color:#5e81ac">print</span><span style="color:#eceff4">(</span><span style="color:#a3be8c">f</span><span style="color:#a3be8c">&#34;Hello, </span><span style="color:#a3be8c">{</span>name<span style="color:#a3be8c">}</span><span style="color:#a3be8c">!&#34;</span><span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>greet_user<span style="color:#eceff4">(</span><span style="color:#a3be8c">&#34;World&#34;</span><span style="color:#eceff4">)</span>
</span></span><span style="display:flex;"><span><span style="color:#a3be8c">```</span>
</span></span></code></pre></div><h3 id="syntax-highlighting">Syntax Highlighting</h3>
<p>Most Markdown parsers support syntax highlighting for dozens of languages:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span>``<span style="color:#a3be8c">`html
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">`</span>`<span style="color:#a3be8c">`css
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">`</span>`<span style="color:#a3be8c">`python
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">`</span>`<span style="color:#a3be8c">`javascript
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">`</span>`<span style="color:#a3be8c">`bash
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">`</span>`<span style="color:#a3be8c">`sql
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">`</span>`<span style="color:#a3be8c">`json
</span></span></span><span style="display:flex;"><span><span style="color:#a3be8c">`</span>``yaml
</span></span></code></pre></div><pre tabindex="0"><code>
## Tables

Create tables using pipes (`|`) to separate columns:

```markdown
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Row 1    | Data     | More data|
| Row 2    | Data     | More data|

You can align columns:
| Left | Center | Right |
|:-----|:------:|------:|
| Text | Text   | Text  |
</code></pre><p>Rendered, that looks like:</p>
<table>
	<thead>
			<tr>
					<th>Feature</th>
					<th>Markdown</th>
					<th>HTML equivalent</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Heading</td>
					<td><code># Title</code></td>
					<td><code>&lt;h1&gt;Title&lt;/h1&gt;</code></td>
					<td>One <code>#</code> per level, up to 6</td>
			</tr>
			<tr>
					<td>Bold</td>
					<td><code>**text**</code></td>
					<td><code>&lt;strong&gt;text&lt;/strong&gt;</code></td>
					<td>Or <code>__text__</code></td>
			</tr>
			<tr>
					<td>Italic</td>
					<td><code>*text*</code></td>
					<td><code>&lt;em&gt;text&lt;/em&gt;</code></td>
					<td>Or <code>_text_</code></td>
			</tr>
			<tr>
					<td>Inline code</td>
					<td><code>`code`</code></td>
					<td><code>&lt;code&gt;code&lt;/code&gt;</code></td>
					<td>Backticks, escape with ```</td>
			</tr>
			<tr>
					<td>Link</td>
					<td><code>[x](url)</code></td>
					<td><code>&lt;a href=&quot;url&quot;&gt;x&lt;/a&gt;</code></td>
					<td>Title via <code>[x](url &quot;title&quot;)</code></td>
			</tr>
			<tr>
					<td>Image</td>
					<td><code>![alt](src)</code></td>
					<td><code>&lt;img src=&quot;src&quot; alt=&quot;alt&quot;&gt;</code></td>
					<td>Same syntax with a leading <code>!</code></td>
			</tr>
	</tbody>
</table>
<p>With column alignment:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Left</th>
					<th style="text-align: center">Center</th>
					<th style="text-align: right">Right</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left">apples</td>
					<td style="text-align: center">1</td>
					<td style="text-align: right">$0.50</td>
			</tr>
			<tr>
					<td style="text-align: left">oranges</td>
					<td style="text-align: center">12</td>
					<td style="text-align: right">$4.20</td>
			</tr>
			<tr>
					<td style="text-align: left">watermelons</td>
					<td style="text-align: center">3</td>
					<td style="text-align: right">$18.00</td>
			</tr>
	</tbody>
</table>
<h2 id="advanced-features">Advanced Features</h2>
<h3 id="blockquotes">Blockquotes</h3>
<p>Use greater-than symbols (<code>&gt;</code>) for quotes:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">&gt; </span><span style="font-style:italic">This is a blockquote.
</span></span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">&gt; </span><span style="font-style:italic">It can span multiple lines.
</span></span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">&gt;
</span></span></span><span style="display:flex;"><span><span style="font-style:italic">&gt; &gt; This is a nested blockquote.
</span></span></span><span style="display:flex;"><span><span style="color:#d08770;font-weight:bold">&gt;
</span></span></span><span style="display:flex;"><span><span style="font-style:italic">&gt; Back to the main quote.
</span></span></span></code></pre></div><h3 id="horizontal-rules">Horizontal Rules</h3>
<p>Create dividers using three or more hyphens, asterisks, or underscores:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="font-style:italic">**</span>*
</span></span><span style="display:flex;"><span>___
</span></span></code></pre></div><h3 id="escape-characters">Escape Characters</h3>
<p>Use backslashes to display special characters literally:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span>\* This won&#39;t be italic \*
</span></span><span style="display:flex;"><span>\# This won&#39;t be a header
</span></span><span style="display:flex;"><span>\[This won&#39;t be a link\](example.com)
</span></span></code></pre></div><h2 id="platform-specific-extensions">Platform-Specific Extensions</h2>
<h3 id="github-flavored-markdown-gfm">GitHub Flavored Markdown (GFM)</h3>
<p>GitHub extends standard Markdown with additional features:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span><span style="color:#d08770">@username</span> mentions
</span></span><span style="display:flex;"><span><span style="color:#88c0d0;font-weight:bold">#123 issue references
</span></span></span><span style="display:flex;"><span>SHA: a5c3785ed8d6a35868bc169f34c123456789abcd
</span></span><span style="display:flex;"><span>user/repo<span style="color:#d08770">#123</span> cross-repository references
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>:+1: :shipit: :octocat: (emoji support)
</span></span></code></pre></div><h3 id="math-expressions">Math Expressions</h3>
<p>Some platforms support LaTeX math expressions:</p>
<div class="highlight"><pre tabindex="0" style="color:#bbc3d4;background-color:#242933;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span>Inline math: $x = y + z$
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>Block math:
</span></span><span style="display:flex;"><span>$$
</span></span><span style="display:flex;"><span>\frac{n!}{k!(n-k)!} = \binom{n}{k}
</span></span><span style="display:flex;"><span>$$
</span></span></code></pre></div><h2 id="best-practices-and-tips">Best Practices and Tips</h2>
<h3 id="document-structure">Document Structure</h3>
<p>Start with a clear hierarchy using headers. Your document should flow logically from general to specific topics.</p>
<h3 id="consistent-formatting">Consistent Formatting</h3>
<p>Pick one style for each element and stick to it throughout your document. For example, always use asterisks for unordered lists or always use underscores for emphasis.</p>
<h3 id="preview-your-work">Preview Your Work</h3>
<p>Always preview your Markdown before publishing. Different parsers may render elements slightly differently.</p>
<h3 id="use-meaningful-link-text">Use Meaningful Link Text</h3>
<p>Instead of &ldquo;click here,&rdquo; use descriptive link text that makes sense out of context.</p>
<h3 id="optimize-for-readability">Optimize for Readability</h3>
<p>Keep paragraphs short, use plenty of white space, and break up long sections with headers and lists.</p>
<h2 id="common-pitfalls-to-avoid">Common Pitfalls to Avoid</h2>
<p><strong>Forgetting blank lines:</strong> Always separate different elements (headers, paragraphs, lists) with blank lines.</p>
<p><strong>Inconsistent indentation:</strong> Use consistent spacing for nested lists and code blocks.</p>
<p><strong>Missing alt text:</strong> Always include descriptive alt text for images to improve accessibility.</p>
<p><strong>Overusing formatting:</strong> Don&rsquo;t bold or italicize everything. Use emphasis sparingly for maximum impact.</p>
<h2 id="tools-and-resources">Tools and Resources</h2>
<h3 id="editors-and-previewers">Editors and Previewers</h3>
<p>Popular Markdown editors include Typora, Mark Text, and Visual Studio Code with Markdown extensions. Many online tools like Dillinger and StackEdit offer real-time previews.</p>
<h3 id="conversion-tools">Conversion Tools</h3>
<p>Pandoc is the swiss-army knife for converting between Markdown and other formats like HTML, PDF, and Word documents.</p>
<h3 id="learning-resources">Learning Resources</h3>
<p>The original Markdown specification by John Gruber remains the definitive reference. GitHub&rsquo;s Markdown guide covers GFM extensions, and CommonMark provides a standardized specification.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Markdown&rsquo;s simplicity and versatility make it an essential skill for anyone who writes documentation or creates content online. By mastering these fundamentals and following best practices, you&rsquo;ll be able to create clear, professional documentation that&rsquo;s easy to read and maintain.</p>
<p>Start with the basics—headers, emphasis, and lists—then gradually incorporate more advanced features like tables and code blocks. With practice, Markdown will become second nature, allowing you to focus on your content rather than formatting.</p>
<p>Remember, the best Markdown is readable both in its raw form and when rendered. Keep it simple, stay consistent, and your documentation will serve you and your readers well.</p>
<hr>
<p><em>Ready to start writing? Open your favorite text editor and begin experimenting with these Markdown techniques today!</em></p>
<hr>
<h2 id="additional-resources-and-tags">Additional Resources and Tags</h2>
<p><strong>Related Topics:</strong> <code>HTML</code> <code>CSS</code> <code>GitHub</code> <code>Documentation</code> <code>Technical Writing</code> <code>Web Development</code> <code>Content Creation</code> <code>Developer Workflow</code></p>
<p><strong>Skill Level:</strong> Beginner to Intermediate
<strong>Prerequisites:</strong> Basic text editing knowledge
<strong>Estimated Learning Time:</strong> 2-3 hours for mastery</p>
<p><strong>Popular Use Cases:</strong></p>
<ul>
<li><code>readme-files</code> - GitHub repository documentation</li>
<li><code>blog-posts</code> - Technical and personal blogging</li>
<li><code>wiki-pages</code> - Knowledge base creation</li>
<li><code>project-docs</code> - Software documentation</li>
<li><code>note-taking</code> - Personal and professional notes</li>
<li><code>api-docs</code> - API reference documentation</li>
</ul>
]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Lorem Ipsum]]></title>
    <link href="https://15c5c002.er-6wj.pages.dev/posts/lorem-ipsum/"/>
    <id>https://15c5c002.er-6wj.pages.dev/posts/lorem-ipsum/</id>
    <published>2025-05-23T00:00:00+00:00</published>
    <updated>2025-05-23T00:00:00+00:00</updated>
    <content type="html"><![CDATA[<h2 id="lorem-primis-inceptos">Lorem Primis Inceptos</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin convallis, neque sit amet malesuada volutpat, risus lectus tincidunt nunc, id vehicula erat mauris et elit. Cras tristique magna a viverra sodales. Suspendisse sit amet sodales erat, ut ornare orci. Integer vitae sapien sed arcu bibendum posuere.</p>
<h2 id="vestibulum-elit-venenatis">Vestibulum Elit Venenatis</h2>
<p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Vivamus non diam vitae justo luctus scelerisque. Nunc ac diam feugiat, tincidunt lorem eget, euismod sapien. Sed non ex et metus varius pulvinar. Duis gravida ullamcorper massa, ut hendrerit nisl ultrices a.</p>
<h2 id="nulla-facilisi-praesent">Nulla Facilisi Praesent</h2>
<p>Nulla facilisi. Donec in sodales sapien. Nam eget mi et nisl rhoncus tincidunt. Fusce quis blandit risus. Proin ultricies turpis a purus ultrices, at fringilla sapien porttitor. Integer a condimentum erat. Maecenas dignissim, justo nec posuere porta, purus sapien varius libero, vel scelerisque nisi ex ac velit.</p>
<h2 id="curabitur-tempus-placerat">Curabitur Tempus Placerat</h2>
<p>Curabitur tempus placerat nibh, id feugiat odio porttitor non. Sed nec orci vitae risus tempor euismod. Aenean vestibulum, leo eget tincidunt dictum, enim est varius libero, vitae tincidunt ipsum sapien nec nisi. Pellentesque a elit ut justo finibus fringilla at vitae velit.</p>
<h2 id="aliquam-sit-amet-dapibus">Aliquam Sit Amet Dapibus</h2>
<p>Aliquam sit amet dapibus magna. In fermentum felis at sem efficitur, nec viverra magna congue. Sed vitae tincidunt odio. Etiam ac mauris velit. Phasellus consequat, felis ut iaculis posuere, libero metus imperdiet arcu, nec rhoncus nunc velit id nisi. Morbi ultricies sapien id erat scelerisque sagittis.</p>
]]></content>
  </entry>
</feed>
