Skip to content

Instantly share code, notes, and snippets.

View jbltx's full-sized avatar
🔮
Imagining things

Mickael Bonfill jbltx

🔮
Imagining things
View GitHub Profile
@jbltx
jbltx / AssetDatabase.cs
Last active March 28, 2021 01:01
Unity-like Object Reference Resolution with JSON.NET
namespace UnityRuntime
{
class AssetDatabase
{
public static bool Contains(Object obj)
{
// normally we store ids of assets and check obj.id is inside the db.
// for simplicity let say any TaskList is an asset.
return obj is TaskList;
@jbltx
jbltx / UnityWindow.cpp
Last active August 8, 2024 08:22
Unity Window in Qt
#include "UnityWindow.h"
#include <QApplication>
#include <QResizeEvent>
#include <QShowEvent>
#include <QHideEvent>
#include <QFocusEvent>
#include <QMouseEvent>
#include <QFileInfo>
#include <QProcess>
@jbltx
jbltx / ClippedObject.shader
Last active February 18, 2020 02:08
Clipping plane (cross-section) Unity shader
Shader "Unlit/ClippedObject"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
}
SubShader
{
// The shader is semi-transparent
@jbltx
jbltx / MacWindow.h
Last active July 26, 2023 08:28
Custom OSX TitleBar Size with QML
#ifndef MACWINDOW_H
#define MACWINDOW_H
#include <QObject>
class MacWindow : public QObject
{
Q_OBJECT
public:
@jbltx
jbltx / CombineMeshes.cpp
Last active June 10, 2022 10:32
combineMeshes : Combine two FBX meshes together and returns the new one
/*******************************************************************************
CombineMeshes.cpp
Author : Mickael Bonfill (jbltx)
*******************************************************************************/
/**
* @brief Combine two FBX meshes together and returns the new one.
*
* @note The operation doesn't take in account UVs and Texture layers (yet).
@jbltx
jbltx / cloud-storage-win32-keys.ps1
Last active June 28, 2020 07:40
[Research] Cloud Storage Client
# Quick notes about Windows registry keys for cloud storage services like MEGA, Dropbox, OneDrive, etc...
# This is UNTESTED so USE IT AT YOUR OWN RISKS
# CONSTANTS
$UUID_FOLDER = "{$([guid]::NewGuid().Guid)}" # Used to add a 'cloud storage'-like folder in Explorer Pane
$UUID_CONTEXTMENU = "{$([guid]::NewGuid().Guid)}" # Used to add a context-menu, property sheets, etc... on files and folders
$UUID_OVERLAY1 = "{$([guid]::NewGuid().Guid)}" # Used for icon overlay on files' icon
$UUID_OVERLAY2 = "{$([guid]::NewGuid().Guid)}"
$UUID_OVERLAY3 = "{$([guid]::NewGuid().Guid)}"

Keybase proof

I hereby claim:

  • I am jbltx on github.
  • I am jbltx (https://keybase.io/jbltx) on keybase.
  • I have a public key ASBdXwLhckV9ejuFgnLmLc-vxYH0UHVWQE6_s3Mewy6sbAo

To claim this, I am signing this object: