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
# Uncomment $Workspace_Dir set preferred location (defaults to $home): | |
# $Workspace_Dir="Documents\workspace" | |
Set-Location $home\$Workspace_Dir | |
set-alias dc 'docker-compose' | |
set-alias vim 'nvim-qt' | |
set-alias ll 'dir' | |
set-alias grep 'findstr' | |
function rmrf { |
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 | |
# Used to help older DLNA clients (e.g. PS3) convert mkv file audio | |
# (requirement) mediainfo | |
for mkvFile in $(find ./ -iname "*.mkv" ); do | |
# Greps the output from mediainfo (required to run script) | |
eacMatch=$(mediainfo $mkvFile | grep -cim1 "A_EAC3"); | |
# Find files that contain EAC audio | |
if [[ ${eacMatch} -ge 1 ]]; then | |
# Create directories to process files |
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
[merge] | |
tool = vs | |
[mergetool "vs"] | |
cmd = /home/XXX/win_merge.sh merge $LOCAL $REMOTE $BASE $MERGED | |
trustExitCode = false | |
[mergetool] | |
keepBackup = false | |
[diff] | |
tool = vs | |
[difftool "vs"] |
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
for advisory in $(npm audit | grep 'More Info' | awk -F':' '{print "https:" $3}' | sort -u); do open $advisory; 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 | |
# YOU HAVE TO RUN WITH ROOT | |
# AND YOU NEED TO INSTALL JAVA FIRST | |
# You can install it on Debian/Ubuntu with: "sudo apt-get install openjdk-8-jre" | |
dir="/opt/minecraft" | |
# Script to make Install of Minecraft | |
makeInstall() { |
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
# Add field | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}' | |
# { | |
# "hello": "world", | |
# "foo": "bar" | |
# } | |
# Override field value | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}' | |
{ |
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
## Attach to running tmuxinator/start a new tmuxinator session w/ fuzzy list | |
tmuxa () { | |
if [[ "$(tmux list-sessions -F '#S'&>/dev/null| wc -l)" -ne 0 ]]; then | |
muxSessions='' | |
muxSessionsList=$(tmuxinator ls | cut -d':' -f 2 | tr '[:blank:]' '\n') | |
while IFS= read -r line; do | |
# Denote running sessions with asterisk | |
if [[ "${line}" == *"$(tmux ls | cut -d':' -f 1)"* ]]; then | |
muxSessions+="$(echo $line | sed -e "s|$line|$line [*]|g")\n" | |
elif [[ "${line}" ]]; 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
# Consul and Vault k8s cli clients for working with k8s cluster consul and vault per namespace | |
# Mac: brew install consul vault | |
# Consul v1.4.4 | |
# Vault v1.1.1 | |
# kubectl (client: v1.14.1, server: v1.10.11) | |
# export k8s namespace if you use namespace, otherwise use default: | |
export NAMESPACE=<your-namespace-or-just-put-default> | |
export VAULT_TOKEN=<your-vault-token> |
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 kc='kubectl' | |
alias kclf='kubectl logs --tail=200 -f' | |
alias kcgs='kubectl get service -o wide' | |
alias kcgd='kubectl get deployment -o wide' | |
alias kcgp='kubectl get pod -o wide' | |
alias kcgn='kubectl get node -o wide' | |
alias kcdp='kubectl describe pod' | |
alias kcds='kubectl describe service' | |
alias kcdd='kubectl describe deployment' | |
alias kcdf='kubectl delete -f' |
NewerOlder