secrets, jenkins tricks and productivity

- created jenkins file linter script
- created vim script for validating jenkinsfiles
- adapt all configs to use secrets
- load secrets from hidden file
+ vim script
- tune vim (plugins - icons/fonts/features...)
- new aliases (music, jira, git, ...)
This commit is contained in:
MorganGeek 2020-06-24 09:51:04 +02:00
parent cf026f47a4
commit 9e5c369133
12 changed files with 494 additions and 16 deletions

View File

@ -20,7 +20,7 @@ tap "jesseduffield/lazydocker" # provides lazydocker, simple terminal UI for man
tap "skanehira/docui" # provides docui, simple terminal UI for creating/configuring docker services tap "skanehira/docui" # provides docui, simple terminal UI for creating/configuring docker services
tap "romkatv/powerlevel10k" # provides powerlevel10k tap "romkatv/powerlevel10k" # provides powerlevel10k
tap "shopify/shopify" # provides toxiproxy tap "shopify/shopify" # provides toxiproxy
tap "homebrew/cask-fonts" # provides fonts used by vim-devicons https://vimawesome.com/plugin/vim-devicons https://github.com/ryanoasis/nerd-fonts#font-installation
cask "java" cask "java"
cask "iterm2" cask "iterm2"
@ -56,6 +56,7 @@ cask "brave-browser"
cask "dropbox" cask "dropbox"
cask "rescuetime" cask "rescuetime"
cask "wireshark" cask "wireshark"
cask "font-hack-nerd-font" # provides fonts used by vim-devicons https://vimawesome.com/plugin/vim-devicons https://github.com/ryanoasis/nerd-fonts#font-installation
# Mac app store # Mac app store
mas 'Keynote', id: 409183694 mas 'Keynote', id: 409183694
@ -187,3 +188,4 @@ brew "hyperfine" # CLI benchmark tool
brew "powerlevel10k" brew "powerlevel10k"
brew "translate-shell" # provides the trans command, more doc via https://www.ostechnix.com/use-google-translate-commandline-linux/ brew "translate-shell" # provides the trans command, more doc via https://www.ostechnix.com/use-google-translate-commandline-linux/
brew "toxiproxy" brew "toxiproxy"
brew "bitwarden-cli"

View File

@ -0,0 +1,384 @@
{
"Ansi 6 Color" : {
"Red Component" : 0.16470588235294117,
"Color Space" : "sRGB",
"Blue Component" : 0.59607843137254901,
"Green Component" : 0.63137254901960782
},
"Tags" : [
],
"Ansi 12 Color" : {
"Red Component" : 0.51372549019607838,
"Color Space" : "sRGB",
"Blue Component" : 0.58823529411764708,
"Green Component" : 0.58039215686274515
},
"Use Non-ASCII Font" : false,
"Normal Font" : "HackNerdFontCompleteM-Regular 14",
"Bold Color" : {
"Red Component" : 0.57647058823529407,
"Color Space" : "sRGB",
"Blue Component" : 0.63137254901960782,
"Green Component" : 0.63137254901960782
},
"Custom Directory" : "No",
"Ansi 0 Color" : {
"Red Component" : 0.041207635309547186,
"Color Space" : "sRGB",
"Blue Component" : 0.246246337890625,
"Alpha Component" : 1,
"Green Component" : 0.20454354275567976
},
"Guid" : "15B87686-16CF-448A-9B73-5E38F56A2179",
"Rows" : 25,
"Default Bookmark" : "No",
"Cursor Guide Color" : {
"Red Component" : 0.70213186740875244,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 0.25,
"Green Component" : 0.9268307089805603
},
"Non-ASCII Anti Aliased" : true,
"Use Bright Bold" : true,
"Ansi 10 Color" : {
"Red Component" : 0.34509803921568627,
"Color Space" : "sRGB",
"Blue Component" : 0.45882352941176469,
"Green Component" : 0.43137254901960786
},
"Ambiguous Double Width" : false,
"Jobs to Ignore" : [
"rlogin",
"ssh",
"slogin",
"telnet"
],
"Ansi 15 Color" : {
"Red Component" : 0.99215686274509807,
"Color Space" : "sRGB",
"Blue Component" : 0.8901960784313725,
"Green Component" : 0.96470588235294119
},
"Foreground Color" : {
"Red Component" : 0.51372549019607838,
"Color Space" : "sRGB",
"Blue Component" : 0.58823529411764708,
"Green Component" : 0.58039215686274515
},
"Working Directory" : "\/Users\/morganwattiez",
"Use Tab Color" : false,
"Blinking Cursor" : false,
"Disable Window Resizing" : true,
"Sync Title" : false,
"Prompt Before Closing 2" : false,
"BM Growl" : true,
"Command" : "",
"Description" : "Default",
"Mouse Reporting" : true,
"Screen" : -1,
"Selection Color" : {
"Red Component" : 0.027450980392156862,
"Color Space" : "sRGB",
"Blue Component" : 0.25882352941176473,
"Green Component" : 0.21176470588235294
},
"Columns" : 80,
"Idle Code" : 0,
"Ansi 13 Color" : {
"Red Component" : 0.42352941176470588,
"Color Space" : "sRGB",
"Blue Component" : 0.7686274509803922,
"Green Component" : 0.44313725490196076
},
"Custom Command" : "No",
"ASCII Anti Aliased" : true,
"Non Ascii Font" : "Monaco 12",
"Vertical Spacing" : 1,
"Use Bold Font" : true,
"Option Key Sends" : 0,
"Selected Text Color" : {
"Red Component" : 0.57647058823529407,
"Color Space" : "sRGB",
"Blue Component" : 0.63137254901960782,
"Green Component" : 0.63137254901960782
},
"Background Color" : {
"Red Component" : 0.0055023282766342163,
"Color Space" : "sRGB",
"Blue Component" : 0.1885986328125,
"Alpha Component" : 1,
"Green Component" : 0.15130124290420305
},
"Character Encoding" : 4,
"Ansi 11 Color" : {
"Red Component" : 0.396078431372549,
"Color Space" : "sRGB",
"Blue Component" : 0.51372549019607838,
"Green Component" : 0.4823529411764706
},
"Use Italic Font" : true,
"Unlimited Scrollback" : true,
"Keyboard Map" : {
"0xf700-0x260000" : {
"Action" : 10,
"Text" : "[1;6A"
},
"0x37-0x40000" : {
"Action" : 11,
"Text" : "0x1f"
},
"0x32-0x40000" : {
"Action" : 11,
"Text" : "0x00"
},
"0xf709-0x20000" : {
"Action" : 10,
"Text" : "[17;2~"
},
"0xf70c-0x20000" : {
"Action" : 10,
"Text" : "[20;2~"
},
"0xf729-0x20000" : {
"Action" : 10,
"Text" : "[1;2H"
},
"0xf72b-0x40000" : {
"Action" : 10,
"Text" : "[1;5F"
},
"0xf705-0x20000" : {
"Action" : 10,
"Text" : "[1;2Q"
},
"0xf703-0x260000" : {
"Action" : 10,
"Text" : "[1;6C"
},
"0xf700-0x220000" : {
"Action" : 10,
"Text" : "[1;2A"
},
"0xf701-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x42"
},
"0x38-0x40000" : {
"Action" : 11,
"Text" : "0x7f"
},
"0x33-0x40000" : {
"Action" : 11,
"Text" : "0x1b"
},
"0xf703-0x220000" : {
"Action" : 10,
"Text" : "[1;2C"
},
"0xf701-0x240000" : {
"Action" : 10,
"Text" : "[1;5B"
},
"0xf70d-0x20000" : {
"Action" : 10,
"Text" : "[21;2~"
},
"0xf702-0x260000" : {
"Action" : 10,
"Text" : "[1;6D"
},
"0xf729-0x40000" : {
"Action" : 10,
"Text" : "[1;5H"
},
"0xf706-0x20000" : {
"Action" : 10,
"Text" : "[1;2R"
},
"0x34-0x40000" : {
"Action" : 11,
"Text" : "0x1c"
},
"0xf700-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x41"
},
"0x2d-0x40000" : {
"Action" : 11,
"Text" : "0x1f"
},
"0xf70e-0x20000" : {
"Action" : 10,
"Text" : "[23;2~"
},
"0xf702-0x220000" : {
"Action" : 10,
"Text" : "[1;2D"
},
"0xf703-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x43"
},
"0xf700-0x240000" : {
"Action" : 10,
"Text" : "[1;5A"
},
"0xf707-0x20000" : {
"Action" : 10,
"Text" : "[1;2S"
},
"0xf70a-0x20000" : {
"Action" : 10,
"Text" : "[18;2~"
},
"0x35-0x40000" : {
"Action" : 11,
"Text" : "0x1d"
},
"0xf70f-0x20000" : {
"Action" : 10,
"Text" : "[24;2~"
},
"0xf703-0x240000" : {
"Action" : 10,
"Text" : "[1;5C"
},
"0xf701-0x260000" : {
"Action" : 10,
"Text" : "[1;6B"
},
"0xf702-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x44"
},
"0xf72b-0x20000" : {
"Action" : 10,
"Text" : "[1;2F"
},
"0x36-0x40000" : {
"Action" : 11,
"Text" : "0x1e"
},
"0xf708-0x20000" : {
"Action" : 10,
"Text" : "[15;2~"
},
"0xf701-0x220000" : {
"Action" : 10,
"Text" : "[1;2B"
},
"0xf70b-0x20000" : {
"Action" : 10,
"Text" : "[19;2~"
},
"0xf702-0x240000" : {
"Action" : 10,
"Text" : "[1;5D"
},
"0xf704-0x20000" : {
"Action" : 10,
"Text" : "[1;2P"
}
},
"Window Type" : 0,
"Cursor Boost" : 0,
"Background Image Location" : "",
"Blur" : false,
"Badge Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Alpha Component" : 0.5,
"Green Component" : 0.1491314172744751
},
"Scrollback Lines" : 0,
"Send Code When Idle" : false,
"Close Sessions On End" : true,
"Terminal Type" : "xterm-256color",
"Visual Bell" : true,
"Flashing Bell" : false,
"Silence Bell" : true,
"Use Underline Color" : false,
"Ansi 14 Color" : {
"Red Component" : 0.57647058823529407,
"Color Space" : "sRGB",
"Blue Component" : 0.63137254901960782,
"Green Component" : 0.63137254901960782
},
"Name" : "MorganGeek",
"Cursor Text Color" : {
"Red Component" : 0.027450980392156862,
"Color Space" : "sRGB",
"Blue Component" : 0.25882352941176473,
"Green Component" : 0.21176470588235294
},
"Minimum Contrast" : 0.72345525568181823,
"Shortcut" : "",
"Cursor Color" : {
"Red Component" : 0.51372549019607838,
"Color Space" : "sRGB",
"Blue Component" : 0.58823529411764708,
"Green Component" : 0.58039215686274515
},
"Transparency" : 0,
"Ansi 1 Color" : {
"Red Component" : 0.86274509803921573,
"Color Space" : "sRGB",
"Blue Component" : 0.18431372549019609,
"Green Component" : 0.19607843137254902
},
"Horizontal Spacing" : 1,
"Link Color" : {
"Red Component" : 0,
"Color Space" : "sRGB",
"Blue Component" : 0.73423302173614502,
"Alpha Component" : 1,
"Green Component" : 0.35916060209274292
},
"Ansi 2 Color" : {
"Red Component" : 0.52156862745098043,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Green Component" : 0.59999999999999998
},
"Right Option Key Sends" : 0,
"Ansi 3 Color" : {
"Red Component" : 0.70980392156862748,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Green Component" : 0.53725490196078429
},
"Ansi 7 Color" : {
"Red Component" : 0.93333333333333335,
"Color Space" : "sRGB",
"Blue Component" : 0.83529411764705885,
"Green Component" : 0.90980392156862744
},
"Ansi 8 Color" : {
"Red Component" : 0.093540579080581665,
"Color Space" : "sRGB",
"Blue Component" : 0.489013671875,
"Alpha Component" : 1,
"Green Component" : 0.40845434382630458
},
"Ansi 9 Color" : {
"Red Component" : 0.79607843137254897,
"Color Space" : "sRGB",
"Blue Component" : 0.086274509803921567,
"Green Component" : 0.29411764705882354
},
"Ansi 4 Color" : {
"Red Component" : 0.14901960784313725,
"Color Space" : "sRGB",
"Blue Component" : 0.82352941176470584,
"Green Component" : 0.54509803921568623
},
"Ansi 5 Color" : {
"Red Component" : 0.82745098039215681,
"Color Space" : "sRGB",
"Blue Component" : 0.50980392156862742,
"Green Component" : 0.21176470588235294
}
}

0
dot_p10k_dot_zsh → dot_p10k.zsh Normal file → Executable file
View File

View File

@ -4,7 +4,13 @@ export PATH="$PATH:$HOME/.rvm/bin"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
alias proxy='ssh -D 8000 -N $(whoami)@management.collibra.com -i ~/.ssh/id_ed25519' export PROXY_HOST=""
export JETBRAINS_LICENSE_SERVER=https://licenseserver.collibra.com export JETBRAINS_LICENSE_SERVER=""
if test -f "$HOME/.secrets"; then
chmod +x "$HOME/.secrets"
source "$HOME/.secrets"
alias proxy='ssh -D 8000 -N $(whoami)@$PROXY_HOST -i ~/.ssh/id_ed25519'
fi
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"

View File

@ -29,6 +29,9 @@ Darwin)
;; ;;
esac esac
# Path to ruby
export PATH="/usr/local/opt/ruby/bin:$PATH"
# Create symbolic links # Create symbolic links
echo "Creating symbolic links" echo "Creating symbolic links"
ln -snf ~/Code/dotfiles/dot_profile ~/.profile ln -snf ~/Code/dotfiles/dot_profile ~/.profile
@ -39,7 +42,11 @@ ln -snf ~/Code/dotfiles/dot_bash_profile ~/.bash_profile
ln -snf ~/Code/dotfiles/dot_gitconfig ~/.gitconfig ln -snf ~/Code/dotfiles/dot_gitconfig ~/.gitconfig
ln -snf ~/Code/dotfiles/dot_macos ~/.macos ln -snf ~/Code/dotfiles/dot_macos ~/.macos
ln -snf ~/Code/dotfiles/dot_scripts ~/.scripts ln -snf ~/Code/dotfiles/dot_scripts ~/.scripts
ln -snf ~/Code/dotfiles/dot_scripts/checkci.sh /usr/local/bin/checkci
ln -snf ~/Code/dotfiles/dot_vimrc ~/.vimrc ln -snf ~/Code/dotfiles/dot_vimrc ~/.vimrc
# custom linters
ln -snf ~/Code/dotfiles/dot_vim/ale_linters ~/.vim/ale_linters
ln -snf ~/Code/dotfiles/dot_zsh_aliases ~/.zsh_aliases ln -snf ~/Code/dotfiles/dot_zsh_aliases ~/.zsh_aliases
ln -snf ~/Code/dotfiles/dot_zsh_functions ~/.zsh_functions ln -snf ~/Code/dotfiles/dot_zsh_functions ~/.zsh_functions
ln -snf ~/Code/dotfiles/dot_zshrc ~/.zshrc ln -snf ~/Code/dotfiles/dot_zshrc ~/.zshrc
@ -49,7 +56,7 @@ ln -snf ~/Code/dotfiles/requirements.txt ~/requirements.txt
ln -snf ~/Code/dotfiles/dot_surfraw.conf ~/.surfraw.conf ln -snf ~/Code/dotfiles/dot_surfraw.conf ~/.surfraw.conf
ln -snf ~/Code/dotfiles/private_dot_3llo/config.sh ~/.3llo_config ln -snf ~/Code/dotfiles/private_dot_3llo/config.sh ~/.3llo_config
ln -snf ~/Code/dotfiles/dot_ansiweatherrc ~/.ansiweatherrc ln -snf ~/Code/dotfiles/dot_ansiweatherrc ~/.ansiweatherrc
ln -snf ~/Code/dotfiles/dot_p10k_dot_zsh ~/.p10k.zsh ln -snf ~/Code/dotfiles/dot_p10k.zsh ~/.p10k.zsh
ln -snf ~/Code/dotfiles/dot_git-template ~/.git-template ln -snf ~/Code/dotfiles/dot_git-template ~/.git-template
# Other symblinks + Install Docker Desktop for Mac # Other symblinks + Install Docker Desktop for Mac
@ -119,7 +126,7 @@ bundle install
# Install Oh My Zsh and some cool dependencies # Install Oh My Zsh and some cool dependencies
echo "Installing Oh My Zsh + customizing themes and plugins" echo "Installing Oh My Zsh + customizing themes and plugins"
echo 'source /usr/local/opt/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc echo 'source /usr/local/opt/powerlevel10k/powerlevel10k.zsh-theme' ~/.zshrc >>!
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/AlexisBRENON/oh-my-zsh-reminder "$ZSH_CUSTOM/plugins/reminder" git clone https://github.com/AlexisBRENON/oh-my-zsh-reminder "$ZSH_CUSTOM/plugins/reminder"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting"
@ -213,7 +220,7 @@ pre-commit init-templatedir ~/.git-template
terraform-docs completion zsh >/usr/local/share/zsh/site-functions/_terraform-docs terraform-docs completion zsh >/usr/local/share/zsh/site-functions/_terraform-docs
autoload -U compinit && compinit autoload -U compinit && compinit
go get -u -v github.com/jessfraz/dockfmt go get -u -v github.com/jessfraz/dockfmt
go get -u -v github.com/dmlittle/scenery go get -u -v github.com/dmlittle/scenery
go get -u -v github.com/camptocamp/terraboard go get -u -v github.com/camptocamp/terraboard

9
dot_scripts/checkci.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
function _checkci() {
local username
username="$(git config --global -l | grep "user.email" | cut -d'@' -f1 | cut -d'=' -f2)"
local jenkinsfile="${1:-Jenkinsfile}"
curl --user "$username:$JENKINS_SECRET" -X POST -F "jenkinsfile=<$jenkinsfile" "$JENKINS_URL/pipeline-model-converter/validate"
}
_checkci "$*"
exit 0

View File

@ -0,0 +1,29 @@
call ale#linter#Define('Jenkinsfile', {
\ 'name': 'checkci',
\ 'executable': 'checkci',
\ 'command': 'checkci',
\ 'callback': 'ale_linters#Jenkinsfile#checkci#HandleJenkinsValidator',
\})
function! ale_linters#Jenkinsfile#checkci#HandleJenkinsValidator(buffer, lines) abort
" Regular expression to match messages:
" They look like:
" <file>:<line>:<col>: <code> <detailed text>
" WorkflowScript: 7: Expected a step @ line 7, column 17.
"let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):?(\d+)?: \[?([[:alnum:]]+)\]? (.*)$'
let l:pattern = '\v^WorkflowScript: (\d+): (.*) \@ line (\d+), column (\d+)\.(\_.*)$'
" For each match, update the l:output list:
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:code = l:match[5]
call add(l:output, {
\ 'lnum': l:match[3] + 0,
\ 'col': l:match[4] + 0,
\ 'text': l:code . ': ' . l:match[2],
\})
endfor
return l:output
endfunction

View File

@ -43,10 +43,20 @@ Plugin 'vim-airline/vim-airline'
Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-fugitive'
" A tree explorer plugin for vim. " A tree explorer plugin for vim.
Plugin 'scrooloose/nerdtree' Plugin 'scrooloose/nerdtree'
" A Vim plugin which shows a git diff in the gutter (sign column) and stages/undoes hunks and partial hunks.
Plugin 'airblade/vim-gitgutter'
" A plugin of NERDTree showing git status " A plugin of NERDTree showing git status
Plugin 'Xuyuanp/nerdtree-git-plugin' Plugin 'Xuyuanp/nerdtree-git-plugin'
" A Vim plugin which shows a git diff in the gutter (sign column) and stages/undoes hunks and partial hunks.
Plugin 'airblade/vim-gitgutter'
" Jenkinsfile DSL Vim Syntax
Plugin 'martinda/jenkinsfile-vim-syntax'
" integrate Grep search tools with Vim
Plugin 'yegappan/grep'
" The plug-in visualizes undo history and makes it easier to browse and switch between different undo
Plugin 'mbbill/undotree'
" Intelligently reopen files at your last edit position
Plugin 'farmergreg/vim-lastplace'
" Add icons to your plugins
Plugin 'ryanoasis/vim-devicons'
" All of your Plugins must be added before the following line " All of your Plugins must be added before the following line
call vundle#end() call vundle#end()
@ -86,10 +96,12 @@ let g:ale_history_log_output = 1
let g:ale_use_global_executables = 1 let g:ale_use_global_executables = 1
let g:ale_fix_on_save = 1 let g:ale_fix_on_save = 1
let g:ale_completion_enabled = 1 let g:ale_completion_enabled = 1
let g:ale_open_list = 1
let g:ale_fixers = { let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'], \ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'python': ['black'], \ 'python': ['black'],
\ 'rust': ['rustfmt'], \ 'rust': ['rustfmt'],
\ 'Jenkinsfile': ['checkci'],
\} \}
" Enable syntax highlighting " Enable syntax highlighting
@ -149,7 +161,13 @@ let mapleader=" "
" map a specific key or shortcut to open NERDTree " map a specific key or shortcut to open NERDTree
map <C-n> :NERDTreeToggle<CR> map <C-n> :NERDTreeToggle<CR>
let g:netrw_liststyle = 3
" remove the default banner
let g:netrw_banner = 0
" set the width of directory explorer
let g:netrw_winsize = 25
" open files in a new tab
let g:netrw_browse_split = 4
let g:syntastic_javascript_checkers = [ 'jshint' ] let g:syntastic_javascript_checkers = [ 'jshint' ]
let g:syntastic_ocaml_checkers = ['merlin'] let g:syntastic_ocaml_checkers = ['merlin']

View File

@ -10,6 +10,9 @@ alias grep='rg'
alias npmlist='npm list -g --depth 0' alias npmlist='npm list -g --depth 0'
alias lg='lazygit' alias lg='lazygit'
alias lzd='lazydocker' alias lzd='lazydocker'
alias setorigin='grset origin'
alias neworigin='setorigin'
alias origin='setorigin'
# Jira # Jira
alias jirasearch='issues' alias jirasearch='issues'
@ -65,12 +68,15 @@ alias markdown='glow'
#alias done='task_done' #alias done='task_done'
# Management / Security / SSH / SSL # Management / Security / SSH / SSL
alias mgmt='ssh $(whoami)@dev-gate.collibra.com -i ~/.ssh/id_ed25519' alias mgmt='ssh $(whoami)@$PROXY_HOST -i ~/.ssh/id_ed25519'
alias m='mgmt' alias m='mgmt'
alias tunnel='ssh -D 8000 -N $(whoami)@dev-gate.collibra.com -i ~/.ssh/id_ed25519' alias tunnel='ssh -D 8000 -N $(whoami)@$PROXY_HOST -i ~/.ssh/id_ed25519'
alias sshpub='cat ~/.ssh/id_ed25519.pub' alias sshpub='cat ~/.ssh/id_ed25519.pub'
alias ssla="openssl x509 -alias -noout -in" # Usage : ssla <cert> alias ssla="openssl x509 -alias -noout -in" # Usage : ssla <cert>
alias encrypt='ansible-vault encrypt **/vault.yml --vault-password-file=~/.vaultpass'
alias decrypt='ansible-vault decrypt **/vault.yml --vault-password-file=~/.vaultpass'
# Network # Network
alias ip='echo $(curl ident.me -4 2>/dev/null)' alias ip='echo $(curl ident.me -4 2>/dev/null)'
alias ipinfo='curl "ipinfo.io/"$(ip)' alias ipinfo='curl "ipinfo.io/"$(ip)'
@ -130,6 +136,7 @@ alias tf='terraform'
alias music='baton' alias music='baton'
alias mytracks='music me saved tracks' alias mytracks='music me saved tracks'
alias saved='mytracks' alias saved='mytracks'
alias liked='saved'
alias next='music next' alias next='music next'
alias prev='music prev' alias prev='music prev'
alias previous='prev' alias previous='prev'

View File

@ -16,8 +16,11 @@ function gmail() {
function gmail2() { function gmail2() {
open -na "Google Chrome" --args "https://mail.google.com/mail/u/1" open -na "Google Chrome" --args "https://mail.google.com/mail/u/1"
} }
function cicd() { function cicdboard() {
open -na "Google Chrome" --args "https://issues.collibra.com/secure/RapidBoard.jspa?rapidView=457&view=planning.nodetail" open -na "Google Chrome" --args "$JIRA_URL/secure/RapidBoard.jspa?rapidView=457&view=planning.nodetail"
}
function cicddashboard() {
open -na "Google Chrome" --args "$JIRA_URL/secure/Dashboard.jspa?selectPageId=13131"
} }
function issues() { function issues() {
jira issue jql "status = Open AND text ~ \"$*\" ORDER BY Created DESC" jira issue jql "status = Open AND text ~ \"$*\" ORDER BY Created DESC"
@ -279,7 +282,7 @@ function jenkins-cli {
function colorpic { function colorpic {
local picture_url="$1" local picture_url="$1"
echo "Colorizing $picture_url" echo "Colorizing $picture_url"
local result_url=$(\curl -F "image=@$picture_url" -H "api-key:a91c8220-53b0-4afd-b97d-96825700cd3d" https://api.deepai.org/api/colorizer -s | jq '.output_url' | strings) local result_url=$(\curl -F "image=@$picture_url" -H "api-key:$COLORPIC_APIKEY" https://api.deepai.org/api/colorizer -s | jq '.output_url' | strings)
echo "Generated $result_url" echo "Generated $result_url"
echo "Display in progress..." echo "Display in progress..."
eval "\curl -s $result_url | imgcat" eval "\curl -s $result_url | imgcat"

View File

@ -122,7 +122,20 @@ source $ZSH/oh-my-zsh.sh
# ssh # ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id" # export SSH_KEY_PATH="~/.ssh/rsa_id"
export JETBRAINS_LICENSE_SERVER=https://licenseserver.collibra.com # private data
export JETBRAINS_LICENSE_SERVER=""
export BW_SESSION=""
export JENKINS_URL=""
export JENKINS_SECRET=""
export JIRA_URL=""
export PROXY_HOST=""
export COLORPIC_APIKEY=""
if test -f "$HOME/.secrets"; then
chmod +x "$HOME/.secrets"
source "$HOME/.secrets"
fi
export REPO_PATH=$HOME/Code 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

View File

@ -5,7 +5,7 @@
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.formatOnType": true, "editor.formatOnType": true,
"jenkins.pipeline.linter.connector.user": "morgan.wattiez", "jenkins.pipeline.linter.connector.user": "morgan.wattiez",
"jenkins.pipeline.linter.connector.url": "https://jenkins.collibra.com/pipeline-model-converter/validate", "jenkins.pipeline.linter.connector.url": "$JENKINS_URL/pipeline-model-converter/validate",
"terminal.integrated.fontSize": 14, "terminal.integrated.fontSize": 14,
"editor.autoClosingBrackets": "always" "editor.autoClosingBrackets": "always"
} }