Skip to content

Instantly share code, notes, and snippets.

View ghishadow's full-sized avatar
🎯
Focusing

Suraj ghishadow

🎯
Focusing
View GitHub Profile
@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?

@ghishadow
ghishadow / shadcn-flexoki.css
Created January 12, 2025 06:43 — forked from phenomen/shadcn-flexoki.css
Flexoki theme for shadcn/ui and shadcn-svelte
@layer base {
:root {
--flexoki-bg: 48 100% 97%;
--flexoki-bg-2: 51 33% 92%;
--flexoki-ui: 51 21% 88%;
--flexoki-ui-2: 50 14% 83%;
--flexoki-ui-3: 55 10% 79%;
--flexoki-tx: 0 3% 6%;
@ghishadow
ghishadow / shell.nix
Created October 30, 2024 06:14 — forked from abbradar/shell.nix
Nix FHS env for OpenWrt
{ pkgs ? import <nixpkgs> {} }:
let
fixWrapper = pkgs.runCommand "fix-wrapper" {} ''
mkdir -p $out/bin
for i in ${pkgs.gcc.cc}/bin/*-gnu-gcc*; do
ln -s ${pkgs.gcc}/bin/gcc $out/bin/$(basename "$i")
done
for i in ${pkgs.gcc.cc}/bin/*-gnu-{g++,c++}*; do
ln -s ${pkgs.gcc}/bin/g++ $out/bin/$(basename "$i")
  1. Add the RPMFusion repositories (both free and non-free) to the YUM repository directory (/etc/yum.repos.d/):
sudo dnf localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
  1. Install the patched version of FreeType with subpixel rendering enabled:
sudo dnf install -y freetype-freeworld