Skip to content

Instantly share code, notes, and snippets.

View alekxeyuk's full-sized avatar
⚒️
Workers of the world, unite!

LeLuCh B0й alekxeyuk

⚒️
Workers of the world, unite!
  • Tanelorn
  • United Russian Kingdom
View GitHub Profile
@alekxeyuk
alekxeyuk / main.cpp
Created April 5, 2024 12:07
bizzarechat
#include <iostream>
#include <unordered_set>
typedef std::unordered_set<int> int_set;
enum AccessLevel : int
{
ADMIN, // Может регистрировать новых пользователей, давать роль админа или модератора другим пользователям, а также полностью останавливать чат
MODERATOR, // Может банить пользователей, создавать других модераторов, а также полностью редактировать все сообщения
BANNED, // Не может ничего, предполагается, что ни ADMIN, ни MODERATOR не станут BANNED
/* parseSudokuBoard()
Reads the live DOM and returns a 9×9 array:
– null for an empty cell
– 1-9 for a filled cell
*/
function parseSudokuBoard() {
const board = Array.from({
length: 9
}, () => Array(9).fill(null));

Below is a step‑by‑step, ordered list of the POSIX functions you normally call when you work with a Unix‑domain (AF_LOCAL / AF_UNIX) stream socket (SOCK_STREAM).
I split the list into two sections – one for the server side and one for the client side – because the order of calls differs slightly.


1️⃣ Server side (creates a listening socket)

# Function (header) What it does Typical usage notes
1 socket(int domain, int type, int protocol) #include Creates a new socket descriptor. domain = AF_LOCAL (or AF_UNIX), type = SOCK_STREAM, protocol = 0.
@alekxeyuk
alekxeyuk / userscript.js
Last active April 12, 2026 16:45
translationchicken.com Color dialogue lines
// ==UserScript==
// @name TranslationChicken Character Colors + UI
// @namespace https://translationchicken.com
// @version 2.4.3
// @description Color dialogue lines with UI controls
// @author Prostagma
// @match https://translationchicken.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=translationchicken.com
// @homepageURL https://gist.github.com/alekxeyuk/6961a1c5dc94566a3a1f19c08b4fe706
// @downloadURL https://gist.githubusercontent.com/alekxeyuk/6961a1c5dc94566a3a1f19c08b4fe706/raw/userscript.js