Skip to content

Instantly share code, notes, and snippets.

View imgui_io_queue.cpp
// *EDIT* January 2022: this is now part of Dear ImGui 1.87
// See https://github.com/ocornut/imgui/issues/4858
// DRAFT
// [Internal]
enum ImGuiIoEventType
{
View dotgen.py
class DotGenerator(Visitor):
def __init__(self):
super().__init__()
self.lines = []
self.next_id = 0
def make_name(self, node, name=None):
if name is None:
name = "n%d" % self.next_id
self.next_id += 1
@sebbbi
sebbbi / BDF2_integrate_HLSL.txt
Last active Mar 28, 2018
BDF2 integrator in HLSL
View BDF2_integrate_HLSL.txt
void BFD2(inout ParticleSimulationData Particle, float3 Accel)
{
float3 x = Particle.Position;
float3 v = Particle.Velocity;
float3 x1 = Particle.PositionPrev;
float3 v1 = Particle.VelocityPrev;
Particle.Position = (4.0/3.0) * x - (1.0/3.0) * x1 + 1.0 * ((8.0/9.0) * v - (2.0/9.0) * v1 + (4.0/9.0) * TimeStep2 * Accel);
Particle.PositionPrev = x;
@dwilliamson
dwilliamson / Reflection.h
Created Feb 3, 2018
Basic compile-time reflection for C++11
View Reflection.h
#pragma once
#include <typestring/typestring.hh>
namespace rfl
{
// Compile-time data member description
@ChemistAion
ChemistAion / Nodes.cpp
Created Jan 25, 2018
Prototype of standalone node graph editor for ImGui
View Nodes.cpp
// Prototype of standalone node graph editor for ImGui
// Thread: https://github.com/ocornut/imgui/issues/306
//
// This is based on code by:
// @emoon https://gist.github.com/emoon/b8ff4b4ce4f1b43e79f2
// @ocornut https://gist.github.com/ocornut/7e9b3ec566a333d725d4
// @flix01 https://github.com/Flix01/imgui/blob/b248df2df98af13d4b7dbb70c92430afc47a038a/addons/imguinodegrapheditor/imguinodegrapheditor.cpp#L432
#include "Nodes.h"
@Leandros
Leandros / main.c
Last active Dec 3, 2018
Lua C preprocessor
View main.c
/*
* Copyright (c) 2018 Arvid Gerstmann.
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include <stdio.h>
/*lua!
local func = [[
View API Design:Coroutine-APIs.md

API Design: Coroutines APIs (Janurary-2017)

I am currently dealing with a lot of libraries at work. Both third party as well as libraries written or being currently in process of being written by me. I absolutely love writing and working with libraries. Especially if they present or bring me to either a new or different approach to solve a problem. Or at least provide a different view.

Over time I noticed however that quite regulary we had to decide that we cannot use a third party library. Often it is the usual reason.

@jcupitt
jcupitt / danila.cpp
Last active Jun 20, 2016
test vips memory behaviour
View danila.cpp
/* compile with
*
* g++ -g -Wall danila.cpp `pkg-config vips --cflags --libs`
*/
#include <vector>
#include <string>
#include <iostream>
#include <vips/vips.h>
@alirobe
alirobe / reclaimWindows10.ps1
Last active Jan 22, 2022
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
View reclaimWindows10.ps1
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...