Skip to content

Instantly share code, notes, and snippets.

View Philosoph228's full-sized avatar
🎧
Capital Cities – Safe And Sound

Philosoph228 Philosoph228

🎧
Capital Cities – Safe And Sound
View GitHub Profile
syntax on
set autoindent
set tabstop=4
set shiftwidth=4
set expandtab
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>
@Philosoph228
Philosoph228 / boost_asio_gcc10_coroutines.patch
Created May 21, 2020 16:06
GCC 10 Asio coroutines support for existing Boost release 1.73.0
Index: asio/awaitable.hpp
===================================================================
--- asio/awaitable.hpp 2020-05-21 19:54:51.697328600 +0500
+++ asio/awaitable.hpp 2020-05-21 20:00:17.713715000 +0500
@@ -19,7 +19,12 @@
#if defined(BOOST_ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
-#include <experimental/coroutine>
+#if defined(BOOST_ASIO_HAS_STD_COROUTINE)

windowsx.h message crackers cheatsheet

This will be helpful for implementing own GUI framework

Quick reference table

Message Callback function signature
WM_CREATE BOOL OnCreate(HWND hWnd, LPCREATESTRUCT lpcs);
WM_SIZE void OnSize(HWND hWnd, UINT state, int x, int y);
WM_DESTROY void OnDestroy(HWND hWnd);
WM_PAINT void OnPaint(HWND hWnd);
WM_LBUTTONDOWN void OnLButtonDown(HWND hWnd, BOOL fDoubleClick, int x, int y, UINT keyFlags);
У Хускара нет стана, но с аганимом есть таунт
У Пуджа 1 армор
При игре на керри, когда не можешь участвовать в тимфайте, нужно пушить линию
На войде никогда не межуйся прожимать БКБ в куполе
Керри игра начинается с 30 минуты. До этого фармится лес и линии
@Philosoph228
Philosoph228 / gist:200e525404256c0c19d27da15a49a729
Created May 5, 2023 19:42 — forked from jamesgmarks/gist:56502e46e29a9576b0f5afea3a0f595c
MySQL/MariaDB BIN_TO_UUID and UUID_TO_BIN Polyfill
DELIMITER //
CREATE FUNCTION BIN_TO_UUID(b BINARY(16))
RETURNS CHAR(36)
BEGIN
DECLARE hexStr CHAR(32);
SET hexStr = HEX(b);
RETURN LOWER(CONCAT(
SUBSTR(hexStr, 1, 8), '-',
SUBSTR(hexStr, 9, 4), '-',
@Philosoph228
Philosoph228 / MessageRouter.cpp
Created November 13, 2023 16:20
WinAPI MessageRouter (old)
LRESULT CALLBACK Window::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_CREATE:
OnCreate();
break;
case WM_KEYDOWN:
OnKeyDown(wParam);
break;
@Philosoph228
Philosoph228 / README.md
Last active September 29, 2024 22:10
Build OpenSSL 1.1.1 for MSVC
@Philosoph228
Philosoph228 / dmd2vars32.ps1
Created December 24, 2023 15:13
Set DMD environment in PowerShell
Write-Host ""
Write-Host "Setting up 32-bit environment for using DMD 2 from $PSScriptRoot\dmd2\windows\bin."
$env:PATH = "$PSScriptRoot\dmd2\windows\bin;$env:PATH"
@Philosoph228
Philosoph228 / manifest.md
Last active August 11, 2024 11:21
Visual Studio C/C++ project manifest settings for enabling visual styles for Common Controls V6 and setting assembly identity

Visual Studio C/C++ project manifest settings for enabling visual styles for Common Controls V6 and setting assembly identity

Enabling visual styles for common controls

Project Settings → Configuration Properties → Linker → Manifest File → Additional Manifest Dependencies

type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='$(PROCESSOR_ARCHITECTURE)' publicKeyToken='6595b64144ccf1df' language='*';%(AdditionalManifestDependencies)

Setting assembly identity

Project Settings → Configuration Properties → Manifest Tool → General → Assembly Identity

In the context of the C language (and other languages like C++), SJLJ, DWARF, and SEH are different models of exception handling and unwinding, particularly used in compilers and runtimes.

Here's a breakdown of these exception-handling mechanisms:

1. SJLJ (Setjmp/Longjmp)

  • Full Name: Setjmp/Longjmp exception handling.
  • How It Works: This model is based on the C standard library functions setjmp() and longjmp(). It works by saving the state of the stack and registers in a jmp_buf structure when an exception is expected (via setjmp), and restoring it later when an exception is thrown (via longjmp).
  • Performance: It tends to have a low cost in normal execution because no metadata is generated to handle exceptions, but higher cost when an exception occurs, as it requires a full context switch.
  • Platform Support: SJLJ is very portable and can work across many different systems.
  • Common Use: Historically used in some older versions of G