Skip to content

Instantly share code, notes, and snippets.

View mrk-han's full-sized avatar
💭
Coding

Mark Han mrk-han

💭
Coding
  • Charlottesville, VA
  • 09:37 (UTC -05:00)
  • X @markhan_
View GitHub Profile
import re
import subprocess
import argparse
def get_repo():
"""Fetches the GitHub repository details from the current branch."""
result = subprocess.run("git config --get remote.origin.url", shell=True, capture_output=True, text=True)
if result.returncode != 0:
print("Error fetching repository details:", result.stderr)
exit(1)
@aashari
aashari / 00 - Cursor AI Prompting Rules.md
Last active December 6, 2025 05:21
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

The Autonomous Agent Prompting Framework

This repository contains a disciplined, evidence-first prompting framework designed to elevate an Agentic AI from a simple command executor to an Autonomous Principal Engineer.

The philosophy is simple: Autonomy through discipline. Trust through verification.

This framework is not just a collection of prompts; it is a complete operational system for managing AI agents. It enforces a rigorous workflow of reconnaissance, planning, safe execution, and self-improvement, ensuring every action the agent takes is deliberate, verifiable, and aligned with senior engineering best practices.

I also have Claude Code prompting for your reference: https://gist.github.com/aashari/1c38e8c7766b5ba81c3a0d4d124a2f58

@majirosstefan
majirosstefan / boot_iOS_simulator.sh
Created September 19, 2021 10:01
booting iOS Simulator in Appcenter build pipeline (part of blog post at stefan-majiros.com)
GRACE_TIME=80
APP_ID=org.stefanmajiros.bluepass.prod
echo "Setup iOS Simulator"
echo "Installing iOS Simulator dependencies"
brew tap wix/brew
brew update
brew install applesimutils
echo "Installing pods"
cd ./ios && /usr/local/lib/ruby/gems/2.7.0/bin/pod install --repo-update && cd ..
@badsyntax
badsyntax / android-emulator-setup.yml
Created August 4, 2021 12:39
Setup the android emulator on Azure Devops Pipelines
# NOTE: must be run on a MacOS Agent!
steps:
- script: |
# Install AVD files
yes | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-29;default;x86_64'
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses
# Create emulator
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n Pixel_API_29_AOSP -d pixel --package 'system-images;android-29;default;x86_64' --force
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active December 4, 2025 02:23
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@DreamingInBinary
DreamingInBinary / Best in Class iOS Checklist
Last active November 28, 2025 11:42
This is a public checklist updated every year after the latest version of iOS and iPadOS are shipped. It's a boiled down version of a "Best in Class" app checklist created by Jordan Morgan.
# A Best in Class Checklist
A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10.
> To use this, create a Github Issue in your own repo, and simply copy and paste this text.
## iOS Core Technology
_Things any iOS app can benefit from_
- [ ] iCloud Sync
- [ ] Focus Filter Support
@Grohden
Grohden / detox-run-android.yml
Created March 19, 2020 16:37
Azure devops detox run tests for ios and android
trigger:
- none
pool:
vmImage: 'ubuntu-latest'
variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
GRADLE_USER_HOME: $(Pipeline.Workspace)/.gradle
@DylanLacey
DylanLacey / TestBase.js
Created February 20, 2020 03:23
TestNG WebDriver Session Cleanup Code
/**
* Simple TestNG test which demonstrates being instantiated via a DataProvider in order to supply multiple browser combinations.
*
* @authors Neil Manvar, Dylan Lacey
*/
public class TestBase {
// SNIP
/**
package com.example
import android.app.Instrumentation
import android.os.Bundle
import android.util.Log
import androidx.test.internal.runner.listener.InstrumentationResultPrinter
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.runner.Description
import org.junit.runner.notification.RunListener
@seeliang
seeliang / lint-only-changed-files.MD
Last active December 2, 2024 05:08
How to lint only changed files?

find out the differences

use git diff to generate file list

git diff --name-only master

limited to certain file types

add ext filter