Skip to content

Instantly share code, notes, and snippets.

View SmallJoker's full-sized avatar

SmallJoker

View GitHub Profile
@SmallJoker
SmallJoker / github_cleanup_notification_window.txt
Last active November 16, 2022 07:40
Clean up the new clutter in the notifications
Filter Rules
==============
Works for:
- AdblockPlus
- ublock origin
- ??
Group by: Repository
cd irrlicht
# Fake installation dir
mkdir -p __output/include
mkdir -p __output/lib/cmake/IrrlichtMt
ln -sf ../../include __output/include/irrlichtmt
cp -f IrrlichtMt*.cmake __output/lib/cmake/IrrlichtMt/
cp -fP lib/Linux/libIrrlichtMt* __output/lib/
cp -fr CMakeFiles/Export/lib/cmake __output/lib/
local ft = {}
ft.__index = ft
function FSTile(w, h)
local self = {}
setmetatable(self, ft)
-- init stuff here
self.containers = {}
self.width = w
self.height = h
@SmallJoker
SmallJoker / v3s16_optimization.cpp
Last active October 1, 2022 07:00
v3s16_optimization.cpp
#include <iostream>
#include <stdint.h>
#include <vector>
#include "vector3d.h"
using u8 = unsigned char;
using s16 = int16_t;
using u16 = uint16_t;
using v3s16 = irr::core::vector3d<s16>;
@SmallJoker
SmallJoker / ptrlock_macro.cpp
Last active December 29, 2023 18:52
C++ RAII mutex locking, bound to userdata
// Auto-unlock wrapper for larger operations
/*
Exmaple usage:
struct MyStruct {
PtrLock<decltype(m_value)> getValues()
{
return PtrLock<decltype(m_value)>(m_lock, &m_value);
}