<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Dev - Tag - Vindrin</title><link>https://vindrin.top/tags/dev/</link><description>Dev - Tag - Vindrin</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>vindrin@outlook.com (Vindrin)</managingEditor><webMaster>vindrin@outlook.com (Vindrin)</webMaster><lastBuildDate>Sun, 15 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://vindrin.top/tags/dev/" rel="self" type="application/rss+xml"/><item><title>Regex Practical Guide</title><link>https://vindrin.top/docs/regex-guide/</link><pubDate>Sun, 15 Mar 2026 00:00:00 +0000</pubDate><author>vindrin@outlook.com (Vindrin)</author><guid>https://vindrin.top/docs/regex-guide/</guid><description><![CDATA[<h1 id="regex-practical-guide">Regex Practical Guide</h1>
<p>Regex clicks once you stop memorizing patterns and start thinking in pieces.</p>
<h2 id="core-syntax">Core syntax</h2>
<table>
  <thead>
      <tr>
          <th>Pattern</th>
          <th>Meaning</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>.</code></td>
          <td>any character except newline</td>
      </tr>
      <tr>
          <td><code>*</code></td>
          <td>0 or more</td>
      </tr>
      <tr>
          <td><code>+</code></td>
          <td>1 or more</td>
      </tr>
      <tr>
          <td><code>?</code></td>
          <td>0 or 1 (optional)</td>
      </tr>
      <tr>
          <td><code>^</code></td>
          <td>start of string</td>
      </tr>
      <tr>
          <td><code>$</code></td>
          <td>end of string</td>
      </tr>
      <tr>
          <td><code>[abc]</code></td>
          <td>character class</td>
      </tr>
      <tr>
          <td><code>[^abc]</code></td>
          <td>negated class</td>
      </tr>
      <tr>
          <td><code>\d</code></td>
          <td>digit <code>[0-9]</code></td>
      </tr>
      <tr>
          <td><code>\w</code></td>
          <td>word char <code>[a-zA-Z0-9_]</code></td>
      </tr>
      <tr>
          <td><code>\s</code></td>
          <td>whitespace</td>
      </tr>
  </tbody>
</table>
<h2 id="useful-patterns">Useful patterns</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl"># Email (basic)
</span></span><span class="line"><span class="cl">[\w.+-]+@[\w-]+\.[a-zA-Z]{2,}
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"># URL
</span></span><span class="line"><span class="cl">https?://[\w./-]+
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"># IPv4
</span></span><span class="line"><span class="cl">\b\d{1,3}(\.\d{1,3}){3}\b
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"># Date YYYY-MM-DD
</span></span><span class="line"><span class="cl">\d{4}-\d{2}-\d{2}
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"># Hex color
</span></span><span class="line"><span class="cl">#[0-9a-fA-F]{6}</span></span></code></pre></div></div>
<h2 id="python-example">Python example</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-python">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">re</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">text</span> <span class="o">=</span> <span class="s2">&#34;Contact: hello@example.com or support@test.org&#34;</span>
</span></span><span class="line"><span class="cl"><span class="n">emails</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="sa">r</span><span class="s1">&#39;[\w.+-]+@[\w-]+\.[a-zA-Z]{2,}&#39;</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">emails</span><span class="p">)</span>  <span class="c1"># [&#39;hello@example.com&#39;, &#39;support@test.org&#39;]</span></span></span></code></pre></div></div>
<h2 id="tip">Tip</h2>
<p>Use <a href="https://regex101.com" target="_blank" rel="noopener noreffer ">regex101.com</a>
 to test interactively. Always test on real data before deploying.</p>]]></description></item><item><title>Understanding Git Rebase vs Merge</title><link>https://vindrin.top/posts/git-rebase-vs-merge/</link><pubDate>Tue, 10 Mar 2026 00:00:00 +0000</pubDate><author>vindrin@outlook.com (Vindrin)</author><guid>https://vindrin.top/posts/git-rebase-vs-merge/</guid><description><![CDATA[<h1 id="understanding-git-rebase-vs-merge">Understanding Git Rebase vs Merge</h1>
<p>This is the question that confuses every developer at some point. Let&rsquo;s settle it.</p>
<h2 id="merge">Merge</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git checkout main
</span></span><span class="line"><span class="cl">git merge feature-branch</span></span></code></pre></div></div>
<p>Creates a <strong>merge commit</strong>. History shows exactly what happened: two branches joined at a point. Safe for shared branches.</p>
<h2 id="rebase">Rebase</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git checkout feature-branch
</span></span><span class="line"><span class="cl">git rebase main</span></span></code></pre></div></div>
<p>Rewrites your commits on top of <code>main</code>. History looks <strong>linear</strong> — as if you started the feature after main was updated.</p>]]></description></item><item><title>Python Virtual Environments Explained</title><link>https://vindrin.top/posts/python-venv-guide/</link><pubDate>Tue, 03 Feb 2026 00:00:00 +0000</pubDate><author>vindrin@outlook.com (Vindrin)</author><guid>https://vindrin.top/posts/python-venv-guide/</guid><description><![CDATA[<h1 id="python-virtual-environments-explained">Python Virtual Environments Explained</h1>
<p>If you&rsquo;ve ever broken a project by upgrading a package globally, you need venvs.</p>
<h2 id="what-is-a-venv">What is a venv?</h2>
<p>A virtual environment is an isolated Python installation — it has its own <code>pip</code> and packages, completely separate from your system Python.</p>
<h2 id="creating-one">Creating one</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">python -m venv .venv
</span></span><span class="line"><span class="cl"><span class="nb">source</span> .venv/bin/activate    <span class="c1"># Linux/macOS</span>
</span></span><span class="line"><span class="cl">.venv<span class="se">\S</span>cripts<span class="se">\a</span>ctivate       <span class="c1"># Windows</span></span></span></code></pre></div></div>
<h2 id="installing-packages">Installing packages</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install requests numpy pandas
</span></span><span class="line"><span class="cl">pip freeze &gt; requirements.txt</span></span></code></pre></div></div>
<h2 id="restoring-later">Restoring later</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">python -m venv .venv
</span></span><span class="line"><span class="cl">pip install -r requirements.txt</span></span></code></pre></div></div>
<h2 id="using-with-conda">Using with conda</h2>
<p>If you use conda, each <code>conda create -n myenv python=3.11</code> works the same way — isolated by default.</p>]]></description></item></channel></rss>