Skip to content

Instantly share code, notes, and snippets.

View moe91asd's full-sized avatar

moe91asd

  • Lebanon
View GitHub Profile
@moe91asd
moe91asd / jpgtest.c
Created May 8, 2024 15:28
Test if a given file is JPEG or not in C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_BYTES 3
int
main (const int argc, const char *argv[])
{
if (argc != 2) {
#!/bin/sh
# Debian 13 Trixie XRDP + KDE Plasma 6 setup script for Hyper-V enhanced session (vsock).
# Launches an X11 KDE session (required because XRDP does not use Wayland).
# WARNING: This script weakens RDP security (security_layer=rdp, crypt_level=none). Only use in
# controlled/trusted environments. Do not expose directly to untrusted networks without extra protection.
set -euo pipefail
REBOOT_FLAG="/var/run/reboot-required"