Skip to content

Instantly share code, notes, and snippets.

View Gnimuc's full-sized avatar
🍤

Yupei Qi Gnimuc

🍤
  • Tokyo
  • 09:48 (UTC +09:00)
  • X @Gnimuc
View GitHub Profile
@Gnimuc
Gnimuc / imgui_node_graph_test.cpp
Created March 1, 2019 07:53 — forked from ocornut/imgui_node_graph_test.cpp
Node graph editor basic demo for ImGui
// Creating a node graph editor for ImGui
// Quick demo, not production code! This is more of a demo of how to use ImGui to create custom stuff.
// Better version by @daniel_collin here https://gist.github.com/emoon/b8ff4b4ce4f1b43e79f2
// See https://github.com/ocornut/imgui/issues/306
// v0.03: fixed grid offset issue, inverted sign of 'scrolling'
// Animated gif: https://cloud.githubusercontent.com/assets/8225057/9472357/c0263c04-4b4c-11e5-9fdf-2cd4f33f6582.gif
#include <math.h> // fmodf
// NB: You can use math functions/operators on ImVec2 if you #define IMGUI_DEFINE_MATH_OPERATORS and #include "imgui_internal.h"
@Gnimuc
Gnimuc / Makefile
Created July 14, 2019 12:25 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@Gnimuc
Gnimuc / console.c
Created September 7, 2020 05:29 — forked from durango/console.c
Basic gamepad controlled UI
/*
Copyright (c) 2016 Micha Mettke
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
@Gnimuc
Gnimuc / github-clear-notifications.py
Created June 20, 2023 11:41 — forked from airtower-luna/github-clear-notifications.py
Mark GitHub notifications as read
import json
import os
import requests
from datetime import datetime, timezone
NOTIFICATIONS = 'https://api.github.com/notifications'
token = os.environ['GH_TOKEN']
s = requests.Session()
s.headers.update({
@Gnimuc
Gnimuc / InfiniteGrid.shader
Created January 20, 2024 05:11 — forked from bgolus/InfiniteGrid.shader
Infinite Grid shader with procedural grid with configurable divisions and major and minor lines markings.
Shader "Unlit/InfiniteGrid"
{
Properties
{
[Toggle] _WorldUV ("Use World Space UV", Float) = 1.0
_GridScale ("Grid Scale", Float) = 1.0
_GridBias ("Grid Bias", Float) = 0.5
_GridDiv ("Grid Divisions", Float) = 10.0
_BaseColor ("Base Color", Color) = (0,0,0,1)
_LineColor ("Line Color", Color) = (1,1,1,1)