<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Antony Nyagah</title>
    <description>The latest articles on DEV Community by Antony Nyagah (@tonynyagah).</description>
    <link>https://dev.to/tonynyagah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F987887%2F00507376-7b88-4112-947f-b984f395562a.jpeg</url>
      <title>DEV Community: Antony Nyagah</title>
      <link>https://dev.to/tonynyagah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tonynyagah"/>
    <language>en</language>
    <item>
      <title>How I Built a Real-Time DDoS Detection Engine That Learns What Normal Looks Like</title>
      <dc:creator>Antony Nyagah</dc:creator>
      <pubDate>Wed, 29 Apr 2026 22:56:24 +0000</pubDate>
      <link>https://dev.to/tonynyagah/how-i-built-a-real-time-ddos-detection-engine-that-learns-what-normal-looks-like-2fei</link>
      <guid>https://dev.to/tonynyagah/how-i-built-a-real-time-ddos-detection-engine-that-learns-what-normal-looks-like-2fei</guid>
      <description>&lt;p&gt;Imagine your web server suddenly starts getting hammered by thousands of requests from one IP address. Without any protection, your server slows down, legitimate users get blocked out, and you have no idea it's even happening until it's too late. That's the problem I set out to solve by building a real-time anomaly detection engine alongside a Nextcloud server. The tool watches every single HTTP request coming through Nginx, learns what "normal" traffic looks like over time, and automatically blocks attackers using iptables — the Linux firewall built into every server. No third-party tools, no Fail2Ban, just pure detection logic built from scratch in Python.&lt;/p&gt;

&lt;p&gt;The core of the system is two ideas working together: a sliding window and a rolling baseline. The sliding window is a Python &lt;code&gt;deque&lt;/code&gt; that holds the timestamps of every request in the last 60 seconds — one per IP, one globally. When a new request arrives, its timestamp is added to the back; anything older than 60 seconds is evicted from the front. Dividing the count by 60 gives the current requests-per-second rate. The baseline is a 30-minute rolling average of per-second rates, recalculated every 60 seconds, with separate slots for each hour of the day so the system knows that midnight traffic is naturally lighter than noon. When a new request comes in, the detector computes a z-score: &lt;code&gt;(current_rate - mean) / stddev&lt;/code&gt;. If that score exceeds 3.0, or the rate is more than 5 times the baseline mean, the IP is flagged as an attacker. The response is immediate — the system runs &lt;code&gt;iptables -I INPUT -s &amp;lt;attacker_ip&amp;gt; -j DROP&lt;/code&gt;, which tells the Linux kernel to silently drop every packet from that IP at the network level, before it even reaches the application. A Slack alert fires within seconds, and the ban is automatically lifted on a backoff schedule: 10 minutes for the first offense, 30 minutes for the second, 2 hours for the third, and permanent after that.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>linux</category>
      <category>monitoring</category>
      <category>python</category>
    </item>
    <item>
      <title>How to Leverage Git and AI to View Your Achievements as a Developer</title>
      <dc:creator>Antony Nyagah</dc:creator>
      <pubDate>Wed, 30 Oct 2024 11:00:00 +0000</pubDate>
      <link>https://dev.to/tonynyagah/how-to-leverage-git-and-ai-to-view-your-achievements-as-a-developer-26f2</link>
      <guid>https://dev.to/tonynyagah/how-to-leverage-git-and-ai-to-view-your-achievements-as-a-developer-26f2</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As developers, we often move from one task to the next without much time to reflect. But periodically assessing what you’ve accomplished can be a great motivator and help you communicate your value to teams, managers, or potential employers. &lt;br&gt;
Here’s a simple approach to using your Git commit history to track your achievements over time, with the help of AI to make sense of it all.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 1: Filter Your Git Logs
&lt;/h2&gt;

&lt;p&gt;The first step is to look back at your commits over the past year (or a specific timeframe). Git makes it easy to search through your history by date and author. This command will give you a list of commits from the past year, authored by you:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git log &lt;span class="nt"&gt;--since&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"1 year ago"&lt;/span&gt; &lt;span class="nt"&gt;--author&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_email@example.com"&lt;/span&gt; &lt;span class="nt"&gt;--pretty&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;format:&lt;span class="s2"&gt;"%h - %an, %ar : %s"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s a breakdown of this command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--since="1 year ago"&lt;/code&gt; limits results to commits from the past year.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--author="your_email@example.com"&lt;/code&gt; filters commits to only those you made.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--pretty=format:"%h - %an, %ar : %s"&lt;/code&gt; displays commit hash, author, relative date, and message.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's an example of what my logs looked like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8abe2e3 - Antony Nyagah, 5 days ago : feat(dashboard/*): add link for downloading packaging list
0409dac - Antony Nyagah, 5 days ago : feat(dashboard/*): add a link for downloading delivery notes from the frontend
0c199f9 - Antony Nyagah, 5 days ago : test(api/*): update tests for document_exporter app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Export Your Commit Log
&lt;/h2&gt;

&lt;p&gt;For easier analysis, you can export your commit history to a text file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git log &lt;span class="nt"&gt;--since&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"1 year ago"&lt;/span&gt; &lt;span class="nt"&gt;--author&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_email@example.com"&lt;/span&gt; &lt;span class="nt"&gt;--pretty&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;format:&lt;span class="s2"&gt;"%h - %an, %ar : %s"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; commit_log.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Leverage AI for a Detailed Analysis
&lt;/h2&gt;

&lt;p&gt;After exporting the commit log, I pasted the commits into ChatGPT(you can use any number of AI tool that are out there) to get a detailed summary and insights into the types of tasks I’ve accomplished.&lt;/p&gt;

&lt;p&gt;The prompt I used was "Can you look at these commits and help me come up with a list of my achievements throughout this year?". The prompt itself can be improved 😅&lt;/p&gt;

&lt;p&gt;This helped me uncover trends and group my work into categories like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Infrastructure &amp;amp; CI/CD Enhancements&lt;/li&gt;
&lt;li&gt;Frontend Development &amp;amp; Refactoring&lt;/li&gt;
&lt;li&gt;Backend API Development &amp;amp; Maintenance&lt;/li&gt;
&lt;li&gt;Database and Data Handling Improvements&lt;/li&gt;
&lt;li&gt;Testing and Code Quality&lt;/li&gt;
&lt;li&gt;Documentation &amp;amp; Project Management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ChatGPT’s analysis made it easy to see where I added value and what skills I honed over the past year, even bringing out details I might have overlooked. By using AI this way, you can turn your commit log into a meaningful narrative about your contributions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Keeping Commit Messages Meaningful
&lt;/h2&gt;

&lt;p&gt;To make sure my commit messages are succinct and relevant, I personally use &lt;a href="https://commitizen-tools.github.io/commitizen/" rel="noopener noreferrer"&gt;Commitizen&lt;/a&gt;. This tool helps maintain consistency by following a commit message convention that describes the "why" and "what" of each change.&lt;/p&gt;

&lt;p&gt;Meaningful commit messages make logs easier to review, and there are other specifications and tools like &lt;a href="https://www.conventionalcommits.org/" rel="noopener noreferrer"&gt;Conventional Commits&lt;/a&gt; and &lt;a href="https://typicode.github.io/husky/" rel="noopener noreferrer"&gt;Husky&lt;/a&gt; that can also keep your commit history clean and purposeful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Summarize and Reflect
&lt;/h2&gt;

&lt;p&gt;Reviewing your contributions with AI insights can be both motivating and insightful. Write a brief summary for each category. This can serve as a reference for future performance reviews, portfolio updates, or simply as a reminder of your growth as a developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Using Git as a reflection tool is quick but effective. And with the added support of AI, you can see the big picture more clearly, connecting technical achievements with your overall development. Keep this record for yourself or share it in your performance reviews or job applications.&lt;/p&gt;

</description>
      <category>git</category>
      <category>ai</category>
      <category>codequality</category>
      <category>career</category>
    </item>
  </channel>
</rss>
