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
# Version: 0.5 | |
# Date: 2021-04-28 | |
# File Name: Get-RemoteLocalGroupMembers | |
# Author: TylerJWhit | |
# Notes: | |
# The following commands may be of help: | |
# | |
# Run against every computer in domain. | |
# Get-ADComputer -Filter * | Select-Object -ExpandProperty Name | Get-RemoteLocalGroupMembers | |
# |
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
# Original Source https://gist.github.com/chrisnolet/46206e21d59f8250bb979a8516a9a034 | |
# Modified to stick with Pop_OS! Style. | |
parse_git_branch() { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (*\([^)]*\))*/\1/' | |
} | |
markup_git_branch() { | |
if [[ -n $@ ]]; then | |
if [[ -z $(git status --porcelain 2> /dev/null) ]]; 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
parse_git_branch() { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (*\([^)]*\))*/\1/' | |
} | |
markup_git_branch() { | |
if [[ -n $@ ]]; then | |
if [[ -z $(git status --porcelain 2> /dev/null) ]]; then | |
echo -e " \001\033[32m\002($@)\001\033[0m\002" | |
else | |
echo -e " \001\033[31m\002($@)\001\033[0m\002" |
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
# TylerJWhit | |
# RPN Calculator | |
# 2019.02.21 | |
# Example: | |
# python3 rpn.py 3 47 22 + - | |
import sys | |
import argparse |
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
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 |
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
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) |
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
# 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 | |
# |
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
base: | |
'*': | |
- basepkgs | |
- sshsetup | |
roles:webserver: | |
- match: grain | |
- apache |
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
geom disk list | grep 'Mediasize\|descr'; sysctl hw.physmem hw.model; dmidecode --type baseboard | grep Product |
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
detectDE | |
if [ x"$DE" = x"" ]; then | |
DE=xfce | |
fi |
NewerOlder