Skip to content

Instantly share code, notes, and snippets.

View ghishadow's full-sized avatar
🎯
Focusing

Suraj ghishadow

🎯
Focusing
View GitHub Profile
@ghishadow
ghishadow / mlx_memory.sh
Created December 31, 2025 02:57 — forked from ivanfioravanti/mlx_memory.sh
Script to set MLX memory limits
#!/usr/bin/env bash
# Default values for percentages
DEFAULT_WIRED_LIMIT_PERCENT=85
DEFAULT_WIRED_LWM_PERCENT=75
# Read input parameters or use default values
WIRED_LIMIT_PERCENT=${1:-$DEFAULT_WIRED_LIMIT_PERCENT}
WIRED_LWM_PERCENT=${2:-$DEFAULT_WIRED_LWM_PERCENT}
@ghishadow
ghishadow / dod.md
Created December 17, 2025 04:40 — forked from debasishg/dod.md
Data oriented design, hardware awareness, cache awareness in data structures & algorithms

Performance Engineering, Hardware and cache awareness with algorithm and data structures

  1. Parallel Computing Course - Stanford CS149, Fall 2023
  2. Performance-Aware Programming Series by Casey Muratori
  3. Algorithms for Modern Hardware
  4. Computer Systems: A Programmer's Perspective, 3/E - by Randal E. Bryant and David R. O'Hallaron, Carnegie Mellon University
  5. Performance Engineering Of Software Systems - am MITOCW course
  6. Parallel Programming 2020 by NHR@FAU
  7. Cpu Caches and Why You Care - by Scott Meyers
  8. [Optimizing a ring buffer for throughput](https://rig
@ghishadow
ghishadow / Top_Public_Time_Servers.md
Created November 17, 2025 03:48 — forked from mutin-sa/Top_Public_Time_Servers.md
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@ghishadow
ghishadow / win32_opengl_demo.odin
Created July 5, 2025 14:45 — forked from GrumpyLion/win32_opengl_demo.odin
OpenGL and win32 window creation with Odin
package main
// This is how you can manually initialize a window and OpenGL context on windows, instead of using SDL or GLFW.
// Also renders a colorful quad onto the screen.
// I made this as an exercise and getting into Odin.
// This is my first "complete" odin program, so there's probably much better ways of doing this :D
import "base:runtime"
import "core:fmt"
import "core:c"
@ghishadow
ghishadow / readme.md
Created June 15, 2025 06:01 — forked from unixfox/readme.md
How to get IPv4 connectivity on an IPv6 only VPS

Some hosting providers like scaleway allows to remove the IPv4 from the VPS in order to save 1€/month but doing this will result in losing connectivity to the "IPv4 world".
Or you may have ordered a VPS that only has IPv6 connectivity and you want to access to a resource only accessible from the "IPv4 world".
Here is how to gain your access back to the "IPv4 world".

Change your name servers(s) to DNS64 name servers(s)

Note: You may deploy your own DNS64 & NAT64 server on a separate server by following this tutorial (untested): https://packetpushers.net/nat64-setup-using-tayga/.
Note²: You may find a explanation of what is NAT64 and DNS64 on Wikipedia.

  1. Choose a/multiple DNS64 public server(s) that has/have its own NAT64 public service from this list:
@ghishadow
ghishadow / cpp.std.coroutines.draft.md
Created June 15, 2025 04:03 — forked from MattPD/cpp.std.coroutines.draft.md
C++ links: Coroutines (WIP draft)

Ray Marching in Unity

Javier Salcedo,
Telecom and Graphics Engineer,
Technical artist & producer at Virtual Phenix Games



macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@ghishadow
ghishadow / FlutterEmbedderGLFW.cc
Created March 27, 2025 01:57 — forked from chinmaygarde/FlutterEmbedderGLFW.cc
Flutter Embedder API Example (GLFW with OpenGL)
#include <assert.h>
#include <chrono>
#include <embedder.h>
#include <glfw3.h>
#include <iostream>
static_assert(FLUTTER_ENGINE_VERSION == 1, "");
static const size_t kInitialWindowWidth = 800;
@ghishadow
ghishadow / FAQ.md
Created February 8, 2025 03:59 — forked from ngxson/FAQ.md
convert ARM NEON to WASM SIMD prompt

Why did you do this?

Relax, I only have one Sunday to work on idea, literally my weekend project. So I tried Deepseek to see if it can help. Surprisingly, it works and it saves me another weekend...

What is your setup?

Just chat.deepseek.com (cost = free) with prompts adapted from this gist.

Does it work in one-shot or I have to prompt it multiple times?