Skip to content

Instantly share code, notes, and snippets.

View jreuben11's full-sized avatar

Josh Reuben jreuben11

View GitHub Profile
@jreuben11
jreuben11 / kvm-ai-optimization.md
Last active August 29, 2025 09:38
Optimizing KVM config with AI

Supercharging KVM Performance: A Deep Technical Dive into Virtual Machine Optimization with AI Assistance

When my KVM virtual machines started feeling sluggish despite running on a powerful 13th Gen Intel i9-13980HX laptop with 64GB of RAM and dual NVMe SSDs, I knew something was fundamentally wrong. VMs that should have been snappy were crawling, boot times were painfully slow, and the overall user experience was far from the near-native performance KVM is renowned for. Rather than spending days diving into documentation and forums, I decided to try something different: I enlisted Claude, Anthropic's AI assistant, to help me systematically diagnose and optimize my virtualization setup. What followed was a fascinating journey through the depths of Linux virtualization that resulted in dramatic performance improvements and a comprehensive optimization framework.

Understanding the Complexity: The KVM Ecosystem

Before diving into the optimization process, it's crucial to understand the intricate ecosyste

@jreuben11
jreuben11 / README.md
Created February 1, 2021 11:02 — forked from danisla/README.md
GKE GPU Sharing Daemonset

GPU Sharing on GKE DaemonSet

NOTE: This is not a Google supported product.

Example Usage

  1. Create a GKE cluster with a GPU node pool:
gcloud container clusters create gpu-sharing-demo --zone us-central1-c
@jreuben11
jreuben11 / README.md
Created April 21, 2019 08:54 — forked from subfuzion/README.md
vim/neovim configuration

I recently switched over to neovim (see my screenshots at the bottom). Below is my updated config file.

It's currently synchronized with my .vimrc config except for a block of neovim-specific terminal key mappings.

This is still a work in progress (everyone's own config is always a labor of love), but I'm already extremely pleased with how well this is working for me with neovim. While terminal mode isn't enough to make me stop using tmux, it is quite good and I like having it since it simplifies my documentation workflow for yanking terminal output to paste in a markdown buffer.

These days I primarily develop in Go. I'm super thrilled and grateful for fatih/vim-go,

@jreuben11
jreuben11 / gcp_guidance.md
Last active November 13, 2018 03:09
GCP Cloud Architecture

Core

IaaS / PaaS

@jreuben11
jreuben11 / graph_theory_concepts.md
Created October 24, 2018 09:34
Graph Theory Concepts

Graph Theory Concepts

@jreuben11
jreuben11 / skleanr_quickref.md
Created April 21, 2018 06:43
sklearn quickref

Scikit Learn

  • supports numpy array, scipy sparse matrix, pandas dataframe.
  • Estimator - learns from data: can be a classification, regression , clustering that extracts/filters useful features from raw data - implements set_params, fit(X,y), predict(T) , score (judge the quality of fit / predict), predict_proba (confidence level)
  • Transformer - transform (reduce dimensionality)/ inverse_transform, - clean (sklearn.preprocessing), reduce dimensions (sklearn.unsupervised _reduction), expand (sklearn.kernel_approximation) or generate feature representations (sklearn.feature_extraction).

sklearn.cluster

properties: labels_, cluster_centers_. distance metrics - maximize distance between samples in different classes, and minimizes it within each class: Euclidean distance (l2), Manhattan distance (l1) - good for sparse features, cosine distance - invariant to global scalings, or any precomputed affinity matrix.

  • dbscan - deterministicly separate areas of high density from
@jreuben11
jreuben11 / C++_quickref.md
Last active October 12, 2023 20:31
C++11 in a nutshell

C++11 in a nutshell

Modern C++ Coding Style

This post is based upon the standard - not supported with VC compiler ! Try these techniques using GCC / LLVM compilers and QtCreator / CLion IDEs

Avoid C programming style idioms

  • = rather than strcpy() for copying , == rather than strcmp() for comparing
  • use const , constexpr functions rather than #DEFINE, macros
  • Avoid void*, union, and raw casts (use static_cast instead)
  • use std:string instead of char*
private static void jCodeModelGen(Map<String, Class<?>> mapping, String className) {
try {
int version = 10;
JCodeModel codeModel = new JCodeModel();
JPackage codeModel_Package = codeModel._package("com.example.pb");
if (className == null || className.trim().length() == 0) {
className = "Generated" + String.valueOf(version);
}

#Redis Commands

##Generic Commands

  • DEL key [key …] - Delete a key
  • DUMP key - Return a serialized version of value stored at specified key
  • EXISTS key - Determine if a key exists
  • EXPIRE key seconds - Set a key's time to live in seconds
  • EXPIREAT key timestamp - Set expiration for a key as a UNIX timestamp
  • KEYS pattern - Find all keys matching given pattern
  • MIGRATE host port key destination-db timeout - Atomically transfer a key from a Redis instance to another one