Skip to content

Instantly share code, notes, and snippets.

View slyshykO's full-sized avatar
🇺🇦
UA

Oleksiy Slyshyk slyshykO

🇺🇦
UA
  • Ukraine, Kyiv
View GitHub Profile
@TheAngryByrd
TheAngryByrd / Main.fs
Last active May 14, 2025 06:08
F# Main Async
module Main =
open System
open System.Threading
let inline tryCancel (cts : CancellationTokenSource) =
try
cts.Cancel()
with :? ObjectDisposedException as e ->
// if CTS is disposed we're probably exiting cleanly
()
@mattypiper
mattypiper / stringobf-cpp11.cpp
Last active September 28, 2021 09:29
compile time string obfuscation
// http://www.rohitab.com/discuss/topic/39611-malware-related-compile-time-hacks-with-c11/
#include <stdio.h>
#include <stdint.h>
//-------------------------------------------------------------//
// "Malware related compile-time hacks with C++11" by LeFF //
// You can use this code however you like, I just don't really //
// give a shit, but if you feel some respect for me, please //
// don't cut off this comment when copy-pasting... ;-) //
@vittorioromeo
vittorioromeo / FastFunc.hpp
Last active August 24, 2023 08:15
Don Clugston's fast delegate C++11 implementation
#ifndef SSVU_FASTFUNC
#define SSVU_FASTFUNC
#include <cstring>
#include <type_traits>
#include <cassert>
#include <cstddef>
#include <memory>
#include <new>
#include <utility>