Skip to content

Instantly share code, notes, and snippets.

@Yozhig
Yozhig / cpool.txt
Last active June 25, 2024 06:23
cpool_delete gdb
Dump of assembler code for function cpool_delete:
0x0000561901cf4410 <+0>: push %rbp
0x0000561901cf4411 <+1>: lea 0x20(%rdi),%rsi
0x0000561901cf4415 <+5>: mov $0x100,%r9d
0x0000561901cf441b <+11>: mov %rsi,%r8
0x0000561901cf441e <+14>: or $0x1,%r8
0x0000561901cf4422 <+18>: mov %rsp,%rbp
0x0000561901cf4425 <+21>: push %r12
0x0000561901cf4427 <+23>: push %rbx
0x0000561901cf4428 <+24>: mov 0x40(%rdi),%r12
@Yozhig
Yozhig / fifo.h
Created July 3, 2018 12:12
FIFO on macros
#ifndef _FIFO_H
#define _FIFO_H
/* Main FIFO structure. Allocate memory for it yourself. */
typedef struct fifo_t {
void *head;
void *tail;
unsigned long long count;
} fifo_t;
@Yozhig
Yozhig / guardibot.py
Last active September 14, 2017 14:54
Trivial telegram antispam bot
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import config as cfg
import telegram
from telegram.ext import Updater, MessageHandler, Filters, CallbackQueryHandler
import logging
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
// ==UserScript==
// @name Lepra stop playing GIFs 2
// @namespace https://leprosorium.ru/
// @version 2.02
// @description Я — идиод! Убейте меня кто-нибудь!
// @author Yozhig
// @match https://leprosorium.ru/*
// @match https://*.leprosorium.ru/*
// @grant none
// @require https://raw.githubusercontent.com/monsur/jscache/master/cache.js
// ==UserScript==
// @name HobbyKing USD to RUB
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Adds to USD price title containing price in RUB (by SberBank currency)
// @author Sergei Shuvatov
// @match http://www.hobbyking.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */