Skip to content

Instantly share code, notes, and snippets.

View kekneus373's full-sized avatar

kekneus373

View GitHub Profile
@krameraad
krameraad / monitoring.sh
Created January 12, 2026 15:52
Monitoring script for the 42 Born2BeRoot project
#!/bin/bash
architecture=$(uname -a)
n_cpu=$(grep "physical id" /proc/cpuinfo | wc -l)
n_vcpu=$(grep processor /proc/cpuinfo | wc -l)
mem_use=$(free --mega | awk '$1 == "Mem:" {printf("%d/%d (%.2f%%)"), $3, $2, $3/$2*100}')
disk_use=$(df -m | grep "/dev/" | grep -v "/boot" | \
awk '{use += $3} {total += $2} END {printf("%d/%dMB (%d%%)\n"), use, total, use/total*100}')
cpu_load=$(vmstat 1 4 | tail -1 | awk '{printf("%d%%"), 100-$15}')
last_boot=$(who -b | awk '{print $3, $4, $5}')
@BrutalBirdie
BrutalBirdie / yt-dlp_cheat_sheet.md
Last active November 17, 2025 19:58
yt-dlp cheat sheet

yt-dlp Cheat Sheet

Note

Set the $URL variable with your URL for easy copy and paste

Example:

export URL='https://youtu.be/PLUZDtJCdDM'
@gmotzespina
gmotzespina / screen_recorder.ts
Last active August 26, 2025 15:13
Screen Recorder
import {
AddStreamOptions,
ConstructorOptions,
VideoStreamMerger
} from "video-stream-merger";
import { RecordRTCPromisesHandler } from "recordrtc";
import { ScreenShare } from "@components/ScreenShareOption";
// This just renames it to StreamSettings because it gives you a better idea of what it is.
// eslint-disable-next-line @typescript-eslint/no-empty-interface
@mattbryson
mattbryson / recover_ready_nas.sh
Last active December 30, 2025 16:42
Recover Data from ReadyNas Duo hard drives
# Recover Data from ReadyNas Duo RAID 1 drives
#
# DISCLAIMER : This could corrupt all your data - if you are at all worried get a professional to recover the data for you
#
# The tools mentioned below have the ability to corrupt and wipe all your data
#
# #### USE AT YOUR OWN RISK ####
#
# With that out the way....
#