Skip to content

Instantly share code, notes, and snippets.

View KaiserKatze's full-sized avatar
🎯
Focusing

KaiserKatze KaiserKatze

🎯
Focusing
  • MiGo Future Tech Group
  • Chongqing, China
View GitHub Profile
@KaiserKatze
KaiserKatze / AutoTrunc.cpp
Last active December 6, 2020 03:51
C++ Meta Programming Examples
#include <iostream>
#include <type_traits>
#include <atomic>
// Truncate larger integers into smaller ones
template <typename TargetType, typename Integer,
std::enable_if_t<std::conjunction_v<std::is_integral<Integer>, std::is_integral<TargetType>>, int> = 0>
constexpr inline TargetType AutoTrunc(Integer value)
{
@mrliptontea
mrliptontea / sublime-text-3-windows-shortcuts.md
Last active November 26, 2024 00:41 — forked from TheShrike/gist:6111200
Sublime Text 3 - Useful Shortcuts (Windows)

Sublime Text 3 - Useful Shortcuts (Windows)

General

Shortcut Description
Ctrl+Shift+P command prompt
Ctrl+Alt+P switch project
Ctrl+P go to file
Ctrl+G go to line
@tylerneylon
tylerneylon / json.lua
Last active March 31, 2025 01:08
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.