Skip to content

Instantly share code, notes, and snippets.

@8dcc
8dcc / Makefile
Created April 26, 2024 19:48
Assembly PIC test
CC=gcc
CFLAGS=-Wall -Wextra -Ofast -fPIC
LDFLAGS=
AS=nasm
ASFLAGS=-f elf64
.PHONY: all clean
@8dcc
8dcc / update_enoch_cfg_859ea59.sh
Created December 30, 2023 00:04
Update configs for commit 859ea59 of 8dcc/tf2-cheat
#!/bin/bash
# Usage:
# ./update_enoch_cfg_*.sh CONFIG.json
sed -i "s/col_esp_friend/col_esp_tmate/g" "$1"
sed -i "s/col_esp_enemy_build/col_esp_build_enemy/g" "$1"
sed -i "s/col_esp_friend_build/col_esp_build_tmate/g" "$1"
sed -i "s/col_esp_sticky_friend/col_esp_sticky_tmate/g" "$1"
sed -i "s/col_chams_friend/col_chams_tmate/g" "$1"
@8dcc
8dcc / update_enoch_cfg_0ebd969.sh
Created December 23, 2023 21:10
Update configs for commit 0ebd969 of 8dcc/tf2-cheat
#!/bin/bash
# Usage:
# ./update_enoch_cfg_*.sh CONFIG.json
sed -i "s/player_esp/esp_player/g" "$1"
sed -i "s/player_box_esp/esp_player_box/g" "$1"
sed -i "s/skeleton_esp/esp_skeleton/g" "$1"
sed -i "s/player_health_esp/esp_player_health/g" "$1"
sed -i "s/player_name_esp/esp_player_name/g" "$1"
@8dcc
8dcc / syntax.c
Created November 18, 2023 15:53
Slightly modified syntax highlighter from StackOverflow
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
/*
* C syntax highlighter to stdout.
* Source: https://stackoverflow.com/a/77465783/11715554
*/
@8dcc
8dcc / rgb_scale.c
Created August 11, 2023 00:46
Scale RGB values
/* https://github.com/8dcc/c-stuff/blob/main/Misc/rgb_scale.c */
#include <stdint.h> /* uint8_t */
#include <stdio.h> /* printf */
#define MIN(a, b) ((a) > (b) ? b : a)
typedef struct {
uint8_t r, g, b, a;
} rgba_t;
@8dcc
8dcc / hexrays.cfg
Created August 4, 2023 16:55
Configuration for IDA Pro
/*
Hex-Rays Decompiler configuration file.
The syntax of this file is very simple.
Feel free to edit it to your taste.
IMPORTANT: the installer overwrites this file. Please make a backup copy
if you modify this file in any way. Otherwise you may lose your
modifications!
@8dcc
8dcc / detour.cpp
Created July 28, 2023 16:04
Proof that OOP is pure unreadable garbage. Uploaded because of Guided Hacking shit ass paywall.
// 64 bits
/*
0: 48 b8 45 55 46 84 45 movabs rax,0x454584465545
7: 45 00 00
a: ff e0 jmp rax
*/
// 32 bits
/*
@8dcc
8dcc / .dwmbar
Last active September 23, 2022 23:00
Simpler version of my dwmbar without icons and with less stuff (for smaller resolutions)
#!/bin/bash
# https://github.com/r4v10l1/arch-dotfiles
#####################
multibattery=false #
hourchange=true #
hourdiff=-2 # Ignored if !hourchange
#####################
@8dcc
8dcc / Makefile
Created August 30, 2022 02:03
Generic makefile for my C projects
# Generic Makefile for my projects
# https://github.com/r4v10l1/
CC=gcc
CFLAGS=-Wall
all: output.out
output.out: src/*
$(CC) $(CFLAGS) -o $@ src/main.c
@8dcc
8dcc / hsvrgb.cpp
Last active June 4, 2022 18:42 — forked from fairlight1337/hsvrgb-cpp
Simple RGB/HSV conversion in C++
// Copyright (c) 2014, Jan Winkler <winkler@cs.uni-bremen.de>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the