Skip to content

Instantly share code, notes, and snippets.

View xDShot's full-sized avatar

xDShot

  • Digital Hell
View GitHub Profile
@xDShot
xDShot / source-mdl.hexpat
Last active December 18, 2024 21:59
Source Engine mdl pattern for ImHex
//
#pragma pattern_limit 0x20000
#pragma array_limit 0x20000
#include <std/mem.pat>
#include <std/io.pat>
#include <std/string.pat>
#define MAX_NUM_LODS 8
@xDShot
xDShot / gist:68a209951e9b7139c8a70a926eef5f3d
Created February 3, 2022 14:54
change pcsx2 controls
SDL_GAMECONTROLLERCONFIG="030000004c050000e60c000000016800,PS5 Controller but triggers and shoulders are swapped,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b4,guide:b5,start:b6,leftstick:b7,rightstick:b8,leftshoulder:a4,rightshoulder:a5,dpup:b11,dpdown:b12,dpleft:b13,dpright:b14,misc1:b16,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b9,righttrigger:b10," GDK_BACKEND=x11 MESA_NO_ERROR=1 pcsx2
@xDShot
xDShot / PKGBUILD
Created November 20, 2021 17:57
Fix tracker3-miners memory leak on Arch Linux
pkgname=fuck-you-tracker
pkgver=69
pkgrel=666
epoch=420
pkgdesc='fixes tracker3-miners memory leak'
arch=('any')
provides=('tracker3-miners')
conflicts=('tracker3-miners')
@xDShot
xDShot / gist:a92712a5fca2bdd962bee87b2f95f780
Created October 20, 2021 11:43
batch convert pngs to jpgs
mogrify -format jpg *.png
@xDShot
xDShot / render.sh
Last active November 4, 2021 10:45
crop
export TIMETRIM="-ss 00:16 -to 00:24"
export SIZE_X=696
export SIZE_Y=696
export POS_X=611
export POS_Y=65
export SCALEX=300
export SCLAEY=-1
export FPS=20
export FILTERS="[0:v]crop=$SIZE_X:$SIZE_Y:$POS_X:$POS_Y[vid];[vid]scale=$SCALEX:$SCLAEY:flags=lanczos[vid]" #"[0:v]crop=1103:621:444:242[vid]"
@xDShot
xDShot / encode-for-youtube-with-ffmpeg.sh
Created October 18, 2021 00:27
ffmpeg convert for youtube
#!/bin/bash
# https://video.stackexchange.com/questions/24479/how-to-encode-for-youtube-with-ffmpeg
ffmpeg -framerate 60 -i vidname_%04d.jpg -i vidname_.WAV -ss 00:00:10 -vf yadif,format=yuv422p -force_key_frames expr:gte\(t\,n_forced/2\) -c:v libx264 -b:v 60M -bf 2 -c:a aac -q:a 1 -ac 2 -ar 44100 -use_editlist 0 -movflags +faststart vidname.mp4
@xDShot
xDShot / src.txt
Created August 20, 2021 11:07
quake64 loader
#include "kexlib.h"
#include "quakeex.h"
/*
=============================================================================
DECOMPRESSION
=============================================================================
@xDShot
xDShot / 90-dualsense-no-touchpad-input.rules
Created July 2, 2021 07:36
hid-playstation disable Sony Dualsense touchpad input
# /etc/udev/rules.d/90-dualsense-no-touchpad-input.rules
ACTION=="add|change", KERNEL=="event[0-9]*", ATTRS{name}=="*Wireless Controller Touchpad", ENV{LIBINPUT_IGNORE_DEVICE}="1"
@xDShot
xDShot / gist:6d4cab6c82e739260dd76b454df6f271
Created May 27, 2021 11:28
fixes harfbuzz and freetype undefined references like FT_Get_MM_Var hb_ft_font_create
sed -i 's|-lfreetype -lbz2 -lharfbuzz|-lharfbuzz -lfreetype -lharfbuzz -lfreetype -lbz2|g' Sources/Makefile.Release
@xDShot
xDShot / pac-bundle.sh
Last active May 27, 2021 11:29
Installs specified pacman package and it's dependencies in separate root tree
#!/bin/sh
DIST_DIR=/seagate/pkg_dist/
mkdir -p ${DIST_DIR}/var/lib/pacman/
sudo pacman -r ${DIST_DIR} -b ${DIST_DIR}/var/lib/pacman/ -Syy
sudo pacman -r ${DIST_DIR} -b ${DIST_DIR}/var/lib/pacman/ -U $@
chmod -R a+rwX usr/