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 | |
set_edid() { | |
read -p "enter file location of .hex edid: " edid | |
if ! [ -f "$edid" ]; then | |
echo "edid file does not exist" | |
exit 1 | |
fi | |
kvmd-edidconf --import="$edid" | |
} |
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
#!/usr/bin/env bash | |
# | |
# Program: Domain Expiration Check <domain-check> | |
# | |
# Author: Matty < matty91 at gmail dot com > | |
# | |
# Current Version: 2.18 | |
# Last Updated: 07-Jan-2019 | |
# |
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
#Requires -Version 7.3 | |
$global:UserInput = $null | |
$global:PrintPipelineProcess = "printfilterpipelinesvc" | |
$global:PrintPipelineExe = "C:\Windows\System32\printfilterpipelinesvc.exe" | |
$global:SpoolerService = "spooler" | |
$global:SpoolDirectory = "C:\Windows\System32\spool\PRINTERS" | |
$global:CurrentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) | |
function GetItemsInQueue() { |
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
$global:OutlookPstMaxFileSize = 0 | |
$global:ComputerName = [System.Net.Dns]::GetHostName() | |
$global:Registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('CurrentUser', $global:ComputerName) | |
$global:OutlookDataSizeRegistryPath = $global:Registry.OpenSubKey("Software\Microsoft\Office\16.0\Outlook\PST", $true) | |
$FileSize = Read-Host "Write file size in GB for max PST size" | |
$global:OutlookDataSizeRegistryPath.SetValue("MaxLargeFileSize", ([int]$FileSize * 1024)) | |
# I'm using $global variables for convenience as this script may be added to later to include more outlook functionality and registry interactions. |
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 | |
_backup_serv="username@ip_address" | |
_backup_loc="/volume1/backups/example" | |
_current_date=$(date '+%Y-%m-%d-%H:%M:%S') | |
if [[ $1 == "--backup-sys" ]]; then | |
if [[ $2 == "--test" ]]; then | |
rsync -aXv --delete --dry-run --rsync-path="mkdir -p $_backup_loc/$_current_date && rsync" --exclude="/media" --exclude="/mnt" --exclude="/proc" --exclude="/sys" --exclude="/var/lock/" --exclude="/var/lock/" --exclude="/var/run/" / $_backup_serv:$_backup_loc/$_current_date | |
else |
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/sh | |
userresources=$HOME/.Xresources | |
usermodmap=$HOME/.Xmodmap | |
sysresources=/etc/X11/xinit/.Xresources | |
sysmodmap=/etc/X11/xinit/.Xmodmap | |
# merge in defaults and keymaps | |
if [ -f $sysresources ]; then |
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
FROM php:7.2.5-fpm | |
# Copy composer.lock and composer.json | |
COPY composer.lock composer.json /var/www/ | |
# Set working directory | |
WORKDIR /var/www | |
# Install dependencies | |
RUN apt-get update && apt-get install -y \ |
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/sh | |
ALERT=90 | |
EXCLUDE_LIST="/dev/hdd1|/dev/hdd2" | |
main_prog() { | |
while read -r output; | |
do | |
usep=$(echo "$output" | awk '{ print $1}' | cut -d'%' -f1) | |
partition=$(echo "$output" | awk '{print $2}') |
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 | |
change_swap() { | |
read -rp "Size to change swap file to in whole number format e.g. 8 for 8GB >> " swap_file_size | |
read -rp "Specify swapfile path/to/file >> " swap_file | |
echo "Turning off swap for all swap files" | |
if swapoff -a ; then | |
echo "Turning off swap successful. DD'ing $swap_file to size $swap_file_size" | |
if dd if=/dev/zero of="$swap_file" bs=1G count="$swap_file_size" ; then | |
echo "dd done, setting file permissions for swap" |
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 | |
# Device naming | |
dev_one="" | |
dev_two="" | |
raid_device="" | |
raid_uuid=$(uuidgen) | |
efi_sysname="" | |
install_name="" |
NewerOlder