Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@darkuranium
darkuranium / winerror.h
Created January 21, 2015 22:40
Patches for MinGW-W64 project
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef _WINERROR_
#define _WINERROR_
#define __IN__WINERROR_ 1
@darkuranium
darkuranium / ProblemMCVE.cpp
Last active May 9, 2017 16:12
Problem MCVE for Urho3D instancing issue
// Enable this to work around the problem.
//#define COMPILE_WORKAROUND
#ifdef _MSC_VER
#pragma warning( disable : 4005 ) // macro redefinition for URHO3D_STATIC_DEFINE and URHO3D_SSE in <Urho3D/Urho3D.h>
#endif
#include <Urho3D/Urho3D.h>
#include <Urho3D/Core/CoreEvents.h>
#include <Urho3D/Engine/Application.h>
#include <Urho3D/Input/Input.h>
@darkuranium
darkuranium / CMakeLists.txt
Last active November 25, 2022 15:48
MCVE for FLECS problem of EcsWith not working properly when used with singletons
cmake_minimum_required(VERSION 3.2)
project(FlecsMCVE LANGUAGES C)
# NOTE: A clone of the FLECS repository (https://github.com/SanderMertens/flecs) is expected to exist in `flecs/`
add_subdirectory(flecs)
add_executable(mcve mcve.c)
target_link_libraries(mcve flecs_static)
#ifndef NANOVG_SOKOL_H
#define NANOVG_SOKOL_H
#ifdef __cplusplus
extern "C" {
#endif
struct sg_image;
// Create flags
@darkuranium
darkuranium / tabs-flex.html
Created March 30, 2024 15:10
Tabbing without JS (HTML + CSS only)
<!DOCTYPE html>
<html>
<!-- Using Flexbox. No need for `position`, but doesn't work with `nowrap`, thus tab headers might wrap. -->
<head>
<meta charset="UTF-8"/>
<title>Tabs Test</title>
<style>
.tabbed {
display: flex;
flex-flow: row wrap;