Skip to content

Instantly share code, notes, and snippets.

View meshula's full-sized avatar
💭
Exploring liminal spaces

Nick Porcino meshula

💭
Exploring liminal spaces
View GitHub Profile
#pragma once
/*
// Example use on Windows with links opening in a browser
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include "Shellapi.h"
inline void LinkCallback( const char* link_, uint32_t linkLength_ )
@meshula
meshula / NodeGraph.cpp
Created December 13, 2018 21:09 — forked from spacechase0/NodeGraph.cpp
ImGui node graph
#include <any>
#include <cmath>
#include <imgui.h>
#include <imgui_internal.h>
#include "NodeGraph.hpp"
namespace
{
--- labfx version 1.0
name: Deferred Example
version: 1.0
--------------------------------------------------------------------------------
buffer: gbuffer
from os import walk
import os, errno
import subprocess
sevenzip="7z.exe"
src="C:/Downloads/UnzippedRPMDirectory"
dir = os.getcwd()
files = []
@meshula
meshula / Landru.md
Last active July 4, 2024 02:17
Landru tutorial

Landru is a reactive state machine oriented scripting language.

It was developed as a teaching aid for a game programming class for children. It turns out that it's really handy for rapidly prototyping games and interfaces.

Landru is compiled, either to byte code, or vectors of C++ lambdas.

Comments are C++ style.

int main()
{
uint64_t test_hours = 2;
uint64_t test_minutes = 43;
uint64_t test_seconds = 32;
uint64_t test_frames = 3;
std::cout << "EXPECTED: " << test_hours << ":" << test_minutes << ":" << test_seconds << ":" << test_frames << std::endl;
double hr_ms = test_hours * 60 * 60 * 1000;
@meshula
meshula / file.cmake
Last active January 8, 2019 01:08
cmake namespaced import libraries
# iOS tool chain. there is an android one as well
# https://github.com/SFML/SFML/blob/master/cmake/toolchains/iOS.toolchain.cmake
if(FANCY_FOUND)
add_library(Fancy::Base STATIC IMPORTED)
set_target_properties(Fancy::Base PROPERTIES IMPORTED_CONFIGURATIONS "Debug;Release")
set_target_properties(Fancy::Base PROPERTIES IMPORTED_LOCATION_RELEASE ${Fancy_LIBRARIES})
set_target_properties(Fancy::Base PROPERTIES IMPORTED_LOCATION_DEBUG ${Fancy_DEBUG_LIBRARIES})
@meshula
meshula / 3d-formats.md
Last active March 30, 2022 18:45
3d file formats, last mile vs. interchange
@meshula
meshula / .minttyrc
Created April 17, 2018 22:50
git bash shell colors that are actually visible. put .minttyrc in the bash shell home directory
BoldBlack=128,128,128
Red=255,64,40
BoldRed=255,128,64
Green=64,200,64
BoldGreen=64,255,64
Yellow=190,190,0
BoldYellow=255,255,64
Blue=0,128,255
BoldBlue=128,160,255
Magenta=200,64,255
@meshula
meshula / cpp14.cpp
Created March 26, 2018 20:30
C++14 & greater
// Convert a timepoint to seconds
MyTimePoint tp = whatever();
double x = std::chrono::time_point_cast<std::chrono::duration<double>>(tp).time_since_epoch().count();