McGarrah Technical Blog

Posts in category "development"

Kiro IDE + WSL2: Fixing the Agent Shell Execution Layer

Kiro's AI agent can execute shell commands in WSL2, but the execution layer misbehaves without explicit Linux terminal profiles and shell integration. Here's how to fix the garbled output, path mangling, and false error codes.

AI Agent Context Files in Practice: One Repo, Five Agents

I wrote about managing AI context files across multiple agents in theory. Here's how it actually plays out in a real project — a Jellyfin plugin where Kiro, Claude Code, Copilot, Gemini, and Codex all need to know the same things.

AI Coding Agent Context Files: A Reference Guide

A practical reference for the context and rules files used by every major AI coding assistant — Amazon Q, Claude Code, GitHub Copilot, Cursor, Windsurf, Gemini, Cline, Aider, and Kiro.

Generate Git Timesheet from Commit Logs

A Python tool that generates timesheets from git commit history — because your commits are already timestamped and reflect when you were actually working.

ASR with PyTorch

Exploring whether modern PyTorch ASR pipelines expose phoneme-level representations, using Wav2Vec 2.0 to extract and visualize phoneme probabilities from speech.

Python TimeDate functions

I needed a quick understanding of the Python 3.3.0 datetime functionality to do a difference in times across days. Python make it amazingly easy.

import datetime
from datetime import timedelta

# get current timedate
now = datetime.datetime.now()
print "now: " + str(now)
# get one day of time oneday = timedelta(days=1)
# make one day in the future and past
tomorrow = now + oneday
yesterday = now - oneday
print "tomorrow: " + str(tomorrow)
print "yesterday: " + str(yesterday)
# compare times
if now < tomorrow:
  print "now < tomorrow"
elif now > tomorrow:
  print "now > tomorrow"
else:
  print "now must be equal tomorrow"
if now > yesterday:
 print "now > yesterday"
elif now < yesterday:
 print "now < yesterday"
else:
 print "now = yesterday"

The expected results are:

CMD> python time.py
now: 2015-03-19 14:30:31.083000
tomorrow: 2015-03-20 14:30:31.083000
yesterday: 2015-03-18 14:30:31.083000
now < tomorrow
now > yesterday

I hope this helps someone.