This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LetopisUtilities { | |
constructor() { | |
this.updateInterval = null | |
this.eventListenersAdded = false | |
this.videoFrame = null | |
this.handleMouseDown = this.handleMouseDown.bind(this) | |
this.handleMouseWheel = this.handleMouseWheel.bind(this) | |
this.onStart() | |
} | |
onStart() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from requests import Session | |
import re | |
import json | |
from base64 import b64encode | |
from urllib.parse import quote, urlparse | |
session = Session() | |
session.headers = { | |
'Accept': '*/*', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// \brief A drop-in replacement for `std::uniform_int_distribution`. | |
/// | |
/// We are using a replacement because the uniform_int_distribution implementation is different in libc and libstdc++. | |
/// This is important because otherwise we can't reproduce random values across multiple platforms. | |
/// | |
/// \tparam IntType The integer type to be used for the distribution. Defaults to `int`. | |
template <typename IntType = int> | |
class UniformIntDistribution { | |
public: | |
using ResultTy = IntType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from requests import Session, Response | |
from urllib.parse import quote | |
from typing import Tuple | |
from functools import lru_cache | |
class UploadThing: | |
def __init__(self, api_key: str, base_url: str = 'https://uploadthing.com/api') -> None: | |
self.session = Session() | |
self.session.headers = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @note: es3n1n: this is never meant to be useful | |
// posting cz maybe i'll use it later in my projs | |
// i hate those pasted c stuff, that's why i | |
// made my own version, please don't blame me :( | |
// | |
uintptr_t virt2phys( uintptr_t virt_addr ) { | |
auto read_phys = [ ] ( uintptr_t addr, void* buffer, size_t size ) -> NTSTATUS { | |
size_t dummy = 0; | |
MM_COPY_ADDRESS copy_addr = { .PhysicalAddress = {.QuadPart = static_cast< LONGLONG >( addr ) } }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdint> | |
enum e_cvar_flags : uint32_t { | |
none = 0, | |
unregistered = (1<<0), // If this is set, don't add to linked list, etc. | |
developmentonly = (1<<1), // Hidden in released products. Flag is removed automatically if ALLOW_DEVELOPMENT_CVARS is defined. | |
gamedll = (1<<2), // defined by the game DLL | |
clientdll = (1<<3), // defined by the client DLL | |
hidden = (1<<4), // Hidden. Doesn't appear in find or auto complete. Like DEVELOPMENTONLY, but can't be compiled out. | |
priv /* protected */ = (1<<5) , // It's a server cvar, but we don't send the data since it's a password, etc. Sends 1 if it's not bland/zero, 0 otherwise as value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This file contains definitions used in the Hex-Rays decompiler output. | |
It has type definitions and convenience macros to make the | |
output more readable. | |
Copyright (c) 2007-2022 Hex-Rays | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace util { | |
namespace math { | |
constexpr auto e = 2.71828182845904523536f; | |
constexpr auto pi = 3.14159265358979323846f; | |
constexpr auto radpi = 180.f / pi; | |
constexpr auto sqrpi = pi * pi; | |
constexpr auto round_error = 0.5; | |
double __forceinline deg2rad( double x ) { | |
return x * ( static_cast< double >( pi ) / 180.0 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// yes. | |
#include <algorithm> | |
#define MAX_SIZE 1760 | |
#define CHARS_MAP ".,-~:;=!*#$@" | |
float step_x = 0; |