Skip to content

Instantly share code, notes, and snippets.

@TylerJWhit
TylerJWhit / FreeNAS Permissions
Last active January 12, 2017 03:14
Reset permissions FreeNAS
find . -type d -print0 | xargs -L 1 -0 -I'{}' setfacl -m everyone@:full_set:fd:allow "{}"
find . -type f -print0 | xargs -L 1 -0 -I'{}' setfacl -m everyone@:full_set::allow "{}"
@TylerJWhit
TylerJWhit / ddprogress
Last active August 29, 2015 14:20
dd view progress
while true; do killall -SIGUSR1 dd; sleep 2; done
@TylerJWhit
TylerJWhit / Backupfix.bat
Created April 29, 2015 20:17
Windows Backup Fix
REM : Register VSS componant for Windows Serve r2008
REM : You will need to run the batch file as Administrator.
REM : This is only for Windows 2008 not Windows 2003.
REM : After running the bat file, you will need to reboot the server to bring all of the writers into a stable state.
net stop "System Event Notification Service"
net stop "Background Intelligent Transfer Service"
net stop "COM+ Event System"
net stop "Microsoft Software Shadow Copy Provider"
@TylerJWhit
TylerJWhit / thunderbird css
Created August 7, 2015 23:24
userChrome.css for thread view expansion
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* set default namespace to XUL */
#threadTree treechildren:-moz-tree-row {
height:35px !important;
}
@TylerJWhit
TylerJWhit / Fixing xdg-open
Created September 2, 2015 21:55
When Ubuntu doesn't play nice with XFCE and mime types. Change generic to xfce in /usr/bin/xdg-open
detectDE
if [ x"$DE" = x"" ]; then
DE=xfce
fi
@TylerJWhit
TylerJWhit / gist:5e2cfd26c9eda4bb82140788f1b75215
Last active January 11, 2017 01:38
FreeBSD Drives, Memory, Motherboard, and CPU info
geom disk list | grep 'Mediasize\|descr'; sysctl hw.physmem hw.model; dmidecode --type baseboard | grep Product
base:
'*':
- basepkgs
- sshsetup
roles:webserver:
- match: grain
- apache
@TylerJWhit
TylerJWhit / Get-InstalledApps.ps1
Last active December 7, 2019 16:02
List all applications in Windows
# Version: 0.5
# Date: 2019-01-30
# File Name: Get-InstalledApps
# Author: TylerJWhit
# Notes:
# The following commands may be of help:
#
# Run against every computer in domain.
# Get-ADComputer -Filter * | Select-Object -ExpandProperty Name | Get-InstalledApps
#
@TylerJWhit
TylerJWhit / testargs.py
Created February 16, 2019 17:47
Test argparse
import argparse
parser = argparse.ArgumentParser(description = 'Process strings')
parser.add_argument('-u', '--uppercase', action = 'store_true', default = False)
parser.add_argument('-l', '--lowercase', action = 'store_true', default = False)
parser.add_argument('-t', '--text', type=str)
@TylerJWhit
TylerJWhit / nato.py
Last active February 19, 2019 00:31
Text to Nato
import argparse
import sys
def get_argument_parser():
parser = argparse.ArgumentParser(description = 'Converts string to Nato Alphabet')
parser.add_argument('argstr', type = str)
return parser