Skip to content

Instantly share code, notes, and snippets.

View thennequin's full-sized avatar

Thibault Hennequin thennequin

  • Kylotonn
  • Paris, France
View GitHub Profile
@thennequin
thennequin / _MonocypherExemple.c
Last active April 1, 2021 15:37
MonocypherExemple
#include "monocypher.h"
#include "base64.h"
#include <stdlib.h>
void main()
{
uint8_t pMasterPrivateKey[32];
uint8_t pMasterPublicKey[32];
@thennequin
thennequin / opus.c
Created March 9, 2021 22:30 — forked from crypticsea/opus.c
opus build
// cl /I celt /I silk /I silk/float /I include /c opus.c
// lib opus.obj
#define OPUS_CPU_X64
#define USE_ALLOCA
#define OPUS_BUILD
#include "celt/bands.c"
#include "celt/celt.c"
#include "celt/celt_encoder.c"
@thennequin
thennequin / IniFile.cs
Last active July 11, 2018 14:34
IniFile.cs
/*
Usage:
struct MyStruct
{
public string MyString { get; set; } = "this is my value";
public int MyInt { get; set; } = 42;
public bool MyBool { get; set; } = true;
}
@thennequin
thennequin / RectPacker.cs
Last active July 11, 2018 15:01
RectPacker
using System.Drawing;
using System.Drawing.Drawing2D;
using FastBitmap;
using System;
using System.Collections.Generic;
namespace SkinsetGenerator
{
public abstract class RectPacker
{
@thennequin
thennequin / Exemple.cpp
Last active August 12, 2021 02:04
ImGui scrollable columns with header
///////////////////////////////
// Exemple
///////////////////////////////
Core::ImGuiPlus::StackId oStackId( "Columns" );
ImGui::Columns( 3 );
ImGui::Text( "Header1" );
ImGui::NextColumn();
ImGui::Text( "Header2" );
@thennequin
thennequin / sokol_gfx_plus.h
Last active April 8, 2018 21:13
sokol_gfx_plus.h
#include "sokol_gfx.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
Return size of image mip level in bytes
*/
@thennequin
thennequin / vulkan_util.h
Created March 29, 2018 22:21
vulkan_util.h
/*
Need implementation, use:
#define VULKAN_UTILS_IMPLEMENT
*/
#include <vulkan/vulkan.h>
VkResult vkFindBestPhysicalDevice(VkInstance vkInstance, VkSurfaceKHR vkSurface, VkPhysicalDevice* pOutVkPhysicalDevice, int* pOutVkPhysicalDeviceScore);
//////////////////////////////////
@thennequin
thennequin / PieMenu.cpp
Last active September 5, 2024 14:43
PieMenuAdv
struct PieMenuContext
{
static const int c_iMaxPieMenuStack = 8;
static const int c_iMaxPieItemCount = 12;
static const int c_iRadiusEmpty = 30;
static const int c_iRadiusMin = 30;
static const int c_iMinItemCount = 3;
static const int c_iMinItemCountPerLevel = 3;
struct PieMenu
@thennequin
thennequin / keybase.md
Created November 9, 2017 23:20
keybase.md

Keybase proof

I hereby claim:

  • I am thennequin on github.
  • I am thennequin (https://keybase.io/thennequin) on keybase.
  • I have a public key ASCFW6n8BxTAmHR_GJh7Cbnm22clQwsORXYPCrcSvc1Skwo

To claim this, I am signing this object:

int BeginCombo(const char* pLabel, const char* pValue)
{
ImGuiWindow* pWindow = ImGui::GetCurrentWindow();
ImGuiState& oState = *GImGui;
const ImGuiStyle& oStyle = oState.Style;
const ImGuiID oId = pWindow->GetID(pLabel);
const float fWidth = ImGui::CalcItemWidth();
const ImVec2 oLabelSize = ImGui::CalcTextSize(pLabel, NULL, true);