Created
February 11, 2022 17:56
-
-
Save yzdann/2eb685df5d6b43e77ccc7b612a02224a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
unbind C-b | |
set -g prefix C-a | |
# Mouse support | |
set-option -g mouse on | |
set -g @scroll-speed-num-lines-per-scroll "1" | |
# make tmux display things in 256 colors | |
set -g default-terminal "screen-256color" | |
# set scrollback history to 10000 (10k) | |
set -g history-limit 10000 | |
# use send-prefix to pass C-a through to application | |
bind Space send-prefix | |
# shorten command delay | |
set -sg escape-time 1 | |
# set window and pane index to 1 (0 by default) | |
set-option -g base-index 1 | |
setw -g pane-base-index 1 | |
set-window-option -g mode-keys vi | |
# reload config without killing server | |
bind r source-file ~/.tmux.conf \; display-message " Config reloaded..". | |
# Set status bar at the top | |
set-option -g status-position top | |
#spliting panes | |
bind | split-window -h | |
bind - split-window -v | |
#moving betwenn panes | |
bind k select-pane -U | |
bind j select-pane -D | |
bind h select-pane -L | |
bind l select-pane -R | |
# Make the current window the first window | |
bind T swap-window -t 1 | |
unbind -n M-t; bind -n M-t new-window | |
unbind -n M-x; bind -n M-x kill-window | |
# Select window without prefix | |
unbind -n M-1; bind -n M-1 select-window -t 1 | |
unbind -n M-2; bind -n M-2 select-window -t 2 | |
unbind -n M-3; bind -n M-3 select-window -t 3 | |
unbind -n M-4; bind -n M-4 select-window -t 4 | |
unbind -n M-5; bind -n M-5 select-window -t 5 | |
unbind -n M-6; bind -n M-6 select-window -t 6 | |
unbind -n M-7; bind -n M-7 select-window -t 7 | |
unbind -n M-8; bind -n M-8 select-window -t 8 | |
unbind -n M-9; bind -n M-9 select-window -t 9 | |
# move | |
bind -n M-down new-window | |
bind -n M-left prev | |
bind -n M-right next | |
#resizing panes | |
bind -r K resize-pane -U 5 | |
bind -r J resize-pane -D 5 | |
bind -r H resize-pane -L 6 | |
bind -r L resize-pane -R 5 | |
# | |
## Theme | |
# | |
# panes | |
set -g pane-border-style fg=colour239 | |
set -g pane-active-border-style fg=colour23 | |
# toggle statusbar | |
bind-key b set-option status | |
# status line | |
set -g status-justify left | |
set -g status-bg default | |
set -g status-fg default | |
set -g status-interval 2 | |
set -g status-left-length 60 | |
set -g status-right-length 60 | |
# messaging | |
set -g message-style fg=black,bg=colour6 | |
set -g message-command-style fg=blue,bg=black | |
set -g automatic-rename on | |
# window mode | |
setw -g mode-style bg=colour23,fg=colour0 | |
# colors | |
set -g window-status-format "#[fg=colour3]• #[fg=colour243]#W " | |
set -g window-status-current-format "#[fg=colour28]• #[fg=colour28]#W " | |
set -g status-position bottom | |
set -g status-justify centre | |
set -g status-left "#[fg=colour243]• #[fg=colour2]#(whoami) #[fg=colour243]•" | |
set -g status-right "#[fg=colour243]• #[fg=colour2]#{spotify_song} #[fg=colour243]• #[fg=colour3]%a%l:%M%P #[fg=colour243]• #[fg=colour4]#{battery_remain} #[fg=colour243]•" | |
# spotify | |
# https://github.com/pwittchen/spotify-cli-linux | |
bind-key -n F7 run-shell "spotifycli --next" | |
bind-key -n F6 run-shell "spotifycli --prev" | |
bind-key -n F12 run-shell "spotifycli --playpause" | |
# used to be cmus | |
# bind-key -n F7 run-shell "cmus-remote -n" | |
# bind-key -n F6 run-shell "cmus-remote -r" | |
run -b '~/.tmux/plugins/tpm/tpm' |
This file contains hidden or 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
" commentry Plugin | |
:set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" vundle | |
Plugin 'VundleVim/Vundle.vim' | |
" theme | |
Plugin 'liuchengxu/space-vim-dark' | |
" nerd tree and tagbar | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'majutsushi/tagbar' | |
Plugin 'ludovicchabant/vim-gutentags' | |
Plugin 'ryanoasis/vim-devicons' | |
" airline | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'bling/vim-airline' | |
" git things | |
Plugin 'Xuyuanp/nerdtree-git-plugin' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'junegunn/gv.vim' | |
" linter | |
Plugin 'w0rp/ale' | |
Plugin 'nvie/vim-flake8' | |
" search | |
Plugin 'kien/ctrlp.vim' | |
" snippets and autocomplete | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'SirVer/ultisnips' | |
Plugin 'honza/vim-snippets' | |
Plugin 'ekalinin/Dockerfile.vim' | |
Plugin 'andrewstuart/vim-kubernetes' | |
Plugin 'chr4/nginx.vim' | |
Plugin 'chr4/sslsecure.vim' | |
Plugin 'Matt-Deacalion/vim-systemd-syntax' | |
Plugin 'lifepillar/pgsql.vim' | |
Plugin 'davidhalter/jedi-vim' | |
Plugin 'fatih/vim-go', { 'do': ':GoInstallBinaries' } | |
" misc1 | |
Plugin 'tpope/vim-unimpaired' | |
Plugin 'tpope/vim-surround' | |
Plugin 'scrooloose/nerdcommenter' | |
" Plugin 'sjl/gundo.vim' | |
Plugin 'terryma/vim-multiple-cursors' | |
" misc2 | |
Plugin 'ervandew/supertab' | |
Plugin 'tmhedberg/SimpylFold' | |
Plugin 'vim-scripts/indentpython.vim' | |
Plugin 'Yggdroot/indentLine' | |
Plugin 'kien/rainbow_parentheses.vim' | |
Plugin 'jiangmiao/auto-pairs' | |
" html markdown and jinja | |
Plugin 'mattn/emmet-vim' | |
Plugin 'lepture/vim-jinja' | |
Plugin 'tpope/vim-markdown' | |
Plugin 'junegunn/goyo.vim' | |
Plugin 'junegunn/limelight.vim' | |
" yaml and toml | |
Plugin 'cespare/vim-toml' | |
Plugin 'yaml/yaml.vim' | |
Plugin 'hashivim/vim-hashicorp-tools' | |
Plugin 'yzdann/ultisnips-terraform-snippets' | |
Plugin 'pearofducks/ansible-vim' | |
" taglist | |
Plugin 'vim-scripts/taglist.vim' | |
Plugin 'psf/black' | |
" commented | |
" Plugin 'kana/vim-textobj-entire' | |
" Plugin 'maxbrunsfeld/vim-yankstack' | |
" Plugin 'mileszs/ack.vim' "Ack [options] {pattern} [{directories}] | |
" Plugin 'peterhoeg/vim-qml' | |
call vundle#end() | |
:colorscheme space-vim-dark | |
:set number | |
:set ls=2 | |
:filetype plugin on | |
:set tabstop=2 | |
:set expandtab | |
:set softtabstop=2 | |
:set shiftwidth=2 | |
:setlocal foldmethod=indent | |
:set foldlevel=99 | |
:set nowrap | |
:set nocp | |
:set clipboard=unnamed | |
:set clipboard=unnamedplus | |
:set autoindent | |
:set cindent | |
:set si | |
:syntax enable | |
:set showmatch | |
:set hlsearch | |
:set ignorecase | |
:set noswapfile | |
:set mouse=a | |
:set t_Co=256 | |
:set wildmenu | |
:set cursorline | |
:set lazyredraw | |
:set encoding=utf-8 | |
" fix common typos | |
cnoreabbrev W! w! | |
cnoreabbrev Q! q! | |
cnoreabbrev q1 q! | |
cnoreabbrev Qall! qall! | |
cnoreabbrev Wq wq | |
cnoreabbrev Wa wa | |
cnoreabbrev wQ wq | |
cnoreabbrev WQ wq | |
cnoreabbrev W w | |
cnoreabbrev Q q | |
cnoreabbrev Qall qall | |
" tab stop | |
" for html files, 2 spaces | |
autocmd Filetype html setlocal ts=2 sw=2 expandtab | |
"for js/python/go | |
autocmd Filetype javascript setlocal ts=4 sw=4 sts=0 expandtab | |
autocmd Filetype python setlocal ts=4 sw=4 sts=4 expandtab autoindent smartindent | |
autocmd Filetype go setlocal noautoindent nosmartindent nobreakindent | |
"enable folding with the spacebar | |
noremap <space> za | |
" tab switch | |
" F2 nxt F3 prev | |
:noremap <silent> #3 :bp<CR> | |
:noremap <silent> #4 :bn<CR> | |
" Paste mode toggle with F2 Pastemode disable auto-indent and bracket auto-compelation and it helps you to paste code fro elsewhere . | |
:set pastetoggle=<F2> | |
" clear the search with C-i | |
:noremap <silent> <C-i> :<C-u>nohlsearch<CR><C-i> | |
" map window moving | |
:map <C-h> <C-w>h | |
:map <C-h> <C-w>j | |
:map <C-h> <C-w>k | |
:map <C-h> <C-w>l | |
" cr problem indent | |
imap <C-Return> <CR><CR><C-o>k<Tab> | |
" resize panes | |
nnoremap <C-w>+ :exe "resize " . (winheight(0) * 3/2)<CR> | |
nnoremap <C-w>- :exe "resize " . (winheight(0) * 2/3)<cr> | |
nnoremap <C-w>> :exe "vertical resize " . (winwidth(0) * 3/2)<CR> | |
nnoremap <C-w>< :exe "vertical resize " . (winwidth(0) * 2/3)<CR> | |
"****************************** | |
"*********PLUGINS************** | |
"****************************** | |
""""""""""""""""""""""""""""""" | |
"""""" NerdTree """""""""""""" | |
""""""""""""""""""""""""""""""" | |
:map <F8> :NERDTreeToggle<CR> " toggle showing NERDTree | |
"open a NERDTree automatically when vim starts up if no files were specified | |
:autocmd StdinReadPre * let s:std_in=1 | |
:autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | |
:autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif " close vim if the only window left open is a NERDTree | |
"ignore files on NERDTree | |
let NERDTreeIgnore=['\.pyc$', '\~$', '\*.gz$'] | |
""""""""""""""""""""""""""""""" | |
"""""" airline """""""""""""""" | |
""""""""""""""""""""""""""""""" | |
" airline plugin setting | |
:let g:airline_theme='minimalist' | |
:let g:airline#extensions#tabline#enabled = 1 " showing tabs | |
:let g:airline_powerline_fonts = 1 | |
if !exists('g:airline_symbols') | |
let g:airline_symbols = {} | |
endif | |
" unicode symbols | |
let g:airline_left_sep = '»' | |
let g:airline_left_sep = '▶' | |
let g:airline_right_sep = '«' | |
let g:airline_right_sep = '◀' | |
""""""""""""""""""""""""""""""" | |
""""" markdown """""""""""""""" | |
""""""""""""""""""""""""""""""" | |
autocmd BufNewFile,BufReadPost *.md set filetype=markdown | |
:let g:markdown_fenced_languages = ['html', 'python', 'bash=sh'] | |
:let g:markdown_syntax_conceal = 0 | |
""""""""""""""""""""""""""""""" | |
" indent | |
""""""""""""""""""""""""""""""" | |
:let g:indentLine_char = '┆' | |
:let g:indentLine_enabled = 1 | |
""""""""""""""""""""""""""""""" | |
" higlight 81 | |
""""""""""""""""""""""""""""""" | |
highlight ColorColumn ctermbg=white | |
call matchadd("ColorColumn", '\%81v', 100) | |
""""""""""""""""""""""""""""""" | |
""""" tag bar """"""""""""""""" | |
""""""""""""""""""""""""""""""" | |
nmap <F9> :TagbarToggle<CR> | |
""""""""""""""""""""""""""""""" | |
"""""""" jinja """""""""""""""" | |
""""""""""""""""""""""""""""""" | |
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm set ft=jinja | |
""""""""""""""""""""""""""""""" | |
"""""""" emmet """""""""""""""" | |
""""""""""""""""""""""""""""""" | |
:let g:user_emmet_install_global = 0 | |
:autocmd FileType html,css,md EmmetInstall | |
""""""""""""""""""""""""""""""" | |
""""""" SimpylFold """"""""""" | |
""""""""""""""""""""""""""""""" | |
:let g:SimpylFold_docstring_preview=1 | |
""""""""""""""""""""""""""""""" | |
""""""""" ale linter """""""""" | |
""""""""""""""""""""""""""""""" | |
let b:ale_linters = { 'python': ['flake8'], 'go': ['govet'], 'ansible': ['ansible_lint'] } | |
let g:ale_completion_enabled = 1 | |
let g:ale_linters_explicit = 1 | |
let g:airline#extensions#ale#enabled = 1 | |
let g:ale_sign_column_always = 1 | |
highlight clear ALEErrorSign | |
highlight clear ALEWarningSign | |
highlight ALEWarning ctermbg=DarkMagenta | |
let g:ale_echo_msg_error_str = 'E' | |
let g:ale_echo_msg_warning_str = 'W' | |
let g:ale_sign_error = '⤫' | |
let g:ale_sign_warning = '⚠' | |
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]' | |
" move btwn errors with c-u and c-d up and down | |
nmap <silent> <C-u> <Plug>(ale_previous_wrap) | |
nmap <silent> <C-d> <Plug>(ale_next_wrap) | |
""""""""""""""""""""""""""""""" | |
""""""""" ctrl-p """""""""""""" | |
""""""""""""""""""""""""""""""" | |
" fuzzy finding file c-t for tab, c-v, c-s for vertical and horizontal | |
""""""""""""""""""""""""""""""" | |
""""""""" rainbow """"""""""""" | |
""""""""""""""""""""""""""""""" | |
let g:rbpt_colorpairs = [ | |
\ ['brown', 'RoyalBlue3'], | |
\ ['Darkblue', 'SeaGreen3'], | |
\ ['darkgray', 'DarkOrchid3'], | |
\ ['darkcyan', 'RoyalBlue3'], | |
\ ['darkred', 'SeaGreen3'], | |
\ ['darkgreen', 'RoyalBlue3'], | |
\ ['darkmagenta', 'DarkOrchid3'], | |
\ ['brown', 'firebrick3'], | |
\ ['gray', 'RoyalBlue3'], | |
\ ['black', 'SeaGreen3'], | |
\ ['darkmagenta', 'DarkOrchid3'], | |
\ ['Darkblue', 'firebrick3'], | |
\ ['darkcyan', 'SeaGreen3'], | |
\ ] | |
let g:rbpt_max = 16 | |
let g:rbpt_loadcmd_toggle = 0 | |
au VimEnter * RainbowParenthesesToggle | |
au Syntax * RainbowParenthesesLoadRound | |
au Syntax * RainbowParenthesesLoadSquare | |
au Syntax * RainbowParenthesesLoadBraces | |
""""""""""""""""""""""""""""""" | |
""""""""" gundo """"""""""""""" | |
""""""""""""""""""""""""""""""" | |
" if has('python3') | |
" let g:gundo_prefer_python3 = 1 | |
" endif | |
" nnoremap <F12> :GundoToggle<CR> | |
""""""""""""""""""""""""""""""" | |
""""""""" nerdtree git """""""" | |
""""""""""""""""""""""""""""""" | |
let g:NERDTreeGitStatusIndicatorMapCustom = { | |
\ "Modified" : "✹", | |
\ "Staged" : "✚", | |
\ "Untracked" : "!", | |
\ "Renamed" : "➜", | |
\ "Unmerged" : "═", | |
\ "Deleted" : "✖", | |
\ "Dirty" : "✗", | |
\ "Clean" : "✔︎", | |
\ 'Ignored' : '☒', | |
\ "Unknown" : "?" | |
\ } | |
" | |
let g:ycm_use_clangd = 0 | |
let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file | |
let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure | |
let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword | |
let g:ycm_complete_in_comments = 1 " Completion in comments | |
let g:ycm_complete_in_strings = 1 " Completion in strings | |
" | |
let g:flake8_quickfix_location="topleft" | |
""""""""""""""""""""""""""""""" | |
""""""""" ultisnips """""""" | |
""""""""""""""""""""""""""""""" | |
" better key bindings for UltiSnipsExpandTrigger | |
let g:UltiSnipsExpandTrigger = "<c-j>" | |
let g:UltiSnipsJumpForwardTrigger = "<c-j>" | |
let g:UltiSnipsJumpBackwardTrigger = "<c-p>" | |
let g:UltiSnipsListSnippets = "<c-k>" "List possible snippets based on current file | |
" If you want :UltiSnipsEdit to split your window. | |
let g:UltiSnipsEditSplit="vertical" | |
let g:UltiSnipsSnippetsDir='~/.vim/bundle/vim-snippets/UltiSnips' | |
""""""""""""""""""""""""""""""" | |
"""""" git gutter """"""""""""" | |
""""""""""""""""""""""""""""""" | |
" move btwn hunks with [c and ]c | |
""""""""""""""""""""""""""""""" | |
"""""" unimpaired """"""""""""" | |
""""""""""""""""""""""""""""""" | |
" move btwn hunks with [c and ]c | |
" ]q cnext [q cprev | |
" ]a next [b bprev | |
" ]space and ]space newline | |
" [os ]os spell and nospell | |
" | |
""""""""""""""""""""""""""""""" | |
"""""" multi cursor """"""""""" | |
""""""""""""""""""""""""""""""" | |
" start c-n, next c-n, skip c-x, prev c-p | |
" c, s, I, A | |
" esc exit | |
" ansible vim | |
au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible | |
" BLACK pyformatter | |
nnoremap <F5> :Black<CR> | |
let g:black_linelength = 80 | |
" jump to ref | |
map <C-\> :vsp <CR>:exec("tag ".expand("<cword>"))<CR> | |
let g:gutentags_cache_dir = expand('~/.cache/tags') | |
let g:jellybeans_overrides = { | |
\ 'background': { 'guibg': '#002B36' }, | |
\} |
This file contains hidden or 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
# Created by newuser for 5.2 | |
source ~/.antigen.zsh | |
# export ZSH_CACHE_DIR=/home/yzdann/.zshcachedir | |
# installing fzf with `apt install fzf` | |
# go | |
export PATH=$PATH:/usr/local/go/bin | |
export GOPATH=$HOME/Dev/gokari | |
export PATH=$PATH:$GOPATH/bin | |
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" | |
# virtualenv | |
export WORKON_HOME=~/.virtualenv | |
# source ~/.local/bin/virtualenvwrapper.sh | |
# Load the oh-my-zsh's library | |
antigen use oh-my-zsh | |
# Bundles from the default repo (robbyrussell's oh-my-zsh). | |
antigen bundle history-substring-serach | |
antigen bundle per-directory-history | |
antigen bundle zsh-users/zsh-autosuggestions | |
antigen bundle zsh-users/zsh-completions | |
antigen bundle vi-mode | |
antigen bundle mfaerevaag/wd | |
antigen bundle extract | |
# alias and autosuggestions | |
antigen bundle git | |
antigen bundle gitignore # gi | |
antigen bundle ansible # aplaybook | |
antigen bundle kubectl # k, kaf, kgns | |
antigen bundle cp | |
antigen bundle docker | |
antigen bundle django | |
antigen bundle helm | |
antigen bundle httpie | |
antigen bundle taskwarrior | |
antigen bundle pip | |
antigen bundle vundle | |
antigen bundle denisidoro/navi | |
antigen bundle vagrant | |
antigen bundle thefuck | |
antigen bundle command-not-found | |
antigen bundle sudo # esc twice | |
# color | |
antigen bundle colored-man-pages | |
antigen bundle zsh-users/zsh-syntax-highlighting | |
antigen bundle psprint/zsh-morpho | |
# del but g8d | |
# antigen bundle zdharma/zsh-diff-so-fancy | |
# antigen bundle urbainvaes/fzf-marks | |
# Syntax highlighting bundle. | |
# Load the theme. | |
antigen theme https://github.com/denysdovhan/spaceship-zsh-theme spaceship | |
# antigen theme yzdann/oh-my-git-themes oppa-lana-style | |
# Tell antigen that you're done. | |
antigen apply | |
# Find new things : https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins-Overview | |
# Awsome : https://github.com/unixorn/awesome-zsh-plugins | |
# Zshusers : https://github.com/zsh-users | |
# bat settings | |
BAT_THEME='MONOKAI' | |
# | |
# tldr | |
export TLDR_HEADER='magenta bold underline' | |
export TLDR_QUOTE='italic' | |
export TLDR_DESCRIPTION='green' | |
export TLDR_CODE='red' | |
export TLDR_PARAM='blue' | |
PATH=~/.local/bin:$PATH | |
VIRTUAL_ENV_DISABLE_PROMPT=true | |
# install grc | |
[[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh | |
# cargo | |
PATH=~/.cargo/bin:$PATH | |
source ~/.aliasly | |
source <(kubectl completion zsh) | |
source <(helm completion zsh) |
This file contains hidden or 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
# LSD, ack-grep, xclip, xsel, ipython, tldr, cht.sh | |
# my alises | |
alias wtf='dmesg' | |
alias rtfm='man' | |
alias onoz='cat /var/log/errors.log' | |
alias :3='echo' | |
alias alwayz='tail -f' | |
alias rarit='unrar x -r' | |
alias torworks='curl --socks5 localhost:9050 --socks5-hostname localhost:9050 -s https://check.torproject.org/ | cat | grep -m 1 Congratulations | xargs' | |
alias blinks='echo "https://bridges.torproject.org/bridges?transport=obfs4"|xclip' | |
alias ls='lsd' | |
alias ldot='/bin/ls -ld .*' | |
alias lart='ls -1Fcart' | |
alias la='lsd -A' | |
alias lla='lsd -la' | |
alias lt='lsd --tree' | |
alias -g L='|less' | |
alias -g G='|grep' | |
alias -g CL='|ccze' | |
alias NUL="> /dev/null 2>&1" | |
alias _start='sudo /bin/systemctl start' | |
alias _stop='sudo /bin/systemctl stop' | |
alias _restart='sudo /bin/systemctl restart' | |
alias _status='sudo /bin/systemctl status' | |
alias _reload='sudo /bin/systemctl daemon-reload' | |
alias _enable='sudo /bin/systemctl enable' | |
alias _disable='sudo /bin/systemctl disable' | |
alias dlog='sudo /bin/journalctl -u' | |
alias dlivelog='sudo /bin/journalctl -f -u' | |
alias rmpyc='find . -name "*.pyc" -exec rm -rf {} \;' | |
alias 1='cd -' | |
alias 2='cd -2' | |
alias 3='cd -3' | |
alias 4='cd -4' | |
alias 5='cd -5' | |
alias 6='cd -6' | |
alias 7='cd -7' | |
alias 8='cd -8' | |
alias 9='cd -9' | |
alias -g ...='../..' | |
alias -g ....='../../..' | |
alias -g .....='../../../..' | |
alias -g ......='../../../../..' | |
alias pingoogle="ping 8.8.8.8" | |
alias pwgen="< /dev/urandom tr -dc 'A-Za-z0-9\\?!=-_' | head -c13" | |
alias djangosecret="< /dev/urandom tr -dc 'A-Za-z0-9\\?!=-_' | head -c50" | |
# more intelligent acking for ubuntu users | |
alias afind='ack-grep -il' | |
# git | |
alias gs="git status" | |
alias gc="git commit" | |
alias gC="ga . && gc -m " | |
alias gd="git diff" | |
alias gdC="git diff --cached" | |
alias gp="git pull " | |
alias ga="git add " | |
alias gf="git fetch --all" | |
alias gl="git log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | tac" | |
alias gstat="git log --stat" | |
alias gonel="git log --oneline" | |
alias gclean="git branch -r | grep origin/ | grep -v 'master$' | grep -v HEAD| cut -d/ -f2 | while read line; do git push origin :$line; done;" | |
alias gap="git add -p " | |
alias g5='git log -5 --pretty=%B' | |
# copy paste | |
if ! which pbcopy &>/dev/null && which xsel &>/dev/null; then | |
alias pbcopy='xsel --clipboard --input' | |
alias pbpaste='xsel --clipboard --output' | |
alias kopy='xsel --clipboard --input' | |
fi | |
# cheatsheet | |
alias chsht='cht.sh' | |
# python manage.py runserver | |
alias djrun='python manage.py runserver' | |
alias djmm='python manage.py makemigrations' | |
alias djm='python manage.py migrate' | |
alias djsh='python manage.py shell' | |
alias djstatic='python manage.py collectstatic' | |
alias djdb='python manage.py dbshell' | |
alias djshp='python manage.py shell_plus --print-sql' | |
alias djshpn='python manage.py shell_plus --print-sql --settings=SecurityAdvisoryNode.settings.dev' | |
# go get | |
alias goget='http_proxy=socks5://127.0.0.1:9050/ go get' | |
# ipython | |
alias ipy3='ipython3' | |
# vagrant | |
alias vint='vagrant init' | |
alias vbionic='vagrant init ubuntu/bionic64' | |
alias vup='vagrant up' | |
alias vssh='vagrant ssh' | |
alias vscp='vagrant scp' | |
alias psql='sudo -u postgres pgcli' | |
alias ocn="sudo openconnect $OP_IP:$OP_PORT --user=$OP_USER--authgroup=$OP_GROUP --servercert pin-sha256:$OP_CRT --passwd-on-stdin < ~/.opc" | |
alias sgip="git config --global http.proxy fodev.org:8118 && git config --global https.proxy fodev.org:8118" | |
alias ugip="git config --global --unset http.proxy && git config --global --unset https.proxy" | |
# tldr | |
alias tldr='~/.scripts/tldr.sh' | |
# http with jwt | |
alias jwt='~/.scripts/jwt.sh' | |
# bitwarden | |
alias bv="~/.scripts/bwv.sh" | |
alias sshf="ssh -N -f -L" | |
alias terragraph='terraform graph | dot -Tsvg > graph.svg' |
This file contains hidden or 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
[credential] | |
helper = cache | |
[core] | |
pager = delta --plus-color="#005f00" --minus-color="#340001" | |
hooksPath = .git/hooks/ | |
# pager = diff-so-fancy | less --tabs=4 -RFX | |
[interactive] | |
diffFilter = delta --color-only |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment