Skip to content

Instantly share code, notes, and snippets.

View drawcode's full-sized avatar
😎
Shipping product

Ryan Christensen drawcode

😎
Shipping product
View GitHub Profile
@drawcode
drawcode / context-manage.md
Last active June 15, 2026 22:33
context-manage.md

Context Manage

Situation: thread solved some things and I no longer need the full context and you don't want to trust compact from a platform that is incentivized to get you to spend -- compact and transfer context your own way where you can see what is included

Ask the thread to create a context prompt to that you want to transfer to a new thread

Simple (works for most things)

"Make me a context prompt that I can use to transfer to another window to resetup context based on all learnings on this so far"

@drawcode
drawcode / skill-unreal-performance-checklist.md
Last active June 12, 2026 20:19
skill-unreal-performance-checklist.md
title Unreal Engine Performance Guidelines
author CodeGameDevCommon
type skill-file
tags
unreal-engine
performance
optimization
cpu
gpu
profiling
best-practices
version 1.0.0
description A comprehensive checklist and guide for diagnosing and fixing performance bottlenecks in Unreal Engine, structured for both developers and AI workhorse models.

tldr; Before you optimize anything in Unreal Engine, find out exactly what is slowing you down by using stat unit. Figure out if you are Game Thread (CPU) bound, Draw Thread (CPU) bound, or GPU bound. Once identified, ruthlessly eliminate Blueprint Ticks, leverage Nanite/Instanced Meshes for draw calls, keep shaders green in Shader Complexity mode, and always use Soft References for asset loading to avoid memory bloat. Keep it simple, use built-in tools, and profile often!

@drawcode
drawcode / maui-performance-checklist.md
Last active December 20, 2025 07:12
MAUI Performance Checklist

.NET MAUI High-Performance & Multi-Platform Checklist

🚀 1. Startup & Architecture

  • Lazy Service Resolution: Defer instantiation of heavy services to improve initial app responsiveness.
// MauiProgram.cs registration
builder.Services.AddTransient<HeavyService>();
builder.Services.AddTransient<Lazy<IHeavyService>>(p => 
    new Lazy<IHeavyService>(() => p.GetRequiredService<HeavyService>()));
@drawcode
drawcode / .editorconfig
Created September 4, 2025 19:51
.editorconfig
# top-most EditorConfig file
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
@drawcode
drawcode / unity-performance-checklist-cpu-gpu-bound.md
Last active June 2, 2026 23:17
Unity Performance Checklist for CPU + GPU Bound Cases
@drawcode
drawcode / RegexReplace.cpp
Created April 21, 2025 20:45
RegexrReplace w/o C++20
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <functional>
/// @brief Replaces occurrences of a regular expression pattern in a string with a replacement string.
///
/// @param input The string to search in.
/// @param pattern The regular expression pattern to match.
@drawcode
drawcode / cplusplus_version.cpp
Last active April 21, 2025 18:14
C++ version check
// create basic cplusplus main
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
@drawcode
drawcode / CaseMatcher.kt
Created March 15, 2025 04:23 — forked from SuppieRK/CaseMatcher.kt
Regular expressions for case matching
/**
* Different case matchers
*
* @see <a href="https://en.wikipedia.org/wiki/Naming_convention_(programming)#Examples_of_multiple-word_identifier_formats">Examples of multiple word identifier formats</
*/
sealed class CaseMatcher(private val regex: Regex) {
open fun notMatches(source: String?): Boolean {
return !matches(source)
}
@drawcode
drawcode / latency.txt
Created January 13, 2025 04:20 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.