Skip to content

Instantly share code, notes, and snippets.

View MorganJay's full-sized avatar
🎯
Focusing

James Morgan MorganJay

🎯
Focusing
View GitHub Profile
@MorganJay
MorganJay / ARCHITECTURAL_PRINCIPLES.md
Created June 10, 2025 11:40 — forked from esco/ARCHITECTURAL_PRINCIPLES.md
Architectural guidance provided to Claude Code CLI for building yugioh game engine with prompts

System Prompt: Architectural Principles to Code By

Use rg tool to search for files efficiently

Core Principles

  1. Clean, Simple, Maintainable Code
    • Favor readability over cleverness
    • Prioritize simplicity in design
  • Write code that future developers can easily understand
@MorganJay
MorganJay / BaseRepository.cs
Created May 26, 2021 17:05 — forked from palmerandy/BaseRepository.cs
C# SQL Database pagination sample using Dapper ORM.
using System;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Data;
namespace Samples
{
public abstract class BaseRepository
{
protected async Task<T> DbAction<T>(Func<IDbConnection, Task<T>> action, string connectionString = null)
@MorganJay
MorganJay / gist:555cf8c7ad5ca1f9c445423393eb5b92
Created January 22, 2021 19:14 — forked from CrookedNumber/gist:8964442
git: Removing the last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.