Skip to content

Instantly share code, notes, and snippets.

@Yousha
Yousha / identify_used_extensions.php
Last active April 15, 2026 07:17
Scans a directory (excluding `vendor`) for `.php` files and identifies used PHP extensions.
<?php
declare(strict_types=1);
error_reporting(E_ALL);
/**
* Recursively scans a directory for PHP files while ignoring "vendor" folder.
*
* @param string $directory The directory to scan.
@Yousha
Yousha / .gitignore
Last active April 10, 2026 18:34
.gitignore for C/C++ developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@Yousha
Yousha / .gitignore
Last active March 22, 2026 13:17
.gitignore for PHP developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@Yousha
Yousha / .gitignore
Last active March 12, 2026 20:44
.gitignore for .Net developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@Yousha
Yousha / BIOS_default_passwords.txt
Created June 16, 2020 08:51
BIOS default passwords
AWARD BIOS:
01322222
589589
589721
595595
598598
aLLy
aLLY
ALLY
ALFAROME
@Yousha
Yousha / update_linux_kernel.sh
Last active February 20, 2026 23:14
Shell script to update Linux kernel. (Traditionally)
#!/bin/bash
# Update Linux Kernel
# Version: 2.0.0.2
# Description: Script to download, config, compile, and install Linux kernel manually.
# Requirements: Slackware Linux, x86_64 architecture, root privileges.
# Usage: sudo ./update_linux_kernel.sh [<kernel_version>]
# Enable strict mode: Abort on errors, unset variables, and pipe failures.
@Yousha
Yousha / payloads.c
Created January 28, 2026 09:55
Binary payloads
// Structured binary patterns. (non-string)
const unsigned char BINARY_PAYLOADS[][64] = {
// 64-byte aligned NOP sled (0x90) — may trigger ROP detection or DEP.
{0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
@Yousha
Yousha / .php-cs-fixer.php
Last active January 4, 2026 16:44
Simple .php-cs-fixer.php config file.
<?php
declare(strict_types=1);
use PhpCsFixer\Finder;
use PhpCsFixer\Config;
static $rules = [
'@PSR1' => true,
'@PSR2' => true,
@Yousha
Yousha / .gitattributes
Last active October 24, 2025 14:29
.gitattributes for .Net developers.
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@Yousha
Yousha / DNSServersBenchmarker.bat
Last active October 21, 2025 13:49
Tests and compares speed of popular free/public DNS servers by measuring their response times.
@echo off
setlocal enabledelayedexpansion
REM Configure test parameters
set TEST_DOMAIN=example.com
set TRIES=5
echo Starting DNS Benchmarking... %TEST_DOMAIN%
echo.