Skip to content

Instantly share code, notes, and snippets.

View dadencukillia's full-sized avatar
👁️
I continue to spoil my eyes

Illia Diadenchuk dadencukillia

👁️
I continue to spoil my eyes
  • Crocoby
  • Ukraine, Rivne
  • 15:08 (UTC +03:00)
  • Instagram im.illia
View GitHub Profile
@dadencukillia
dadencukillia / Dockerfile
Last active March 3, 2025 19:31
Docker. Manticore Search ukrainian lemmatizer. Thanks for @hlushpenko
FROM manticoresearch/manticore:latest
RUN apt-key adv --fetch-keys http://repo.manticoresearch.com/GPG-KEY-manticore && \
apt -y update --allow-insecure-repositories && \
apt -y install \
wget \
mc \
build-essential \
libreadline-dev \
libncursesw5-dev \
@dadencukillia
dadencukillia / cachemanager_concurrent.go
Last active February 5, 2025 10:49
Local runtime alternative of Redis for Golang
package utils
import (
"sync"
"time"
)
// Cache storage to store the cached data
type CacheStorage struct {
mutex sync.Mutex
@dadencukillia
dadencukillia / Makefile
Created September 27, 2024 09:11
Simple Makefile for launching C++ file
.DEFAULT_GOAL := all
.SILENT: clear build
clear:
rm -f ./exec
build:
g++ -Wall -o exec main.cpp
@dadencukillia
dadencukillia / cachemanager.go
Last active February 5, 2025 10:50
Local runtime alternative of Redis for Golang. Here is a concurrent version: https://gist.github.com/dadencukillia/f70191833db52fd0fb1700618075cf29
package cachemanager
import "time"
// Cache storage to store the cached data
type CacheStorage struct {
caches map[string]cache
}
type cache struct {
type nickname = string;
type uuid = string;
type identifier = string;
// For GET /users
type UsersResponse = nickname[];
// For GET /user/{nickname}
type UserResponse = {
nickname: nickname,

What is HttpInfoServer?

This is a project that consists of two parts: HttpInfoServer (hereinafter referred to as the "server part") and HttpInfoServer-mod (hereinafter referred to as the "mod part"). Both of these parts are important and necessary for correct operation. By combining them, you will create a REST API server based on the HTTP protocol that will collect and send up-to-date information about the player's state in the Minecraft game.

IMPORTANT INFORMATION: The mod part uses the Fabric Mod Loader to work, if you are not a Fabric fan, then this project is not for you.

Who is it for?

It is primarily intended for developers who want to create their own application that needs information about the status of a Minecraft player. It is forbidden to use the project to create cheats and track players without their consent. So, with that said, here is an example of projects you can create using

@dadencukillia
dadencukillia / CMakeLists.txt
Last active June 2, 2024 09:04
C++ CMake static linking
set(BUILD_SHARED_LIBS FALSE)
target_link_options(${PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++ -static)
@dadencukillia
dadencukillia / labeltorgba.go
Last active August 23, 2023 11:50
add label to *Image.RGBA golang
package labeltorgba
import (
"image"
"github.com/golang/freetype"
"github.com/golang/freetype/truetype"
)
func addLabel(text string, canvas **image.RGBA, centerX int, centerY int, fontSize int, fontPath string) {
fontBytes, err := os.ReadFile(fontPath)
@dadencukillia
dadencukillia / rsacrypto.go
Last active October 8, 2024 20:31
Golang rsa module with chunk encryption and decryption
// Adapted from: https://gist.github.com/miguelmota/3ea9286bd1d3c2a985b67cac4ba2130a
package rsacrypto
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"fmt"