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
# CCH - Bash Profile Settings # | |
# user@hostname:where<ex.~>$ | |
export PS1="\e[1;33m\u@\h:\e[1;36m\w\e[0m\$ " | |
# colors | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
alias c='clear' |
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
alias c='clear' | |
alias f='thunar' #or applicable file manager | |
alias tlist='tmux list-sessions' | |
alias sbrc='source ~/.bashrc' | |
alias s='sudo' |
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 | |
# This tiny script outputs Github commit messages into the speech bubble of Tux ascii art | |
# The commit messages are curl'd from whatthecommit.com | |
# You need the cowsay application | |
# Check with: `which cowsay` | |
# Install with: `sudo apt-get install cowsay` | |
MSG=$(curl -s whatthecommit.com/index.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 | |
# Installation script to load homebrew | |
# -- Cole Hocking | |
# ----------------------------------------------------------------------------- | |
# Verify Homebrew installation for package management | |
# Docs: https://brew.sh/ | |
go_brew() { | |
echo "Checking for Homebrew package management tool..." |
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
####################### | |
## Github Cheatsheet ## | |
####################### | |
# Git Global Setup # | |
git config --global user.name "Cole Hocking" | |
git config --global user.email "<my-email-addr>" | |
# Token Authentication # | |
( Settings --> <> Developer Settings --> Personal Access Tokens) |
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
def dumpClean(obj): | |
""" | |
Recursive function to clean the output of deeply nested dicts/lists | |
""" | |
if type(obj) == dict: | |
for k, v in obj.items(): | |
# if the object has an iterable attribute; keep pulling it apart | |
if hasattr(v, '__iter__'): | |
print("%s : %s" % (k, dumpClean(v))) | |
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/bash | |
# Gather AWS Domain info | |
declare -a domain_list=( $(aws route53domains list-domains | jq -r .Domains[].DomainName) ) | |
for domain in "${domain_list[@]}" | |
do | |
echo ${domain} | |
echo "Admin Contact:" |
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 | |
declare -a domain_list=( $(aws route53domains list-domains | jq -r .Domains[].DomainName) ) | |
for domain in "${domain_list[@]}" | |
do | |
# Returns date in unix timestamp | |
date_unix=$(aws route53domains get-domain-details --domain-name ${domain} | jq -r .ExpirationDate) | |
date -r ${date_unix} | |
done |
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 | |
# Find a list of strings in OG_LIST in OTHER LIST; export to FINAL_LIST | |
OG_LIST=$1 | |
OTHER_LIST=$2 | |
FINAL_LIST=$3 | |
diff -iEwBay --strip-trailing-cr $OG_LIST $OTHER_LIST | grep -v "|" | grep -v "<" | grep -v ">" | awk '{print $1 " " $2}' > $FINAL_LIST |
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 | |
# Use the OSX smbutil to query a file of IPs | |
# use 'lookup' instead of 'status' to get IPs from Netbi names | |
file="$1" | |
while read -r line; do | |
smbutil status "$line" |
OlderNewer