diff --git a/.bash_aliases b/.bash_aliases index 634224d..40e8a35 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -7,7 +7,7 @@ alias ipy='ipython3' alias whatisopen='sudo netstat -pnlt' alias calc='gcalccmd' alias pmr='python manage.py runserver' -alias nopmr="netstat -pnlt | grep -E -o -e '[0-9]+/python' | cut -d '/' -f 1 | xargs kill" +alias nopmr="ps auxw | grep runserver | awk '{print \$2}' | xargs kill" alias pmm='python manage.py migrate' alias pmmm='python manage.py makemigrations' @@ -16,13 +16,27 @@ alias vim="vimx" # don't alias this - make symlink instead alias vi="vim" # git aliases +alias g='git' alias gs='git status' alias ga='git add' alias gc='git commit -S' alias gp='git push origin master' -alias gpull='git pull origin master' - +alias gpull='git pull --rebase origin master' +alias gl="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all" +alias gd="git diff" +alias gb="git branch" alias gpp='git push production master' # push to production for personal website +# useful for daily stand-up +git-standup() { + AUTHOR=${AUTHOR:="`git config user.name`"} + + since=yesterday + if [[ $(date +%u) == 1 ]] ; then + since="2 days ago" + fi + + git log --all --since "$since" --oneline --author="$AUTHOR" +} # MSR registers is responsible for lag after suspend alias checkcpu='modprobe msr; rdmsr -a 0x19a' @@ -186,12 +200,14 @@ alias dsl="docker swarm leave --force" alias dsi="docker swarm init --advertise-addr=$wifi_int_name" alias dsjtm="docker swarm join-token manager" alias dsjtw="docker swarm join-token worker" +alias sdk="sudo systemctl start docker" alias noip6="sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/$wifi_int_name/disable_ipv6'" alias yesip6="sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/$wifi_int_name/disable_ipv6'" # alias omg2="killall plasmashell; plasmashell > /dev/null 2>&1 & disown" alias omg2="kwin --replace &" +alias omg2.1="kquitapp5 plasmashell && kstart5 plasmashell" alias aliases="vim ~/.bash_aliases && source ~/.bash_aliases" # alias ghcirun="ghci --make $1; ./$1" @@ -389,11 +405,13 @@ function whoishome() { import sys users={ "C8:21:58:98:29:25": "lubo-laptop", - "2C:0E:3D:A7:C1:19": "viktor-phone", "18:F0:E4:2A:CB:B0": "lubo-phone", - "A0:32:99:C4:0E:38": "nasko-phone", - "48:01:C5:39:A6:3D": "ioana-phone", + "2C:0E:3D:A7:C1:19": "viktor-phone", "48:89:E7:18:0E:66": "viktor-laptop", + "A0:32:99:C4:0E:38": "nasko-phone", + "44:03:2C:6B:04:5E": "nasko-laptop", + "48:01:C5:39:A6:3D": "ioana-phone", + "F4:0F:24:2B:FE:14": "ioana-laptop", } # print("Connected device: ") for line in sys.argv[1].split("\n"): @@ -403,3 +421,13 @@ for line in sys.argv[1].split("\n"): print(f"{users[mac]}") ' "$(arp -a | grep -v incomplete)" } + +alias wa="watch sensors" +alias gtop="sudo intel_gpu_top" + +ZSH_AUTOSUGGEST_STRATEGY=(history completion) +bindkey '^[0' autosuggest-accept; +# bindkey '^[9' forward-word; +bindkey '^[9' autosuggest-fetch; +# bindkey '^[9' autosuggest-clear; +#bindkey '^ ' autosuggest-fetch diff --git a/.tmux.conf.local b/.tmux.conf.local index 83d7104..92850ca 100644 --- a/.tmux.conf.local +++ b/.tmux.conf.local @@ -326,3 +326,5 @@ bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection c bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' bind-key s set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}" + +set-option -g default-shell /bin/zsh diff --git a/.vimrc b/.vimrc index fb8bd9b..4349581 100644 --- a/.vimrc +++ b/.vimrc @@ -445,3 +445,7 @@ packloadall " Load all of the helptags now, after plugins have been loaded. " All messages and errors will be ignored. silent! helptags ALL + +let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git' + +au BufNewFile,BufRead,BufReadPost *.thrift set syntax=thrift diff --git a/.zshrc b/.zshrc index a03ecf2..57b9eac 100644 --- a/.zshrc +++ b/.zshrc @@ -60,7 +60,7 @@ HIST_STAMPS="dd.mm.yyyy" # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=() +plugins=(zsh-autosuggestion zsh-syntax-highlighting encode64 gitignore) source $ZSH/oh-my-zsh.sh # tmux source-file /home/viktor/.tmux.conf @@ -99,11 +99,6 @@ fi # Load aliases . ~/.bash_aliases -j () { - local dir="$(jump cd $@)" - test -d "$dir" && cd "$dir" -} - # . ~/.bash_completion # Locale settings for perl @@ -151,7 +146,7 @@ export PATH="/home/viktor/go/bin:$PATH" export PATH="/opt/jdk-12.0.1/bin:$PATH" # add azure core tools to path -export PATH="/opt/azure/:$PATH" +# export PATH="/opt/azure/:$PATH" # add k8s autocompletion # source <(kubectl completion zsh) @@ -162,3 +157,7 @@ export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"# This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"# This loads nvm bash_completion +export PATH="/home/viktor/.local/bin:$PATH" + +# Load Z to jump around recent dirs +. ~/z.sh diff --git a/vscode-settings.json b/vscode-settings.json index e24ef6d..8bcf017 100644 --- a/vscode-settings.json +++ b/vscode-settings.json @@ -7,18 +7,68 @@ "pasteImage.defaultName": "e-HH-mm-ss", "cSpell.userWords": [ "Barzin", - "Viktor" + "Viktor", + "dataset", + "datasets", + "overfit", + "unigrams", + "vectorizer" ], "workbench.editor.highlightModifiedTabs": true, "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "editor.formatOnSave": true, "javascript.updateImportsOnFileMove.enabled": "always", "window.zoomLevel": 0, "editor.minimap.enabled": true, "editor.renderWhitespace": "all", "editor.renderControlCharacters": true, "workbench.activityBar.visible": true, - "window.menuBarVisibility": "toggle" + "window.menuBarVisibility": "toggle", + "markdown-pdf.breaks": true, + "markdown-pdf.displayHeaderFooter": false, + "editor.wordWrap": "on", + "editor.formatOnSaveTimeout": 5000, + "php-cs-fixer.executablePath": "${extensionPath}/php-cs-fixer.phar", + "cSpell.enabledLanguageIds": [ + "asciidoc", + "c", + "cpp", + "csharp", + "css", + "git-commit", + "go", + "handlebars", + "haskell", + "html", + "jade", + "java", + "javascript", + "javascriptreact", + "json", + "jsonc", + "latex", + "less", + "markdown", + "php", + "plaintext", + "pug", + "python", + "restructuredtext", + "rust", + "scala", + "scss", + "text", + "typescript", + "typescriptreact", + "yaml", + "yml" + ], + "latex-workshop.view.pdf.viewer": "tab", + "files.exclude": { + "**/__pycache__": true + }, + "python.jediEnabled": false, + "workbench.editor.enablePreview": false, + "editor.formatOnSave": true } \ No newline at end of file