Skip to content

Instantly share code, notes, and snippets.

@mohits
mohits / gist:555f599759a15062ea6f5b7976a4d9c7
Created May 22, 2026 12:41
Removing Dropbox from Windows Contex
-- Please use with care
-- Find me: x.com/onghu | https://ruby.social/@onghu | https://bsky.app/profile/onghu.com
Cleaning up the Shell Menu/ Shell Extension Menu
- https://www.nirsoft.net/utils/shell_menu_view.html
- https://www.nirsoft.net/utils/shexview.html
Download and unzip to d:\apps\sys_utils
Disabled:
- DropboxCopyHook Class Yes Copy Hook Handler Dropbox Shell Extension 1.0.77.0 Dropbox Dropbox, Inc. No No No No No No C:\Program Files (x86)\Dropbox\Client\DropboxExt64.77.0.dll {FBC9D74C-AF55-4309-9FB2-C426E071637F} 2024-12-26 7:10:11 PM 2024-12-26 7:10:12 PM No Directory AC 466,320 No No
- ContextMenuHandler Class Yes Context Menu Dropbox Shell Extension 1.0.77.0 Dropbox Dropbox, Inc. No No No No No No C:\Program Files (x86)\Dropbox\Client\DropboxExt64.77.0.dll {ECD97DE5-3C8F-4ACB-AEEE-CCAB78F7711C} 2024-12-26 7:10:11 PM 2024-12-26 7:10:12 PM No Directory\Background, *, .lnk, Directory, lnkfile AC 466,320 No No
@karpathy
karpathy / microgpt.py
Last active October 10, 2026 13:37
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@lhecker
lhecker / README.md
Last active September 9, 2026 20:34
DirectWrite for ImGui

DirectWrite for ImGui

This is a DirectWrite font loader for ImGui v1.92.9b. It uses C++23 and may need some slight adjustments to fit your needs.

Usage

ImGui::GetIO().Fonts->SetFontLoader(ImDWriteCreateFontLoader());
ImDWriteAddFontFamily(ImGui::GetIO().Fonts, "Segoe UI");
@vurtun
vurtun / sort.c
Last active January 11, 2023 15:22
// ref: http://www.codercorner.com/RadixSortRevisited.htm
// http://stereopsis.com/radix.html
// int/float: https://github.com/lshamis/FloatRadixSort
// string: https://github.com/rantala/string-sorting/blob/master/src/msd_ce.cpp
struct str {
const char *str;
const char *end;
int len;
};
@Flix01
Flix01 / imgui_virtual_keyboard.cpp
Last active February 5, 2026 23:19
Complete keyboard prototype for Dear ImGui version 1.87.
/* This code is an extension of the 'keyboard section' present in 'imgui_demo.cpp'.
License is the same (MIT License AFAIK)
*/
#include <imgui_virtual_keyboard.h>
namespace ImGui {
// VirtualKeyboard Implementation
const char** GetKeyboardLogicalLayoutNames() {
@nem0
nem0 / imgui_treeview_clipper.cpp
Last active January 9, 2022 14:44
Simple treeview clipper for imgui
// only handles coplexity on top level, if you have a node with 1M children, you are out of luck
// changes in clipped parts are not detected, so if somebody deleted nodes in clipped, scrollbar is not updated until user actually scrolls
// scrolling and changes refresh the clipper == that part is as slow as no clipping at all
// only single list in BeginChild/EndChild is tested
struct TreeViewClipper {
// persist
float cursor_end = 0;
float cursor_visible_start = 0;
uint first_visible_index = 0;
float last_scroll = 0;
// CC0
#define IMGUI_DEFINE_MATH_OPERATORS
#include <imgui_internal.h>
#define isdigit(c) (c >= '0' && c <= '9')
namespace ImGui
{
float strToFloat (const char *s) // atof from minilibc
@rokups
rokups / CMakeLists.txt
Last active June 18, 2026 08:40
Dear ImGui CMake build script.
#
# CMake build system for Dear ImGui
# =================================
#
# Build instructions:
# 1. Install latest CMake
# * Windows: https://cmake.org/download/ (Tick checkbox to place cmake in system PATH)
# * Linux: from your favorite package manager
# * MacOS: brew install cmake
# 2. Open command prompt in directory containing "imgui" and "imgui_dev" folders
#pragma once
// String tokenizing iterator
// by Nathan Reed, 2020-08-06. Licensed CC0 https://creativecommons.org/publicdomain/zero/1.0/
//
// Use it like:
//
// for (auto token : IterTokens(" Bird \t\tFish Dog Cat "))
// {
// // token is a std::string_view pointing into the original string
#include <iostream>
#include <assert.h>
#include <vector>
template<class T>
struct Func{};
// std::func replacement without dynamic memory allocation (captures are limited to 48 bytes)
// this could be extended to support captures >48 bytes... of course, with a bit more of logic
// and some state.