Skip to content

Instantly share code, notes, and snippets.

View Stankye's full-sized avatar
:octocat:
Accepting The Risk

R Stankye

:octocat:
Accepting The Risk
  • Personal Account
  • US
View GitHub Profile
///////////////////////
// SERVER (Axum API) //
///////////////////////
// File: server/src/main.rs
use axum::{extract::State, http::StatusCode, routing::post, Router};
use qbittorrent_rust::{Credentials, QbitApi};
use std::{net::SocketAddr, sync::Arc};
use tokio::sync::Mutex;
use tracing::{error, info};
@Stankye
Stankye / readme.md
Last active November 8, 2024 21:03
notes on timingSafeEqual support
services:
# TODO
# luckyperms, proxy, postgres shared, discord/matrix brigde, ops, whitelist, custom datapacks for init, litmatica, carpet, way to sync mods/datapacks from GH, anti-xray, anti-cheap, openresty for reverseproxy for dynmap, (maybe a keycloak plugin for forward auth on proxy), unifiedmetrics when it updates to 1.21 or find a real otel one, grafana+prom setup, rcon web?, better backup endpoints, worldgen mods
mc:
image: itzg/minecraft-server:java21-graalvm
container_name: "MinecraftFabric"
ports:
- "25565:25565"
- "8123:8123"
environment:
snprintf(acStack_540,0x80,"Content-Length: %d",param_3);
local_38 = FUN_00033d70(local_38,acStack_540);
local_38 = FUN_00033d70(local_38,"x-ms-blob-condition_maxsize: 0");
local_38 = FUN_00033d70(local_38,"x-ms-blob-condition_appendpos: 0");
local_38 = FUN_00033d70(local_38,"User-Agent: xiaoyi camera");
memset(acStack_540,0,0x80);
FUN_0001ecdc(auStack_4c0);
snprintf(acStack_540,0x80,"x-ms-date: %s",auStack_4c0);
local_38 = FUN_00033d70(local_38,acStack_540);
memset(acStack_540,0,0x80);
@Stankye
Stankye / nsWindowsDllInterceptor.h
Created April 1, 2023 08:29
mozilla-central/toolkit/xre/dllservices/mozglue/nsWindowsDllInterceptor.h
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef NS_WINDOWS_DLL_INTERCEPTOR_H_
#define NS_WINDOWS_DLL_INTERCEPTOR_H_
#include <wchar.h>
@Stankye
Stankye / gist:ad6f4e2ee57495b2c165685f4c158911
Created March 17, 2023 00:45
M0101010101010101000001101001001
M0101010101010101000001101001001
0101010101010101000001101001001
The Road Less Traveled
@Stankye
Stankye / obsocr.py
Created May 29, 2022 21:38
Tesserocr Pillow Opencv
import cv2 as cv
from tesserocr import PyTessBaseAPI
from PIL import Image
def main():
CAPTURE_SOURCE = 1
FRAME_WIDTH = 911
@Stankye
Stankye / extract.lua
Last active March 23, 2022 13:31
Aseprite script.
----------------------------------------------------------------------
-- Extract animations from sheets.
-- Select or full sprite
-- Somewhere down the line it was originally: https://github.com/aseprite/Aseprite-Script-Examples/blob/master/Tiles%20to%20Layers.lua
-- MIT License
-- https://gist.github.com/Stankye/ae3f34e723873fc361e70ca50daa044a
----------------------------------------------------------------------
local spr = app.activeSprite
-- Checks for a valid sprite
@Stankye
Stankye / fastapi.py
Last active February 24, 2022 22:52
ffmpeg -progress nats fastapi sse react toy
from typing import AsyncGenerator, Dict
from fastapi import FastAPI, Request, Response
from fastapi.encoders import jsonable_encoder
from fastapi.middleware.cors import CORSMiddleware
from starlette.responses import StreamingResponse
import asyncio
from nats.aio.client import Client as NATS