Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dotfiles & Configs
[user]
name = Alexey Vishnyakov
email = n3tn0de@gmail.com
signingkey = E25A9C776B8ED081B86BA55013AAEE9CFB851DFD
[core]
safecrlf = false
pager = cat
excludesfile = /Users/Alexey/.gitignore_global
editor = code --wait
autocrlf = false
ignorecase = false
[commit]
gpgsign = true
[gpg]
program = /usr/local/bin/gpg
[alias]
up = rebase
st = status
lg = log --graph --decorate --oneline
co = checkout
ci = commit
br = branch
[credential]
helper = cache --timeout 7200
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
[mergetool "ksdiff"]
cmd = /usr/local/bin/ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustexitcode = true
[merge]
tool = ksdiff
[difftool "ksdiff"]
cmd = /usr/local/bin/ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[mergetool]
prompt = false
[diff]
tool = ksdiff
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="powerlevel10k/powerlevel10k"
POWERLEVEL9K_MODE='nerdfont-complete'
DEFAULT_USER=n3tn0de
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# 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=(git colorize zsh-autosuggestions macos)
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
dir
vcs
newline
ssh
root_indicator
context
background_jobs
time
history
status
virtualenv
# nvm
# node_version
newline
os_icon
)
export NVM_BIN='/Users/Alexey/.nvm/versions/node/v12.7.0/bi'
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(ram battery)
POWERLEVEL9K_DISABLE_RPROMPT=true
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_CUSTOM_OS_ICON='POWERLEVEL9K_APPLE_ICON'
POWERLEVEL9K_CUSTOM_OS_ICON_BACKGROUND=162
# POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='⭐️'
# POWERLEVEL9K_CUSTOM_OS_ICON_FOREGROUND=white
# POWERLEVEL9K_PROMPT_ON_NEWLINE=true
# POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='✏️ '
# POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=''
# POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
# POWERLEVEL9K_SHORTEN_STRATEGY=truncate_beginning
# POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='╭─%F{blue}'
# POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='╰%f '
# User configuration
export HOMEBREW_NO_ANALYTICS=1
export PATH="$HOME/bin:$PATH"
export PATH="/usr/local/opt/gpg-agent/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
export PATH="$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin"
export PATH="$HOME/.composer/vendor/bin:$PATH"
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib"
export GOPATH=$HOME/go
export PATH="$PATH:$GOPATH/bin"
export PATH=$PATH:/usr/local/opt/go/libexec/bi
export PATH="$PATH:$HOME/Library/Application Support/itch/apps/butler"
export PATH="/usr/local/opt/sqlite/bin:$PATH"
export PATH="$HOME/Library/Python/3.7/bin:$PATH"
export PATH="/usr/local/opt/curl/bin:$PATH"
# export NVM_DIR="$HOME/.nvm"
# . "/usr/local/opt/nvm/nvm.sh"
# https://www.growingwiththeweb.com/2018/01/slow-nvm-init.html
# Defer initialization of nvm until nvm, node or a node-dependent command is
# run. Ensure this block is only run once if .bashrc gets sourced multiple times
# by checking whether __init_nvm is a function.
if [ -s "/usr/local/opt/nvm/nvm.sh" ] && [ ! "$(type __init_nvm)" = function ]; then
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"
declare -a __node_commands=($(ls -al $NVM_DIR/versions/node/*/lib/node_modules | awk '{print $9}' | awk '!NF || !seen[$0]++' | awk '/[^\.]+/' | tr '\r\n' ' '))
__node_commands+=('node' 'nvm' 'npx')
function __init_nvm() {
for i in "${__node_commands[@]}"; do unalias $i; done
. /usr/local/opt/nvm/nvm.sh
unset __node_commands
unset -f __init_nvm
}
for i in "${__node_commands[@]}"; do alias $i='__init_nvm && '$i; done
fi
export NVM_BIN='system'
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
eval "$(thefuck --alias)"
# export MANPATH="/usr/local/man:$MANPATH"
source $ZSH/oh-my-zsh.sh
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='code'
fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
function homestead() {
( cd ~/Homestead && vagrant $* )
}
alias ls='lsd'
alias sky='. ~/bin/launchSecondSkype.sh'
alias nrc='. ~/bin/newReactComponent.sh'
# alias bfg='java -jar ~/bin/bfg-1.12.12.jar'
alias lint='node_modules/eslint/bin/eslint.js .'
alias npmls='npm list -g --depth=0'
alias update-node='nvm install node --reinstall-packages-from=node'
alias tre="tree -aI 'node_modules|dist|.git|.DS_Store|.idea|.svn'"
alias dlweb='wget -e robots=off -r --no-parent --reject "index.html*"'
alias get-yt-music-pl="
youtube-dl -x -c --embed-thumbnail --audio-format "m4a" --audio-quality 0 \
--add-metadata -o \"%(playlist)s/%(playlist_index)s. %(title)s.%(ext)s\""
alias clean-local-tm-backups='sudo tmutil thinLocalSnapshots / 107374182400 4'
alias tm-logs="\
clear; printf '\e[3J' && \
log show --predicate 'subsystem == \"com.apple.TimeMachine\"' \
--info --last 24h | \
grep -F 'eMac' | \
grep -Fv 'etat' | \
awk -F']' '{print substr(\$0,1,19), \$NF}'\
"
alias loc='cloc ./ --by-file-by-lang --exclude-dir=node_modules,dist,package-lock.json'
alias wttr='curl -4 http://wttr.in'
alias iambored='fortune | cowthink | lolcat'
alias sayEn='say -v Ralph'
alias smol='mpv --ytdl-format="bestvideo[height<=?720]+bestaudio/best" --autofit 480 --ontop --no-border'
function drmi() {
if [[ -z "$1" ]]; then
echo "Specify filter!"
return 1
fi
docker image ls | grep $1
echo 'Sure you want delete these? (y/n)'
read reallyDelete
if [[ $reallyDelete == "y" ]]; then
echo "Deleting in 3 seconds"
sleep 3
docker image ls | grep $1 | awk '{print $3}' | xargs docker rmi $2
fi
}
function wbpkStats() {
NODE_ENV=production webpack --profile --json > stats.json
trap "rm stats.json" SIGINT
webpack-bundle-analyzer stats.json
}
# Clear Apple log files
# clearAsl()
function clearAsl() {
if [[ -s '/private/var/log/asl/*.asl' ]]; then
rm -r /private/var/log/asl/*.asl
fi
}

Backup

brew bundle dump -f
gist -u 2bffd8c8c2a2f10e3d4b96a6c26ff396 Brewfile

Restore

brew bundle
tap "buo/cask-upgrade"
tap "gcenx/wine"
tap "git-chglog/git-chglog"
tap "github/gh"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "homebrew/services"
tap "jesseduffield/lazydocker"
tap "reviewdog/tap"
tap "samuelmeuli/tap"
tap "tomanthony/brews"
mas "AngryBirdsReloaded", id: 1539172625
mas "Bear", id: 1091189122
mas "Brother iPrint&Scan", id: 1193539993
mas "Canary Mail", id: 1236045954
mas "Dato", id: 1470584107
mas "Display Menu", id: 549083868
mas "feedly", id: 865500966
mas "GarageBand", id: 682658836
mas "Gifski", id: 1351639930
mas "Hand Mirror", id: 1502839586
mas "iMovie", id: 408981434
mas "Keynote", id: 409183694
mas "LadioCast", id: 411213048
mas "Microsoft Remote Desktop", id: 1295203466
mas "Mini Motorways", id: 1456188526
mas "Numbers", id: 409203825
mas "Pages", id: 409201541
mas "Parcel", id: 639968404
mas "Raivo OTP", id: 1498497896
mas "Steam Link", id: 1246969117
mas "Trello", id: 1278508951
mas "Xcode", id: 497799835
@n3tn0de
Copy link
Author

n3tn0de commented Jul 27, 2019

It's kinda messy, but whatever 乁| ・ 〰 ・ |ㄏ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment