This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CreateConVar("ulx_afk_flagminutes", 8, FCVAR_ARCHIVE, "How many minutes an player can be AFK before being flagged as AFK.") | |
CreateConVar("ulx_afk_kickminutes", 10, FCVAR_ARCHIVE, "How many minutes an player can be AFK before being kicked.") | |
CreateConVar("ulx_afk_ignoreadmins", 1, FCVAR_ARCHIVE, "Should we ignore AFK admins? (1=yes, 0=no).") | |
CreateConVar("ulx_afk_kickonafk", 1, FCVAR_ARCHIVE, "Should AFK players be kicked from the server at all? (1=yes, 0=no).") | |
CreateConVar("ulx_afk_kickonlywhenfull", 0, FCVAR_ARCHIVE, "Should the script only kick afk players when the server is full? (1=yes, 0=no).") | |
local Ranks = {"superadmin", "admin", "Owner", "Admin+", "Moderator", "operator", "Co-Owner", "Server Manager"} | |
if SERVER then | |
function ulx.CheckAFK( pl ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* point_checkpoint | |
* This point entity represents a point in the world where players can trigger a checkpoint | |
* Dead players are revived | |
*/ | |
enum PointCheckpointFlags | |
{ | |
SF_CHECKPOINT_REUSABLE = 1 << 0, //This checkpoint is reusable | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
enable_http=-1 | |
chain_out="HTTP_OUTPUT" | |
while [ -v 1 ]; do | |
case $1 in | |
-E | --enable) | |
enable_http=1 | |
;; | |
-D | --disable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Prerequisites: | |
# Samba server | |
USER_SHARE_DIR="/home" # Each user gets their own directory, choose the path for this to take place. WARNING: permissions for this directory are handled by this script, set to a subdirectory if this worries you. | |
SAMBA_INCLUDES_FILE="/etc/samba/includes.conf" # This is where we will inject the includes of each user's .conf file. You need to do include = <what you set this variable to> in your smb.conf file so that our changes actually work with samba. | |
SAMBA_USER_CONF_DIR="/etc/samba/smb.conf.d" # This directory is where the script will add each samba user entry into. | |
SAMBA_GUEST_USER="guest" # If you have a guest user, put it here so that it can't get removed by this script. | |
help() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $(id -u) -ne 0 ]; then | |
echo "You must run this as root." | |
exit; | |
fi | |
IS_VERBOSE="0" | |
# Create temporary file to manage active core isolations (for all virtual machines) | |
ISOLATED_CPU_FILE="/tmp/libvirt-isolated-cpus.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Personal PulseAudio microphone toggle script | |
# Allows me to mute/unmute mic as well as send/stop sending microphone output to a virtual machine for | |
# maximum flexibility (e.g simultaneously using discord on linux, game voice chat on windows) and only needing to configure one mic ever | |
source_microphone="alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo" # Main microphone | |
source_we_wanna_send_to_vm="PulseEffects_mic.monitor" # This is PulseEffects mic output (since it improves the quality of the Main microphone) | |
sink_wired_to_vm_sound="alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo" # A soundcard that is quite literally wired to another soundcard which is passed in a Virtual Machine. Lmao. Hey, it works.. | |
pid_file="/tmp/pa_mic_loopback.pid" # Where the last pactl module ID will be saved to. | |
# Arguments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MAX_WAIT="10" | |
[[ -z "$1" ]] && exit 1 || MOUNT="$1" | |
if [[ ! -z "$2" ]]; then | |
reg="^[0-9]+$" && [[ ! "$2" =~ $reg ]] && exit 1 | |
MAX_WAIT="$2" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
maxnum="99999999" | |
while getopts ":c:d:a:n:" opt; do | |
case "$opt" in | |
c) content=$OPTARG ;; | |
d) dest=$OPTARG ;; | |
a) audio=$OPTARG ;; | |
n) maxnum=$OPTARG ;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
user="$1" | |
if ! [[ `id "$user" 2> /dev/null` ]]; then | |
echo "Not a valid user" 1>&2 && exit 1 | |
fi | |
if [[ `echo "$user" | grep "|"` ]]; then | |
echo "Username cannot have '|'" 1>&2 && exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Forces gamescope to be the desktop session on boot | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/sh -c 'grep gamescope /etc/sddm.conf.d/zz-steamos-autologin.conf || sudo -u deck /usr/sbin/steamos-session-select gamescope' | |
[Install] | |
WantedBy=multi-user.target |
OlderNewer