Skip to content

Instantly share code, notes, and snippets.

View phoenixthrush's full-sized avatar
🦝
coding through nights

lulu phoenixthrush

🦝
coding through nights
View GitHub Profile
@phoenixthrush
phoenixthrush / compress-mp4.txt
Last active August 13, 2025 01:24
Compressing MP4 Files with FFmpeg #FFmpeg #VideoCompression
// lower crf means higher bitrates and more used disk space
// 24 to 30
// ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4
// 18 to 24
// ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4
// compression of all mp4 files in the current directory (run with cmd)
for /F "tokens=*" %G in ('dir /b *.mp4') do ffmpeg -i "%G" -vcodec libx265 -crf 28 "%~nG-compressed.mp4"
@phoenixthrush
phoenixthrush / CreateProcess.c
Last active August 13, 2025 01:25
Windows API CreateProcess example - https://learn.microsoft.com/en-us/windows/win32/procthread/creating-processes - #C #WindowsAPI #ProcessCreation
#include <stdio.h>
#include <windows.h>
int main( int argc, char *argv[] )
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
@phoenixthrush
phoenixthrush / FindWindow.c
Last active August 13, 2025 01:25
Finding Windows #C #WindowsAPI #FindWindow
#include <stdio.h>
#include <windows.h>
int main( int argc, char *argv[] )
{
HWND hwnd = FindWindow( argv[1], NULL ); // compile with -luser32 on tcc
if( argc != 2 )
{
puts("Usage: main.exe [cmdline]");
@phoenixthrush
phoenixthrush / main.c
Last active August 13, 2025 01:26
Check if Process Is Running #WindowsAPI #FindWindow #ProcessCheck
#include <stdio.h>
#include <windows.h>
#include <tlhelp32.h>
/*
"As to tlhelp32.h, you can take it from mingw or as attached to this
email. Drop into tcc/include/winapi."
https://lists.nongnu.org/archive/html/tinycc-devel/2009-06/msg00059.html
*/
@phoenixthrush
phoenixthrush / README.md
Last active August 13, 2025 01:26
Creating UAC Manifest for C Programs #Windows #UAC #Manifest

Creating UAC Manifest for C Programs

- First create the uac manifest using windres

windres mushroom.rc -o mushroom.o

- Then compile them together

@phoenixthrush
phoenixthrush / main.c
Last active August 13, 2025 01:28
Forcing BSOD Without Admin Privileges - Source is from the Memz Trojan source code - #BSOD #Memz #Exploit
// tcc -o main.exe .\main.c -mwindows
#include <windows.h>
#ifndef SE_SHUTDOWN_PRIVILEGE
#define SE_SHUTDOWN_PRIVILEGE 19L
#endif
#ifndef SE_DEBUG_PRIVILEGE
#define SE_DEBUG_PRIVILEGE 20L
#endif
@phoenixthrush
phoenixthrush / RemoveMSEdgeWebView.bat
Last active August 13, 2025 01:28
Remove Microsoft Edge WebView2 #Windows #Uninstall #WebView2
cd %PROGRAMFILES(X86)%\Microsoft\EdgeWebView\Application\
for /f "tokens=*" %G in ('dir /b') do (cd %G\Installer && .\setup.exe --uninstall --msedgewebview --system-level --verbose-logging --force-uninstall)
@phoenixthrush
phoenixthrush / unattended-upgrades-log.sh
Last active August 13, 2025 01:28
Unattended-Upgrades Current Progress #Linux #UnattendedUpgrades
tail -f /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
@phoenixthrush
phoenixthrush / clear-bash-history.sh
Last active August 13, 2025 01:29
ChatGPT said: Clearing Bash History #Linux #Bash
cat /dev/null > ~/.bash_history && history -c && exit
@phoenixthrush
phoenixthrush / getting-cover-art.py
Last active August 13, 2025 01:30
Download Album Cover Art #Python #CoverArt #Music
# pip install get_cover_art --upgrade
python -m get_cover_art --path=C:\Users\mushroom\Music --art-size 600 --art-dest CoverArt --no-embed