more git/docker/http CLI friendly tools/aliases

- also thank you Kevin
This commit is contained in:
MorganGeek 2020-03-06 12:19:52 +01:00
parent dd01934403
commit a111ae0168
6 changed files with 39 additions and 4 deletions

View File

@ -34,6 +34,13 @@ repos:
# - id: git-dirty # - id: git-dirty
- id: forbid-binary - id: forbid-binary
- id: bundler-audit - id: bundler-audit
- repo: https://github.com/cesar-rodriguez/terrascan
rev: v0.2.0
hooks:
- id: terrascan
pass_filenames: false
args: [-l=infra] #NOTE: that this is the directory you created earlier to host your terraform
verbose: true
#- repo: https://github.com/ansible/ansible-lint.git #- repo: https://github.com/ansible/ansible-lint.git
# rev: v4.1.0 # rev: v4.1.0
# hooks: # hooks:

View File

@ -15,6 +15,10 @@ tap "instrumenta/instrumenta" # provides kubeval
tap "weaveworks/tap" # provides eksctl tap "weaveworks/tap" # provides eksctl
tap "b4b4r07/tap" # provides gomi a replacement for rm command tap "b4b4r07/tap" # provides gomi a replacement for rm command
tap "eddieantonio/eddieantonio" # provides imgcat, cat but for images tap "eddieantonio/eddieantonio" # provides imgcat, cat but for images
tap "jesseduffield/lazygit" # provides lazygit, simple terminal UI for git commands
tap "jesseduffield/lazydocker" # provides lazydocker, simple terminal UI for managnig docker
tap "skanehira/docui" # provides docui, simple terminal UI for creating/configuring docker services
cask "java" cask "java"
cask "iterm2" cask "iterm2"
cask "zoomus" cask "zoomus"
@ -169,3 +173,7 @@ brew "kubeval" # linter for kubernetes config files
brew "eksctl" brew "eksctl"
brew "gomi" # replacement for rm command brew "gomi" # replacement for rm command
brew "imgcat" # cat for images brew "imgcat" # cat for images
brew "lazygit" # simple terminal UI for git commands
brew "lazydocker" # simple terminal UI for managing docker
brew "docui" # simple terminal UI for creating/configuring docker services
brew "httpie" # provides http - a command line HTTP client that will make you smile.

View File

@ -34,6 +34,13 @@ repos:
# - id: git-dirty # - id: git-dirty
- id: forbid-binary - id: forbid-binary
- id: bundler-audit - id: bundler-audit
- repo: https://github.com/cesar-rodriguez/terrascan
rev: v0.2.0
hooks:
- id: terrascan
pass_filenames: false
args: [-l=infra] #NOTE: that this is the directory you created earlier to host your terraform
verbose: true
#- repo: https://github.com/ansible/ansible-lint.git #- repo: https://github.com/ansible/ansible-lint.git
# rev: v4.1.0 # rev: v4.1.0
# hooks: # hooks:

View File

@ -8,6 +8,8 @@ alias gcls='git clone --depth 1 --recurse-submodules'
alias cm='chezmoi' alias cm='chezmoi'
alias grep='rg' alias grep='rg'
alias npmlist='npm list -g --depth 0' alias npmlist='npm list -g --depth 0'
alias lg='lazygit'
alias lzd='lazydocker'
# Jira # Jira
alias jirasearch='issues' alias jirasearch='issues'
@ -88,6 +90,7 @@ alias hist='history'
alias music='baton' alias music='baton'
alias path='echo -e ${PATH//:/\\n}' # Explode and display current PATH alias path='echo -e ${PATH//:/\\n}' # Explode and display current PATH
alias ping='prettyping -c 5 --nolegend' # Stop after sending count ECHO_REQUEST packets alias ping='prettyping -c 5 --nolegend' # Stop after sending count ECHO_REQUEST packets
alias https='http --default-scheme=https' # useful alias stealed from a colleague. http is provided by httpie
alias p='ps -ef | grep -i ' # Show matching processes. Usage : p <process name> alias p='ps -ef | grep -i ' # Show matching processes. Usage : p <process name>
alias root='sudo -i' alias root='sudo -i'
alias s=ls alias s=ls

View File

@ -66,16 +66,16 @@ function top_commands_full() {
} }
function istherenewissues() { function istherenewissues() {
LASTISSUE=$(newissues | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g' | awk 'FNR==2{print $2}') LASTISSUE=$(newissues | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g' | awk 'FNR==2{print $2}')
if [[ -f ".newjiraissue" ]] if [[ -f "$HOME/.newjiraissue" ]]
then then
previous_jira_issue=$(cat ".newjiraissue" | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g') # the sed part is for removing output colors previous_jira_issue=$(cat "$HOME/.newjiraissue" | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g') # the sed part is for removing output colors
if [ "$LASTISSUE" != "$previous_jira_issue" ]; then if [ "$LASTISSUE" != "$previous_jira_issue" ]; then
newissues newissues
else else
echo "no new issue" echo "no new issue"
fi fi
fi fi
echo "$LASTISSUE" > .newjiraissue echo "$LASTISSUE" > "$HOME/.newjiraissue"
} }
function aboutpage() { function aboutpage() {
year=$(echo "$*" | egrep -Eo '\b[[:digit:]]{4}\b' | head -n1) year=$(echo "$*" | egrep -Eo '\b[[:digit:]]{4}\b' | head -n1)
@ -262,3 +262,13 @@ function terragrunt_color {
-e "s/\( *.*: *\)\(\".*\"\)\( => \)\(\".*\"\)/${YELLOW}\1${RED}\2${BLACK}\3${GREEN}\4${RESET}/" \ -e "s/\( *.*: *\)\(\".*\"\)\( => \)\(\".*\"\)/${YELLOW}\1${RED}\2${BLACK}\3${GREEN}\4${RESET}/" \
-e "s/\( *.*: *\".*\"\)/${GREEN}\1${RESET}/" -e "s/\( *.*: *\".*\"\)/${GREEN}\1${RESET}/"
} }
function git-project {
if [ -d "$REPO_PATH" ]; then
REPO_PATH="$(pwd)"
fi
local preview='lsd --color always --icon always --group-dirs first {}'
local dir=$(find $REPO_PATH -maxdepth 3 -type d -name ".git" | sed 's#.git$##' | fzf --select-1 --query="$*" --preview "$preview")
if [[ -n "$dir" ]]; then
cd "$dir"
fi
}

View File

@ -124,7 +124,7 @@ source $ZSH/oh-my-zsh.sh
# export SSH_KEY_PATH="~/.ssh/rsa_id" # export SSH_KEY_PATH="~/.ssh/rsa_id"
export JETBRAINS_LICENSE_SERVER=https://licenseserver.collibra.com export JETBRAINS_LICENSE_SERVER=https://licenseserver.collibra.com
export REPO_PATH=$HOME/Code
# Set personal aliases, overriding those provided by oh-my-zsh libs, # Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh # plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder. # users are encouraged to define aliases within the ZSH_CUSTOM folder.