Skip to content

Instantly share code, notes, and snippets.

View jgaydos's full-sized avatar
Status Error (4): Please try again in 5 minutes.

Jon Gaydos jgaydos

Status Error (4): Please try again in 5 minutes.
  • Earth?
View GitHub Profile
@jgaydos
jgaydos / video-preloader.sh
Created July 6, 2022 02:02
Preloads the recent video files of a specific path into the RAM to bypass HDD spinup latency
#!/bin/bash
# #####################################
# Script: Video Preloader v1.1
# Description: Preloads the recent video files of a specific path into the RAM to bypass HDD spinup latency
# Author: Marc Gutt
# Source: https://forums.unraid.net/topic/97982-video-preloader-avoids-hdd-spinup-latency-when-starting-a-movie-or-episode-through-plex-jellyfin-or-emby/#comments
#
# Changelog:
# 1.1
# - changed the way how movies are found and sorted to avoid confusing error messages
@jgaydos
jgaydos / zram.sh
Last active November 1, 2020 20:57 — forked from imZack/zram.sh
How enable zram module on kernel (debian lik distro)?
#!/bin/bash
### BEGIN INIT INFO
# Provides: zram
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Increased Performance In Linux With zRam (Virtual Swap Compressed in RAM)
# Description: Adapted from systemd scripts at https://github.com/mystilleef/FedoraZram
### END INIT INFO
@jgaydos
jgaydos / ubuntu18.04_php7.4_sqlsrv.sh
Created February 5, 2020 20:26
Ubuntu 18.04 + PHP7.4 + SQLSRV
#!/bin/bash
#ubuntu 18.04
#php7.4
# install php ppa
apt -y install software-properties-common
add-apt-repository ppa:ondrej/php -y
apt update
@jgaydos
jgaydos / kill_cortana.bat
Last active September 6, 2019 18:09
Cortana broke and maxing a CPU core? I say no more! With this magic jank script you can reclame your system resources. Note: Does not fix Cortana, just kills process.
@ECHO OFF
echo Running
:wait
tasklist /FI "IMAGENAME eq SearchUI.exe" 2>nul | find /I "SearchUI.exe" >nul
if not errorlevel 1 goto found
echo Waiting 10 seconds
timeout /T 10 /NOBREAK>nul
goto wait
@jgaydos
jgaydos / postman_install_upgrade.sh
Created February 14, 2019 12:16
Postman Install/Update in Ubuntu
#!/bin/bash
# Download latest release
wget https://dl.pstmn.io/download/latest/linux64 -O Postman.tar.gz
sudo rm -rf /opt/Postman/
sudo tar xf Postman.tar.gz -C /opt/
rm Postman.tar.gz
[ -e /usr/bin/postman ] && sudo rm /usr/bin/postman
sudo ln -sf /opt/Postman/app/Postman /usr/bin/postman
@jgaydos
jgaydos / keyboard_color.sh
Created February 14, 2019 01:48
Set msi-keyboard color
#!/bin/bash
msi-keyboard -m normal -c left,red,medium -c middle,purple,medium -c right,sky,medium
@jgaydos
jgaydos / set_current_gpu_nvidia.sh
Created February 14, 2019 01:47
Set current GPU Nvidia
#!/bin/bash
sudo prime-select nvidia
@jgaydos
jgaydos / set_current_gpu_intel.sh
Created February 14, 2019 01:46
Set current GPU Intel
#!/bin/bash
sudo prime-select intel
@jgaydos
jgaydos / current_gpu.sh
Created February 14, 2019 01:45
Current GPU
#!/bin/bash
sudo prime-select query
@jgaydos
jgaydos / add_variable.sh
Created February 14, 2019 01:33
Setting system variables when they wont stick
#!/bin/bash
# This is useful for setting variables when they will not stick
echo "Enter variable name: "
read variable_name
echo "Enter variable value: "
read variable_value
echo "adding " $variable_name " to einvironment variables: " $variable_value