Skip to content

Instantly share code, notes, and snippets.

@Leenuus
Leenuus / README.md
Last active April 25, 2025 14:45
Display command output in neovim split window

I just implemented a simple but really powerful user command suggested by romainl in lua, running asynchronously using vim.uv API.

In short, this is a command named Redir, which redirect ex command or shell commands stdin/sterr to neovim buffers. So you can view them in split window on the fly.

With Redir, you can do:

  • A good way to inspect your neovim.
" show all your messages in split, I love this one and make it default
@JuanDiegoMontoya
JuanDiegoMontoya / opengl_resource_indexing.md
Last active February 26, 2025 21:23
How to do bindless in OpenGL without blowing your legs off.

The Definitive Guide to Non-Uniform Resource Indexing in OpenGL

Code

For those short on time:

#extension GL_NV_gpu_shader5 : enable
#extension GL_EXT_nonuniform_qualifier : enable

#ifdef GL_EXT_nonuniform_qualifier
#define NonUniformIndex(x) nonuniformEXT(x)
@donaldmunro
donaldmunro / gist:38841d72c65a1c32f2bf83a4a00a2c9a
Created March 5, 2017 13:26
Display/print a GLM mat or vec
#include <glm/gtx/string_cast.hpp>
..
..
glm::mat4 mat;
..
..
std::cout << glm::to_string(mat) << std::endl;
@skeeto
skeeto / jit.c
Last active August 18, 2024 16:51
Basic JIT
/* http://redd.it/2z68di */
#define _BSD_SOURCE // MAP_ANONYMOUS
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/mman.h>
#define PAGE_SIZE 4096
@nicktoumpelis
nicktoumpelis / repo-rinse.sh
Created April 23, 2014 13:00
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@yoggy
yoggy / midi_in_sample.cpp
Created December 16, 2011 08:46
MIDI-in sample program for Win32 (using winmm.lib)
#include <SDKDDKVer.h>
#include <Windows.h>
#include <stdio.h>
#include <conio.h>
#include <mmsystem.h>
#pragma comment(lib, "winmm.lib")
void PrintMidiDevices()