Skip to content

Instantly share code, notes, and snippets.


Dimitri Pappas fragtion

  • Johannesburg, South Africa
View GitHub Profile
fragtion /
Last active Jun 8, 2021
Dell R610 / R710 temperature-based fan speeds script
# ----------------------------------------------------------------------------------
# Script for checking the temperature reported by the ambient temperature sensor,
# and if deemed too high send the raw IPMI command to enable dynamic fan control.
# Also get CPU temps from lm-sensors and adjust fan speeds according to defined
# speed % which should be set according to your needs (each CPU model will vary)
# Requires:
View linux hacks and shortcuts
#Expand /tmp (if tmpfs)
mount -o remount,size=5G /tmp/
# Clone to multiple disks with progress
dd if=/dev/sda | pv -s $(blockdev --getsize64 /dev/sda) | tee >(dd of=/dev/sdb) | tee >(dd of=/dev/sdc) | dd of=/dev/sdd
# faster... and source can be image or device
pv /dev/sda | tee >(dd bs=64k of=/dev/sdb) >(dd bs=64k of=/dev/sdc) >(dd bs=64k of=/dev/sdd) | dd bs=64k of=/dev/sde
View git-fetch-upstream-tags
Let [tag] = any tag in upstream repo
git fetch upstream --tags
git push origin --tags
fragtion / steam-routes.php
Created Oct 1, 2019
Firewall Routes/Rules Generator for Steam PoPs/Relays
View steam-routes.php
* This script will generate a list of IP segments for selected Steam PoPs/Relays, in desired format (mikrotik, windows, cidr, list, or mask)
* Example use case is for CSGO matchmaking - you can use this to block all servers except the ones you want to play on
* Example query (assuming you are hosting this on a php-enabled web server at
* Requires Linux for shell exec of the `ipcalc` command (can be ported to windows quite easily if required)
fragtion / stapi_mysql.txt
Last active Aug 29, 2019
sync low use mysql (myiasm) db's with syncthing api
View stapi_mysql.txt
# MySQL database replication (MyISAM only) using syncthing(+API)
# version 0.2
# You'll first want to set up syncthing folders for each /var/lib/mysql/x,y,z,.. mysql database you want to sync
# (and limit max conflicts per folder to 1 (or 0) to keep the db folders 'clean')
# Why? Does the job for my application; extremely easy multi-master deployment (slave too)
# Warning: at least 10 second 'margin of error' for potential data corruption ... use at own risk.
fragtion / Windows 10 Disable Services.bat
Last active Jul 26, 2021 — forked from 2510/Windows 10 Disable Services.bat
Disable unused services (for me) on Windows 10
View Windows 10 Disable Services.bat
REM Superfetch
sc config SysMain start=disabled
rem BOOT TIME Superfetch only
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /f /v EnableSuperfetch /t REG_DWORD /d 2
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /f /v EnablePrefetcher /t REG_DWORD /d 0
REM SSDP Discovery
sc config SSDPSRV start=disabled
REM Geolocation Service
sc config lfsvc start=disabled
REM ActiveX Installer