Skip to content

Instantly share code, notes, and snippets.

View MrDrMcCoy's full-sized avatar

Jeremy McCoy MrDrMcCoy

View GitHub Profile
@MrDrMcCoy
MrDrMcCoy / linkdupes.py
Last active December 11, 2017 23:58
A simple duplicate file finder
#!/usr/bin/python2
def linkdupes(base_dir, loglevel='DEBUG'):
import logging, mimetypes, os, zlib
logging.basicConfig(format='%(asctime)s | %(levelname)s | %(funcName)s | %(message)s')
logger = logging.getLogger('linkdupes')
logger.setLevel(logging.getLevelName(loglevel))
mimetypes.add_type('audio/ape', '.ape')
hashes = {}
#!/bin/bash
trap exit SIGINT SIGTERM
sshcmd="ssh -q -o StrictHostKeyChecking=no"
hostlist=""
username=""
outfile=""
totalhosts=0
while getopts :u:f:o:h arg ; do
case $arg in
u)
@MrDrMcCoy
MrDrMcCoy / update-workstation.bash
Last active March 18, 2022 09:16
Install and update VMware Workstation and Horizon View Client for OpenSUSE Tumbleweed
#!/bin/bash
#this script can be run from:
#curl -Ls https://git.io/vie2W | bash -s -- -i
trap exit SIGINT SIGTERM SIGKILL
function usage () {
echo "
About:
This script installs and updates the necessary kernel modules for VMware Workstation and the Horizon View Client to work on OpenSUSE Tumbleweed x64.
@MrDrMcCoy
MrDrMcCoy / tumbleweed-setup.bash
Last active July 10, 2021 23:46
This script sets up my preferred OpenSuSE Tumbleweed desktop so that I can get on with work and play without fuss.
#!/bin/bash -ve
#####
# This script will take a fresh OpenSuse Tumbleweed (KDE Plasma Desktop) install and make it suitable for getting stuff done.
#####
trap exit INT TERM QUIT HUP ERR
# add tmpfs mount for better speed
grep ' /tmp ' /etc/fstab >/dev/null || sudo tee -a /etc/fstab <<< "tmpfs /tmp tmpfs noatime,nodiratime"