├── .aliases ├── .bash_profile ├── .bash_prompt ├── .bashrc ├── .composer ├── composer.json └── update-channel ├── .config ├── htop │ └── htoprc └── yarn │ └── global │ └── package.json ├── .ctags ├── .curlrc ├── .editorconfig ├── .exports ├── .functions ├── .gemrc ├── .gitconfig ├── .gitignore ├── .gnupg ├── gpg-agent.conf └── gpg.conf ├── .hgignore ├── .hushlogin ├── .inputrc ├── .mailmap ├── .path ├── .rbenv └── version ├── .screenrc ├── .ssh ├── config └── config.d │ ├── github │ └── travisci ├── .vim ├── .vimrc.plugins ├── ftdetect │ ├── gitmessage.vim │ ├── json.vim │ └── sshconfig.vim └── tmp │ ├── backups │ └── .gitkeep │ ├── swaps │ └── .gitkeep │ └── undo │ └── .gitkeep ├── .vimrc ├── .wgetrc ├── Brewfile ├── LICENSE-MIT.txt ├── README.md ├── bin └── git-loglive ├── git ├── .git-template │ └── hooks │ │ └── prepare-commit-msg ├── .gitattributes ├── .gitignore_global └── .gitmessage ├── init ├── Solarized Dark xterm-256color.terminal ├── Solarized Dark.itermcolors └── install.sh ├── package.json └── projects └── .gitkeep /.aliases: -------------------------------------------------------------------------------- 1 | # Easier navigation: .., ..., ...., ....., ~ and - 2 | alias ..="cd .." 3 | alias ...="cd ../.." 4 | alias ....="cd ../../.." 5 | alias .....="cd ../../../.." 6 | alias ~="cd ~" # `cd` is probably faster to type though 7 | alias -- -="cd -" 8 | 9 | # Shortcuts 10 | alias c="composer" 11 | alias d="cd ~/Documents" 12 | alias dl="cd ~/Downloads" 13 | alias dt="cd ~/Desktop" 14 | alias g="git" 15 | alias gd="git d" 16 | alias gl="git l" 17 | alias gs="git status --short --branch" 18 | alias nevermind="confirm && git reset --hard HEAD && git clean -d -f" 19 | alias gr="grep" 20 | alias gt="grunt" 21 | alias h="history" 22 | alias j="java" 23 | alias jc="javac" 24 | alias m="man" 25 | alias o="open" 26 | alias oo="open ." 27 | alias p="cd ~/projects" 28 | alias python="python3" 29 | alias pip="pip3" 30 | alias s="subl ." 31 | alias t="travis" 32 | alias tf="terraform" 33 | alias tl="travis lint" 34 | alias tm="travis monitor --my-repos --notify growl" 35 | alias v="vim" 36 | alias vg="vagrant" 37 | alias y="yarn" 38 | 39 | # Enable git command autocompletion for 'g' as well 40 | # complete -o default -o nospace -F _git g 41 | 42 | # Detect which `ls` flavor is in use 43 | if ls --color > /dev/null 2>&1; then # GNU `ls` 44 | colorflag="--color" 45 | else # OS X `ls` 46 | colorflag="-G" 47 | fi 48 | 49 | # List all files colorized in long format 50 | alias l="exa -lh" 51 | 52 | # List all files colorized in long format, including dot files 53 | alias la="exa -lah" 54 | 55 | # List only directories 56 | alias lsd="exa -l | grep --color=never '^d'" 57 | 58 | # Always use color output for `ls` 59 | alias ls="exa" 60 | export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' 61 | 62 | # Enable aliases to be sudo’ed 63 | alias sudo='sudo ' 64 | 65 | # Get week number 66 | alias week='date +%V' 67 | 68 | # Stopwatch 69 | alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' 70 | 71 | # Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages 72 | alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup -s; npm update npm -g; npm update -g; gem update --system; gem update; gem cleanup; composer global update' 73 | 74 | # IP addresses 75 | alias ip="dig +short txt ch whoami.cloudflare @1.0.0.1 | tr -d '\"'" 76 | alias localip="ipconfig getifaddr en0" 77 | alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" 78 | 79 | # Flush Directory Service cache 80 | alias flush="dscacheutil -flushcache && killall -HUP mDNSResponder" 81 | 82 | # Flush DNS 83 | alias flushdns="sudo discoveryutil mdnsflushcache; sudo discoveryutil udnsflushcaches" 84 | 85 | # Clean up LaunchServices to remove duplicates in the “Open With” menu 86 | alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder" 87 | 88 | # View HTTP traffic 89 | alias sniff="sudo ngrep -d 'en0' -t '^(GET|POST) ' 'tcp and port 80'" 90 | alias httpdump="sudo tcpdump -i en0 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\"" 91 | 92 | # Canonical hex dump; some systems have this symlinked 93 | command -v hd > /dev/null || alias hd="hexdump -C" 94 | 95 | # OS X has no `md5sum`, so use `md5` as a fallback 96 | command -v md5sum > /dev/null || alias md5sum="md5" 97 | 98 | # OS X has no `sha1sum`, so use `shasum` as a fallback 99 | command -v sha1sum > /dev/null || alias sha1sum="shasum" 100 | 101 | # JavaScriptCore REPL 102 | jscbin="/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc"; 103 | [ -e "${jscbin}" ] && alias jsc="${jscbin}"; 104 | unset jscbin; 105 | 106 | # Trim new lines and copy to clipboard 107 | alias clip="tr -d '\n' | pbcopy" 108 | 109 | # Recursively delete `.DS_Store` files 110 | alias cleanup="find . -type f -name '*.DS_Store' -ls -delete" 111 | 112 | # Empty the Trash on all mounted volumes and the main HDD 113 | # Also, clear Apple’s System Logs to improve shell startup speed 114 | alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl" 115 | 116 | # Show/hide hidden files in Finder 117 | alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" 118 | alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" 119 | 120 | # Hide/show all desktop icons (useful when presenting) 121 | alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder" 122 | alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder" 123 | 124 | # URL-encode strings 125 | alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);"' 126 | 127 | # Merge PDF files 128 | # Usage: `mergepdf -o output.pdf input{1,2,3}.pdf` 129 | alias mergepdf='/System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py' 130 | 131 | # Disable Spotlight 132 | alias spotoff="sudo mdutil -a -i off" 133 | # Enable Spotlight 134 | alias spoton="sudo mdutil -a -i on" 135 | 136 | # PlistBuddy alias, because sometimes `defaults` just doesn’t cut it 137 | alias plistbuddy="/usr/libexec/PlistBuddy" 138 | 139 | # Ring the terminal bell, and put a badge on Terminal.app’s Dock icon 140 | # (useful when executing time-consuming commands) 141 | alias badge="tput bel" 142 | 143 | # Intuitive map function 144 | # For example, to list all directories that contain a certain file: 145 | # find . -name .gitattributes | map dirname 146 | # alias map="xargs -n1" 147 | # 148 | # Using https://github.com/soveran/map for now 149 | 150 | # One of @janmoesen’s ProTip™s 151 | for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do 152 | alias "$method"="lwp-request -m '$method'" 153 | done 154 | 155 | # Make Grunt print stack traces by default 156 | command -v grunt > /dev/null && alias grunt="grunt --stack" 157 | 158 | # Stuff I never really use but cannot delete either because of http://xkcd.com/530/ 159 | alias stfu="osascript -e 'set volume output muted true'" 160 | alias pumpitup="osascript -e 'set volume 7'" 161 | 162 | # Kill all the tabs in Chrome to free up memory 163 | # [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description 164 | alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill" 165 | 166 | # Lock the screen (when going AFK) 167 | alias afk="osascript -e 'tell app \"System Events\" to key code 12 using {control down, command down}'" 168 | 169 | alias dnd="do-not-disturb toggle" 170 | 171 | # Reload the shell (i.e. invoke as a login shell) 172 | alias reload="exec $SHELL -l" 173 | 174 | # Faster npm for Europeans 175 | command -v npm > /dev/null && alias npme="npm --registry http://registry.npmjs.eu/" 176 | -------------------------------------------------------------------------------- /.bash_profile: -------------------------------------------------------------------------------- 1 | # Load the shell dotfiles, and then some: 2 | # * ~/.path can be used to extend `$PATH`. 3 | # * ~/.extra can be used for other settings you don't want to commit. 4 | for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do 5 | [ -r "$file" ] && [ -f "$file" ] && source "$file"; 6 | done; 7 | unset file; 8 | 9 | bind -f ~/.inputrc 10 | 11 | # Case-insensitive globbing (used in pathname expansion) 12 | shopt -s nocaseglob; 13 | 14 | # Append to the Bash history file, rather than overwriting it 15 | shopt -s histappend; 16 | 17 | # Autocorrect typos in path names when using `cd` 18 | shopt -s cdspell; 19 | 20 | # Enable some Bash 4 features when possible: 21 | # * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux` 22 | # * Recursive globbing, e.g. `echo **/*.txt` 23 | for option in autocd globstar; do 24 | shopt -s "$option" 2> /dev/null; 25 | done; 26 | 27 | # Disable programmable completion which could escape dollars while doing tab completion 28 | #shopt -u progcomp 29 | 30 | if [ -f /opt/homebrew/bin/brew ]; then 31 | eval "$(/opt/homebrew/bin/brew shellenv)" 32 | export PATH="$HOMEBREW_PREFIX/local/opt/mysql@5.7/bin:$PATH" 33 | 34 | # if [[ -r "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh" ]]; then 35 | # source "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh" 36 | # else 37 | # for COMPLETION in "${HOMEBREW_PREFIX}/etc/bash_completion.d/"*; do 38 | # [[ -r "$COMPLETION" ]] && source "$COMPLETION" 39 | # done 40 | # fi 41 | 42 | # Add bash completion for brew installed formuale 43 | [[ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ]] && . "/opt/homebrew/etc/profile.d/bash_completion.sh" 44 | 45 | # Brew & Cask aliases 46 | alias b="brew" 47 | alias cask="brew cask" 48 | 49 | # Enable brew command autocompletion for `b` alias as well 50 | complete -o default -F _brew b 51 | 52 | # Enable tab completion for `g` alias of git 53 | if [ -f "$HOMEBREW_PREFIX/etc/bash_completion.d/git-completion.bash" ]; then 54 | complete -o default -o nospace -F __git_wrap__git_main git; 55 | complete -o default -o nospace -F __git_wrap__git_main g; 56 | fi; 57 | 58 | # Enable terraform completion 59 | complete -C "$HOMEBREW_PREFIX/local/bin/terraform" terraform 60 | complete -C terraform tf 61 | 62 | # Minio completion 63 | complete -C "$HOMEBREW_PREFIX/local/bin/mc" mc 64 | 65 | # nvm setup 66 | [ -s "$HOMEBREW_PREFIX/local/opt/nvm/nvm.sh" ] && . "$BREW_PREFIX/local/opt/nvm/nvm.sh" # This loads nvm 67 | [ -s "$HOMEBREW_PREFIX/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "$BREW_PREFIX/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completio 68 | 69 | elif [ -f /etc/bash_completion ]; then 70 | # If brew bash completion is not available, add basic bash completion 71 | source /etc/bash_completion; 72 | fi 73 | 74 | # Add tab completion for dbt 75 | if [ -f ~/.dbt-completion.bash ]; then 76 | source ~/.dbt-completion.bash 77 | fi 78 | 79 | # Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards 80 | [ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config ~/.ssh/config.d/* | grep -v "[?*]" | cut -d " " -f2 | tr ' ' '\n')" scp sftp ssh; 81 | 82 | # Add tab completion for `defaults read|write NSGlobalDomain` 83 | # You could just use `-g` instead, but I like being explicit 84 | complete -W "NSGlobalDomain" defaults; 85 | 86 | # Add `killall` tab completion for common apps 87 | complete -o "nospace" -W "Dock Finder SystemUIServer" killall; 88 | 89 | # Enable Shell integration for iTerm2 90 | # http://iterm2.com/shell_integration.html 91 | if [ -f ~/.iterm2_shell_integration.bash ]; then 92 | source ~/.iterm2_shell_integration.bash 93 | fi 94 | 95 | # Add `rbenv init` to the shell to enable shims and autocompletion 96 | if command -v rbenv > /dev/null; then 97 | eval "$(rbenv init -)" 98 | fi; 99 | 100 | # added by travis gem 101 | [ -f /Users/hkdobrev/.travis/travis.sh ] && source /Users/hkdobrev/.travis/travis.sh 102 | 103 | if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)"; fi 104 | 105 | 106 | complete -C /opt/homebrew/bin/mc mc 107 | -------------------------------------------------------------------------------- /.bash_prompt: -------------------------------------------------------------------------------- 1 | # Shell prompt based on the Solarized Dark theme. 2 | # Screenshot: http://i.imgur.com/EkEtphC.png 3 | # Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles 4 | # iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. 5 | 6 | if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then 7 | export TERM='gnome-256color'; 8 | elif infocmp xterm-256color >/dev/null 2>&1; then 9 | export TERM='xterm-256color'; 10 | fi; 11 | 12 | prompt_git() { 13 | local s=''; 14 | local branchName=''; 15 | 16 | # Check if the current directory is in a Git repository. 17 | if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") != '0' ]; then 18 | return; 19 | fi; 20 | 21 | # check if the current directory is in .git before running git checks 22 | if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then 23 | 24 | # Ensure the index is up to date. 25 | git update-index --really-refresh -q &>/dev/null; 26 | 27 | # Check for uncommitted changes in the index. 28 | if ! $(git diff --quiet --ignore-submodules --cached); then 29 | s+='+'; 30 | fi; 31 | 32 | # Check for unstaged changes. 33 | if ! $(git diff-index --no-ext-diff --quiet --cached HEAD); then 34 | s+='!'; 35 | fi; 36 | 37 | # Check for untracked files. 38 | if [ -n "$(git ls-files --others --exclude-standard)" ]; then 39 | s+='?'; 40 | fi; 41 | fi; 42 | 43 | # Get the short symbolic ref. 44 | # If HEAD isn’t a symbolic ref, get the short SHA for the latest commit 45 | # Otherwise, just give up. 46 | branchName="$(git symbolic-ref --quiet --short HEAD 2> /dev/null || \ 47 | git rev-parse --short HEAD 2> /dev/null || \ 48 | echo '(unknown)')"; 49 | 50 | [ -n "${s}" ] && s=" [${s}]"; 51 | 52 | echo -e "${1}${branchName}${blue}${s}"; 53 | } 54 | 55 | if tput setaf 1 &> /dev/null; then 56 | tput sgr0; # reset colors 57 | bold=$(tput bold); 58 | reset=$(tput sgr0); 59 | # Solarized colors, taken from http://git.io/solarized-colors. 60 | black=$(tput setaf 0); 61 | blue=$(tput setaf 33); 62 | cyan=$(tput setaf 37); 63 | green=$(tput setaf 64); 64 | orange=$(tput setaf 166); 65 | purple=$(tput setaf 125); 66 | red=$(tput setaf 124); 67 | violet=$(tput setaf 61); 68 | white=$(tput setaf 15); 69 | yellow=$(tput setaf 136); 70 | else 71 | bold=''; 72 | reset="\e[0m"; 73 | black="\e[1;30m"; 74 | blue="\e[1;34m"; 75 | cyan="\e[1;36m"; 76 | green="\e[1;32m"; 77 | orange="\e[1;33m"; 78 | purple="\e[1;35m"; 79 | red="\e[1;31m"; 80 | violet="\e[1;35m"; 81 | white="\e[1;37m"; 82 | yellow="\e[1;33m"; 83 | fi; 84 | 85 | # Highlight the user name when logged in as root. 86 | if [[ "${USER}" == "root" ]]; then 87 | userStyle="${red}"; 88 | else 89 | userStyle="${orange}"; 90 | fi; 91 | 92 | # Highlight the hostname when connected via SSH. 93 | if [[ "${SSH_TTY}" ]]; then 94 | hostStyle="${bold}${red}"; 95 | else 96 | hostStyle="${yellow}"; 97 | fi; 98 | 99 | # Set the terminal title to the current working directory. 100 | PS1="\[\033]0;\w\007\]"; 101 | PS1+="\[${bold}\]\n"; # newline 102 | PS1+="\[${userStyle}\]\u"; # username 103 | PS1+="\[${white}\] at "; 104 | PS1+="\[${hostStyle}\]\h"; # host 105 | PS1+="\[${white}\] in "; 106 | PS1+="\[${green}\]\w"; # working directory 107 | PS1+="\$(prompt_git \"${white} on ${violet}\")"; # Git repository details 108 | PS1+="\n"; 109 | PS1+="\[${white}\]\$ \[${reset}\]"; # `$` (and reset color) 110 | export PS1; 111 | 112 | PS2=""; 113 | export PS2; 114 | -------------------------------------------------------------------------------- /.bashrc: -------------------------------------------------------------------------------- 1 | [ -n "$PS1" ] && source ~/.bash_profile; 2 | -------------------------------------------------------------------------------- /.composer/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "bamarni/symfony-console-autocomplete": "^1.3", 4 | "balbuf/composer-git-merge-driver": "^1.1", 5 | "symfony/event-dispatcher": "^4.2", 6 | "rector/rector": "^0.5", 7 | "icanhazstring/composer-unused": "^0.7.3", 8 | "comcast/php-legal-licenses": "^1.1", 9 | "sensiolabs/security-checker": "^6.0" 10 | }, 11 | "prefer-stable": true, 12 | "require-dev": { 13 | }, 14 | "minimum-stability": "stable" 15 | } 16 | -------------------------------------------------------------------------------- /.composer/update-channel: -------------------------------------------------------------------------------- 1 | stable 2 | -------------------------------------------------------------------------------- /.config/htop/htoprc: -------------------------------------------------------------------------------- 1 | # Beware! This file is rewritten by htop when settings are changed in the interface. 2 | # The parser is also very primitive, and not human-friendly. 3 | fields=0 48 17 18 38 39 2 46 47 49 1 4 | sort_key=46 5 | sort_direction=1 6 | hide_threads=0 7 | hide_kernel_threads=1 8 | hide_userland_threads=0 9 | shadow_other_users=0 10 | show_thread_names=0 11 | show_program_path=1 12 | highlight_base_name=0 13 | highlight_megabytes=1 14 | highlight_threads=0 15 | tree_view=0 16 | header_margin=1 17 | detailed_cpu_time=0 18 | cpu_count_from_zero=0 19 | update_process_names=0 20 | account_guest_in_cpu_meter=0 21 | color_scheme=0 22 | delay=15 23 | left_meters=AllCPUs Memory Swap 24 | left_meter_modes=1 1 1 25 | right_meters=Tasks LoadAverage Uptime 26 | right_meter_modes=2 2 2 27 | -------------------------------------------------------------------------------- /.config/yarn/global/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "cloc": "^2.3.3", 4 | "create-react-app": "^1.5.2", 5 | "decktape": "^2.4.3", 6 | "diff2html": "^2.3.1", 7 | "diff2html-cli": "^2.5.2", 8 | "do-not-disturb-cli": "^0.1.0", 9 | "docsify-cli-hotfix": "^4.4.1", 10 | "dot-json": "^1.0.3", 11 | "eslint": "^4.9.0", 12 | "eslint-config-airbnb-base": "^12.1.0", 13 | "eslint-plugin-import": "^2.8.0", 14 | "license-checker": "^20.0.0", 15 | "prettier": "^1.16.4", 16 | "reveal-cli": "^2.0.1", 17 | "ts-node": "^7.0.1", 18 | "typescript": "^3.2.2", 19 | "uglify-js": "^2.8.15", 20 | "web-ext": "^2.2.2", 21 | "yarn-tools": "^0.4.0" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.ctags: -------------------------------------------------------------------------------- 1 | --recurse=yes 2 | --tag-relative 3 | 4 | --exclude=.git 5 | --exclude=.svn 6 | --exclude=.hg 7 | --exclude=*.min.* 8 | --exclude=*-min.* 9 | --exclude=*.map 10 | --exclude=*.swp 11 | --exclude=*.bak 12 | --exclude=*.pyc 13 | --exclude=*.class 14 | --exclude=*.sln 15 | --exclude=*.Master 16 | --exclude=*.csproj 17 | --exclude=*.csproj.user 18 | --exclude=*.cache 19 | --exclude=*.dll 20 | --exclude=*.pdb 21 | --exclude=tags 22 | --exclude=cscope.* 23 | --exclude=*.tar.* 24 | --exclude=*.pdf 25 | --exclude=*.sql 26 | --exclude=*.jpg 27 | --exclude=*.jpeg 28 | --exclude=*.png 29 | --exclude=*.gif 30 | --exclude=*.bmp 31 | --exclude=*.svg 32 | --exclude=*.ico 33 | --exclude=*.txt 34 | --exclude=*.csv 35 | --exclude=*.json 36 | --exclude=*.lock 37 | --exclude=.DS_Store 38 | 39 | --langmap=javascript:.js 40 | --regex-javascript=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*[\(]function[ \t]*\(/\1/f,function,functions/ 41 | --regex-javascript=/^[ \t]*[\(]function[ \t]*([A-Za-z0-9._$]+)/\1/f,function,functions/ 42 | --regex-javascript=/([A-Za-z0-9._$]+)[ \t]*=[ \t]*\{/\1/o,object,objects/ 43 | --regex-javascript=/^[ \t]*([A-Za-z0-9._$]+)[ \t]*[:][ \t]*[^\{]/\1/p,property,properties/ 44 | --regex-javascript=/^[ \t]+var[ \t]*([A-Za-z0-9._$]+)[ \t]*=[ \t]*[\d"'\[]/\1/v,variable,variables/ 45 | --regex-javascript=/\/\/[ \t]*(TODO)[ \t]*\:*(.*)/\1/i,TODO/ 46 | --regex-javascript=/\/\/[ \t]*(FIXME)[ \t]*\:*(.*)/\1/i,FIXME/ 47 | 48 | --langdef=css 49 | --langmap=css:.css 50 | --langmap=css:+.sass 51 | --langmap=css:+.styl 52 | --langmap=css:+.less 53 | --regex-css=/^[ \t]*\.([A-Za-z0-9_-]+)/.\1/c,class,classes/ 54 | --regex-css=/^[ \t]*#([A-Za-z0-9_-]+)/#\1/i,id,ids/ 55 | --regex-css=/^[ \t]*(([A-Za-z0-9_-]+[ \t\n,]+)+)\{/\1/t,tag,tags/ 56 | --regex-css=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/m,media,medias/ 57 | 58 | --langdef=scss 59 | --langmap=scss:.scss 60 | --regex-scss=/^[ \t]*@mixin ([A-Za-z0-9_-]+)/\1/m,mixin,mixins/ 61 | --regex-scss=/^[ \t]*\$([A-Za-z0-9_-]+)/\1/v,variable,variables/ 62 | --regex-scss=/^([A-Za-z0-9_-]*)*\.([A-Za-z0-9_-]+) *[,{]/\2/c,class,classes/ 63 | --regex-scss=/^[ \t]+\.([A-Za-z0-9_-]+) *[,{]/\1/c,class,classes/ 64 | --regex-scss=/^(.*)*\#([A-Za-z0-9_-]+) *[,{]/\2/i,id,ids/ 65 | --regex-scss=/^[ \t]*#([A-Za-z0-9_-]+)/\1/i,id,ids/ 66 | --regex-scss=/(^([A-Za-z0-9_-])*([A-Za-z0-9_-]+)) *[,|\{]/\1/t,tag,tags/ 67 | --regex-scss=/(^([^\/\/])*)[ \t]+([A-Za-z0-9_-]+)) *[,|\{]/\3/t,tag,tags/ 68 | --regex-scss=/(^(.*, *)([A-Za-z0-9_-]+)) *[,|\{]/\3/t,tag,tags/ 69 | --regex-scss=/(^[ \t]+([A-Za-z0-9_-]+)) *[,|\{]/\1/t,tag,tags/ 70 | --regex-scss=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/d,media,media/ 71 | 72 | --regex-html=/id="([A-Za-z0-9_-]+)"/\1/i,id,ids/ 73 | --regex-html=/class="([A-Za-z0-9_-]+)"/\1/c,class,classes/ 74 | 75 | --langdef=markdown 76 | --langmap=markdown:.md 77 | --regex-markdown=/^#\+[ \t](.*$)/\1/h,heading,headings/ 78 | 79 | --langmap=vim:+(vimrc) 80 | -------------------------------------------------------------------------------- /.curlrc: -------------------------------------------------------------------------------- 1 | # Disguise as IE 9 on Windows 7 2 | user-agent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" 3 | 4 | # When following a redirect, automatically set the previous URL as referer 5 | referer = ";auto" 6 | 7 | # Wait 60 seconds before timing out 8 | connect-timeout = 60 9 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | indent_style = space 11 | indent_size = 4 12 | 13 | [package.json] 14 | indent_style = space 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.exports: -------------------------------------------------------------------------------- 1 | # Make vim the default editor 2 | export EDITOR="vim"; 3 | 4 | # Larger bash history (allow 32³ entries; default is 500) 5 | export HISTSIZE=32768; 6 | export HISTFILESIZE=$HISTSIZE; 7 | export HISTCONTROL=ignoredups; 8 | # Make some commands not show up in history 9 | export HISTIGNORE="ls:cd:cd -:pwd:exit:date"; 10 | 11 | # Prefer US English and use UTF-8 12 | export LANG="en_US.UTF-8"; 13 | export LC_ALL="en_US.UTF-8"; 14 | 15 | # less options: 16 | # --quit-if-one-screen - exit less if the output is short 17 | # --mouse - allow scrolling with the mouse/trackpad 18 | # --raw-control-chars - pass through escape sequences like colours so output is still formatted 19 | # --no-init - do not clear the screen after quitting 20 | export LESS="--quit-if-one-screen --mouse --raw-control-chars --no-init --tabs=4 --HILITE-UNREAD --tilde --status-column" 21 | # Highlight section titles in manual pages 22 | export LESS_TERMCAP_md="${yellow}"; 23 | 24 | export PAGER="less"; 25 | export MANPAGER="less"; 26 | 27 | # Link Homebrew casks in `/Applications` rather than `~/Applications` 28 | export HOMEBREW_CASK_OPTS="--appdir=/Applications"; 29 | 30 | export GOPATH=$HOME/go 31 | 32 | export GIT_DUET_CO_AUTHORED_BY=1 33 | export GIT_DUET_ROTATE_AUTHOR=1 34 | export GIT_DUET_GLOBAL=1 35 | 36 | export NVM_DIR="$HOME/.nvm" 37 | 38 | export GPG_TTY=$(tty) 39 | -------------------------------------------------------------------------------- /.functions: -------------------------------------------------------------------------------- 1 | # Simple calculator 2 | function calc() { 3 | local result=""; 4 | result="$(printf "scale=10;$*\n" | bc --mathlib | tr -d '\\\n')"; 5 | # └─ default (when `--mathlib` is used) is 20 6 | # 7 | if [[ "$result" == *.* ]]; then 8 | # improve the output for decimal numbers 9 | printf "$result" | 10 | sed -e 's/^\./0./' `# add "0" for cases like ".5"` \ 11 | -e 's/^-\./-0./' `# add "0" for cases like "-.5"`\ 12 | -e 's/0*$//;s/\.$//'; # remove trailing zeros 13 | else 14 | printf "$result"; 15 | fi; 16 | printf "\n"; 17 | } 18 | 19 | # Create a new directory and enter it 20 | function mkd() { 21 | mkdir -p "$@" && cd "$@"; 22 | } 23 | 24 | # Change working directory to the top-most Finder window location 25 | function cdf() { # short for `cdfinder` 26 | cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')"; 27 | } 28 | 29 | # Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression 30 | function targz() { 31 | local tmpFile="${@%/}.tar"; 32 | tar -cvf "${tmpFile}" --exclude=".DS_Store" "${@}" || return 1; 33 | 34 | size=$( 35 | stat -f"%z" "${tmpFile}" 2> /dev/null; # OS X `stat` 36 | stat -c"%s" "${tmpFile}" 2> /dev/null # GNU `stat` 37 | ); 38 | 39 | local cmd=""; 40 | if (( size < 52428800 )) && hash zopfli 2> /dev/null; then 41 | # the .tar file is smaller than 50 MB and Zopfli is available; use it 42 | cmd="zopfli"; 43 | else 44 | if hash pigz 2> /dev/null; then 45 | cmd="pigz"; 46 | else 47 | cmd="gzip"; 48 | fi; 49 | fi; 50 | 51 | echo "Compressing .tar using \`${cmd}\`…"; 52 | "${cmd}" -v "${tmpFile}" || return 1; 53 | [ -f "${tmpFile}" ] && rm "${tmpFile}"; 54 | echo "${tmpFile}.gz created successfully."; 55 | } 56 | 57 | # Determine size of a file or total size of a directory 58 | function fs() { 59 | if du -b /dev/null > /dev/null 2>&1; then 60 | local arg=-sbh; 61 | else 62 | local arg=-sh; 63 | fi 64 | if [[ -n "$@" ]]; then 65 | du $arg -- "$@"; 66 | else 67 | du $arg .[^.]* *; 68 | fi; 69 | } 70 | 71 | # Use Git’s colored diff when available 72 | hash git &>/dev/null; 73 | if [ $? -eq 0 ]; then 74 | function diff() { 75 | git --no-pager diff --no-index --color-words "$@"; 76 | } 77 | fi; 78 | 79 | # Create a data URL from a file 80 | function dataurl() { 81 | local mimeType=$(file -b --mime-type "$1"); 82 | if [[ $mimeType == text/* ]]; then 83 | mimeType="${mimeType};charset=utf-8"; 84 | fi 85 | echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')"; 86 | } 87 | 88 | # Create a git.io short URL 89 | function gitio() { 90 | if [ -z "${1}" -o -z "${2}" ]; then 91 | echo "Usage: \`gitio slug url\`"; 92 | return 1; 93 | fi; 94 | curl -i http://git.io/ -F "url=${2}" -F "code=${1}"; 95 | } 96 | 97 | # Start an HTTP server from a directory, optionally specifying the port 98 | function server() { 99 | local port="${1:-8000}"; 100 | sleep 1 && open "http://localhost:${port}/" & 101 | # Set the default Content-Type to `text/plain` instead of `application/octet-stream` 102 | # And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files) 103 | python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"; 104 | } 105 | 106 | # Start a PHP server from a directory, optionally specifying the port 107 | # (Requires PHP 5.4.0+.) 108 | function phpserver() { 109 | local port="${1:-4000}"; 110 | local ip=$(ipconfig getifaddr en1); 111 | sleep 1 && open "http://${ip}:${port}/" & 112 | php -S "${ip}:${port}"; 113 | } 114 | 115 | # Compare original and gzipped file size 116 | function gz() { 117 | local origsize=$(wc -c < "$1"); 118 | local gzipsize=$(gzip -c "$1" | wc -c); 119 | local ratio=$(echo "$gzipsize * 100 / $origsize" | bc -l); 120 | printf "orig: %d bytes\n" "$origsize"; 121 | printf "gzip: %d bytes (%2.2f%%)\n" "$gzipsize" "$ratio"; 122 | } 123 | 124 | # Syntax-highlight JSON strings or files 125 | # Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json` 126 | function json() { 127 | if [ -t 0 ]; then # argument 128 | python -mjson.tool <<< "$*" | pygmentize -l javascript; 129 | else # pipe 130 | python -mjson.tool | pygmentize -l javascript; 131 | fi; 132 | } 133 | 134 | # Run `dig` and display the most useful info 135 | function digga() { 136 | dig +nocmd "$1" any +multiline +noall +answer; 137 | } 138 | 139 | # UTF-8-encode a string of Unicode symbols 140 | function escape() { 141 | printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u); 142 | # print a newline unless we’re piping the output to another program 143 | if [ -t 1 ]; then 144 | echo ""; # newline 145 | fi; 146 | } 147 | 148 | # Decode \x{ABCD}-style Unicode escape sequences 149 | function unidecode() { 150 | perl -e "binmode(STDOUT, ':utf8'); print \"$@\""; 151 | # print a newline unless we’re piping the output to another program 152 | if [ -t 1 ]; then 153 | echo ""; # newline 154 | fi; 155 | } 156 | 157 | # Get a character’s Unicode code point 158 | function codepoint() { 159 | perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))"; 160 | # print a newline unless we’re piping the output to another program 161 | if [ -t 1 ]; then 162 | echo ""; # newline 163 | fi; 164 | } 165 | 166 | # Show all the names (CNs and SANs) listed in the SSL certificate 167 | # for a given domain 168 | function getcertnames() { 169 | if [ -z "${1}" ]; then 170 | echo "ERROR: No domain specified."; 171 | return 1; 172 | fi; 173 | 174 | local domain="${1}"; 175 | echo "Testing ${domain}…"; 176 | echo ""; # newline 177 | 178 | local tmp=$(echo -e "GET / HTTP/1.0\nEOT" \ 179 | | openssl s_client -connect "${domain}:443" 2>&1); 180 | 181 | if [[ "${tmp}" = *"-----BEGIN CERTIFICATE-----"* ]]; then 182 | local certText=$(echo "${tmp}" \ 183 | | openssl x509 -text -certopt "no_header, no_serial, no_version, \ 184 | no_signame, no_validity, no_issuer, no_pubkey, no_sigdump, no_aux"); 185 | echo "Common Name:"; 186 | echo ""; # newline 187 | echo "${certText}" | grep "Subject:" | sed -e "s/^.*CN=//"; 188 | echo ""; # newline 189 | echo "Subject Alternative Name(s):"; 190 | echo ""; # newline 191 | echo "${certText}" | grep -A 1 "Subject Alternative Name:" \ 192 | | sed -e "2s/DNS://g" -e "s/ //g" | tr "," "\n" | tail -n +2; 193 | return 0; 194 | else 195 | echo "ERROR: Certificate not found."; 196 | return 1; 197 | fi; 198 | } 199 | 200 | # `s` with no arguments opens the current directory in Sublime Text, otherwise 201 | # opens the given location 202 | function s() { 203 | if [ $# -eq 0 ]; then 204 | subl .; 205 | else 206 | subl "$@"; 207 | fi; 208 | } 209 | 210 | # `v` with no arguments opens the current directory in Vim, otherwise opens the 211 | # given location 212 | function v() { 213 | if [ $# -eq 0 ]; then 214 | vim .; 215 | else 216 | vim "$@"; 217 | fi; 218 | } 219 | 220 | # `o` with no arguments opens the current directory, otherwise opens the given 221 | # location 222 | function o() { 223 | if [ $# -eq 0 ]; then 224 | open .; 225 | else 226 | open "$@"; 227 | fi; 228 | } 229 | 230 | # `tre` is a shorthand for `tree` with hidden files and color enabled, ignoring 231 | # the `.git` directory, listing directories first. The output gets piped into 232 | # `less` with options to preserve color and line numbers, unless the output is 233 | # small enough for one screen. 234 | function tre() { 235 | tree -aC -I '.git|node_modules|bower_components|.Spotlight-V100|.TemporaryItems|.DocumentRevisions-V100|.fseventsd' --dirsfirst "$@" | less -FRNX; 236 | } 237 | 238 | # Ask for confirmation and exit accordingly 239 | function confirm () { 240 | # call with a prompt string or use a default 241 | read -r -p "${1:-Are you sure? [y/N]} " response 242 | case $response in 243 | [yY][eE][sS]|[yY]) 244 | true 245 | ;; 246 | *) 247 | false 248 | ;; 249 | esac 250 | } 251 | 252 | # fbr - checkout git branch 253 | fbr() { 254 | local branches branch 255 | branches=$(git branch -vv) && 256 | branch=$(echo "$branches" | fzf +m) && 257 | git checkout $(echo "$branch" | awk '{print $1}' | sed "s/.* //") 258 | } 259 | 260 | # fbr - checkout git branch (including remote branches) 261 | fbr() { 262 | local branches branch 263 | branches=$(git branch --all | grep -v HEAD) && 264 | branch=$(echo "$branches" | 265 | fzf-tmux -d $(( 2 + $(wc -l <<< "$branches") )) +m) && 266 | git checkout $(echo "$branch" | sed "s/.* //" | sed "s#remotes/[^/]*/##") 267 | } 268 | 269 | # fbr - checkout git branch (including remote branches), sorted by most recent commit, limit 30 last branches 270 | fbr() { 271 | local branches branch 272 | branches=$(git for-each-ref --count=30 --sort=-committerdate refs/heads/ --format="%(refname:short)") && 273 | branch=$(echo "$branches" | 274 | fzf-tmux -d $(( 2 + $(wc -l <<< "$branches") )) +m) && 275 | git checkout $(echo "$branch" | sed "s/.* //" | sed "s#remotes/[^/]*/##") 276 | } 277 | 278 | # fco - checkout git branch/tag 279 | fco() { 280 | local tags branches target 281 | tags=$( 282 | git tag | awk '{print "\x1b[31;1mtag\x1b[m\t" $1}') || return 283 | branches=$( 284 | git branch --all | grep -v HEAD | 285 | sed "s/.* //" | sed "s#remotes/[^/]*/##" | 286 | sort -u | awk '{print "\x1b[34;1mbranch\x1b[m\t" $1}') || return 287 | target=$( 288 | (echo "$tags"; echo "$branches") | 289 | fzf-tmux -l30 -- --no-hscroll --ansi +m -d "\t" -n 2) || return 290 | git checkout $(echo "$target" | awk '{print $2}') 291 | } 292 | 293 | 294 | # fco_preview - checkout git branch/tag, with a preview showing the commits between the tag/branch and HEAD 295 | fco_preview() { 296 | local tags branches target 297 | tags=$( 298 | git tag | awk '{print "\x1b[31;1mtag\x1b[m\t" $1}') || return 299 | branches=$( 300 | git branch --all | grep -v HEAD | 301 | sed "s/.* //" | sed "s#remotes/[^/]*/##" | 302 | sort -u | awk '{print "\x1b[34;1mbranch\x1b[m\t" $1}') || return 303 | target=$( 304 | (echo "$tags"; echo "$branches") | 305 | fzf --no-hscroll --no-multi --delimiter="\t" -n 2 \ 306 | --ansi --preview="git log -200 --pretty=format:%s $(echo {+2..} | sed 's/$/../' )" ) || return 307 | git checkout $(echo "$target" | awk '{print $2}') 308 | } 309 | 310 | # fshow - git commit browser 311 | fshow() { 312 | git log --graph --color=always \ 313 | --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | 314 | fzf --ansi --no-sort --reverse --tiebreak=index --bind=ctrl-s:toggle-sort \ 315 | --bind "ctrl-m:execute: 316 | (grep -o '[a-f0-9]\{7\}' | head -1 | 317 | xargs -I % sh -c 'git show --color=always % | less -R') << 'FZF-EOF' 318 | {} 319 | FZF-EOF" 320 | } 321 | 322 | # fstash - easier way to deal with stashes 323 | # type fstash to get a list of your stashes 324 | # enter shows you the contents of the stash 325 | # ctrl-d shows a diff of the stash against your current HEAD 326 | # ctrl-b checks the stash out as a branch, for easier merging 327 | fstash() { 328 | local out q k sha 329 | while out=$( 330 | git stash list --pretty="%C(yellow)%h %>(14)%Cgreen%cr %C(blue)%gs" | 331 | fzf --ansi --no-sort --query="$q" --print-query \ 332 | --expect=ctrl-d,ctrl-b); 333 | do 334 | mapfile -t out <<< "$out" 335 | q="${out[0]}" 336 | k="${out[1]}" 337 | sha="${out[-1]}" 338 | sha="${sha%% *}" 339 | [[ -z "$sha" ]] && continue 340 | if [[ "$k" == 'ctrl-d' ]]; then 341 | git diff $sha 342 | elif [[ "$k" == 'ctrl-b' ]]; then 343 | git stash branch "stash-$sha" $sha 344 | break; 345 | else 346 | git stash show -p $sha 347 | fi 348 | done 349 | } 350 | -------------------------------------------------------------------------------- /.gemrc: -------------------------------------------------------------------------------- 1 | --- 2 | :backtrace: false 3 | :bulk_threshold: 1000 4 | :sources: 5 | - https://rubygems.org/ 6 | :update_sources: true 7 | :verbose: true 8 | :concurrent_downloads: 8 9 | benchmark: false 10 | gem: "--no-ri --no-rdoc" 11 | -------------------------------------------------------------------------------- /.gitconfig: -------------------------------------------------------------------------------- 1 | #################################### 2 | # Global configuration file for Git. 3 | #################################### 4 | 5 | # A lot of aliases to speed up full-time usage of Git from command line. 6 | # Long flag names are used for readability wherever possible. 7 | # Short flags are meant for writing on the command line. 8 | [alias] 9 | # Shorthand for add 10 | a = add 11 | 12 | # Add all unstaged (including untracked) files. 13 | # See`git help add` 14 | aa = add --all 15 | 16 | # Interactive add. Used for patching. 17 | # See`git help add` 18 | ai = add --interactive 19 | 20 | # List Git aliases with definitions 21 | aliases = ! git config --get-regexp ^alias\\. | grep -v "^alias\\.aliases" | sed -e 's/^alias\\.//' -e 's/\\ /\\ =\\ /' 22 | 23 | # Amend the currently staged files to the last commit 24 | # See`git help commit` 25 | amend = commit --amend --reuse-message=HEAD 26 | 27 | # Shorthand for branch 28 | b = branch 29 | 30 | # Delete a branch only if it is merged in the current branch. 31 | # See`git help branch` 32 | bd = branch --delete 33 | 34 | # Shorthand for branch --merged 35 | bm = branch --merged 36 | 37 | # Shorthand for commit 38 | c = commit 39 | 40 | # Unlearn checkout shortcuts, use switch and restore since Git 2.23. 41 | ch = "!f() { echo 'Did you mean to checkout a branch or a file?'; echo 'Use git sw for switching a branch.'; echo 'Use git restore for restoring a file in the working tree.'; exit 1; }; f" 42 | chb = "!f() { echo 'Did you mean to create a new branch?'; echo 'Use git swtch -c or the git swc shortcut instead!'; exit 1; }; f" 43 | 44 | # Shorthand for clone 45 | cl = clone 46 | 47 | # Delete all untracked files and directories. 48 | # See`git help clean` 49 | cleanit = clean --force -d --interactive 50 | 51 | # Shorthand for config 52 | # See`git help config` for config options 53 | cn = config 54 | 55 | # Shorthand for global config 56 | cng = config --global 57 | 58 | # List contributors with number of commits 59 | # See`git help shortlog` 60 | contributors = shortlog --summary --numbered 61 | 62 | # Shorthand for cherry-pick 63 | cp = cherry-pick -x 64 | 65 | # Credit an author on the latest commit 66 | credit = "!f() { git commit --amend --author \"$1 <$2>\" --reuse-message=HEAD; }; f" 67 | 68 | # Show the diff between the latest commit and the current state 69 | d = diff 70 | 71 | # Diff staging area (a.k.a index) to HEAD (a.k.a last commit) 72 | dc = diff --cached 73 | 74 | # `git di $number` shows the diff between the state `$number` revisions ago and the current state 75 | di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" 76 | 77 | # Remove branches that have already been merged with main 78 | dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" 79 | 80 | # Shorthand for fetch 81 | f = fetch 82 | 83 | # Find branches containing commit 84 | fb = "!f() { git branch -a --contains $1; }; f" 85 | 86 | # Find commits by source code 87 | fc = "!f() { git l --date=short -S$1; }; f" 88 | 89 | # In case of fire 90 | # https://twitter.com/bozhobg/status/650265599671693312 91 | fire = "!git commit --all && git push --set-upstream origin HEAD && echo 'LEAVE BUILDING!!!'" 92 | 93 | # Find commits by commit message 94 | fm = "!f() { git l --date=short --grep=$1; }; f" 95 | 96 | # Find tags containing commit 97 | ft = "!f() { git describe --always --contains $1; }; f" 98 | 99 | # Shorthand for help 100 | h = help 101 | 102 | # Pretty log of commits. Supports options of git log 103 | # The 8-char abbreviation works well with the default pretty format below 104 | l = log --abbrev-commit --abbrev=8 105 | 106 | # Reverse log 107 | lr = log --abbrev-commit --abbrev=8 --reverse 108 | 109 | # Same as l, but with graph. 110 | # Recursive resolving of aliases break tab-completion for options, 111 | # so the command is listed again. 112 | lg = log --abbrev-commit --abbrev=8 --graph 113 | 114 | # Same as above, but list local commits not on upstream 115 | local = log --abbrev-commit --abbrev=8 @{u}.. 116 | 117 | # Shorthand for merge 118 | m = merge 119 | 120 | # Shorthand for mergetool 121 | mt = mergetool 122 | 123 | # Log commits authored by me 124 | mylog = !git log --author=\"$(git config user.name)\" 125 | 126 | # Show the not merged branches compared to the current branch 127 | nm = branch --no-merged 128 | 129 | # Show the not merged branches compared to the main branch 130 | nmm = branch --no-merged main 131 | 132 | # Shorthand for push 133 | p = push 134 | 135 | # Shorthand for pull 136 | pl = pull --ff-only --rebase 137 | 138 | # Create a new remote branch with the same name and track it. 139 | # First argument is remote name. Defaults to "origin". 140 | # Second, third and fourth argument are passed to `git push`. 141 | publish = "!p() { echo 'With push.AutoSetUpRemote there is no need to use the publish alias. Use push.' exit 1; }; p" 142 | 143 | # Push force with a check if all the commits you are overriding on the remote 144 | # were previously present in the remote reference in your repository. 145 | # This way force push is safer as it wouldn't overwrite commits by other team members 146 | # pushed to the remote branch after you've last pulled and rewritten some history. 147 | pushf = push --force-with-lease 148 | 149 | # Shorthand for remote 150 | r = remote 151 | 152 | # Show branches sorted by recency, good to combine with ` | head` or ` | less -RF` for many branches 153 | recent = branch --sort="-committerdate" --format=' %(color:blue)%(align:12,right)%(committerdate:relative)%(end)%(color:reset):%09%(color:yellow)%(refname:short)%(color:reset)' --color=always 154 | 155 | # Commits from last week from oldest to newest 156 | report = log --abbrev-commit --abbrev=8 --since=1.week.ago --first-parent --reverse 157 | 158 | # Interactive rebase with the given number of latest commits 159 | ri = "!r() { git rebase --interactive HEAD~$1; }; r" 160 | 161 | # Update all remotes 162 | ru = remote update 163 | 164 | # Shorthand for rebase 165 | rb = rebase 166 | 167 | # Shorthand for reset 168 | rs = reset 169 | 170 | # View the current working tree status using the short format 171 | # Show the current branch as well 172 | # See`git help status` 173 | s = status --short --branch 174 | 175 | # Shorthand for show 176 | sh = show 177 | 178 | # Shorthand for shortlog 179 | shl = shortlog 180 | 181 | # Change branch 182 | sw = switch 183 | 184 | # Create branch 185 | swc = switch --create 186 | 187 | # Shorthand for stash 188 | st = stash 189 | 190 | standup = log --all --no-merges --graph --date=relative --committer=$(git config --get user.email) --pretty=format:'%C(cyan) %ad %C(yellow)%h %Creset %s %Cgreen%d' --since="$(if [[ "Mon" == "$(date +%a)" ]]; then echo "last friday"; else echo "yesterday"; fi)" 191 | 192 | # Pull with rebase and push with configured upstream branch 193 | sync = "!git pull --rebase && git push" 194 | 195 | # Shorthand for tag 196 | t = tag 197 | 198 | # Rest local branch to upstream 199 | upstream = reset --soft @{u} 200 | 201 | [apply] 202 | # Detect whitespace errors when applying a patch 203 | # whitespace = warn 204 | 205 | [color] 206 | # Use colors in Git commands that are capable of colored output when 207 | # outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.) 208 | ui = auto 209 | 210 | [color "branch"] 211 | # Highlight current. Yellow local branches; Green remotes. 212 | current = yellow reverse 213 | local = yellow 214 | remote = green 215 | 216 | [color "diff"] 217 | # Yellow meta; Magenta line info; Red for deleltions; Green for additions. 218 | meta = yellow 219 | frag = magenta 220 | old = red 221 | new = green 222 | whitespace = red reverse 223 | 224 | [color "status"] 225 | # Changed files are yellow. 226 | # Staged files are green. 227 | # New (untracked) files are cyan. 228 | # Headers are gray (white dimmed) 229 | # Branch is always green even in headers 230 | added = green 231 | branch = green 232 | changed = yellow 233 | header = white dim 234 | untracked = cyan 235 | 236 | [commit] 237 | gpgSign = false 238 | 239 | # Set a template for writing commit messages in the editor 240 | template = ~/git/.gitmessage 241 | 242 | [core] 243 | # Global `.gitattributes` 244 | attributesfile = ~/git/.gitattributes 245 | 246 | # Default editor for commit messages and other inputs 247 | # Even when EDITOR is set to something else 248 | editor=vim 249 | 250 | # Global `.gitignore` 251 | excludesfile = ~/git/.gitignore_global 252 | 253 | pager = diff-so-fancy | less --tabs=4 254 | 255 | # Make `git rebase` safer on OS X 256 | # More info: http://www.git-tower.com/blog/make-git-rebase-safe-on-osx 257 | trustctime = false 258 | 259 | # Speed up commands involving untracked files such as `git status`. 260 | # https://git-scm.com/docs/git-update-index#_untracked_cache 261 | untrackedCache = true 262 | 263 | # Treat 264 | # - spaces before tabs, 265 | # - lines that are indented with tabs, 266 | # - all kinds of trailing whitespace 267 | # as an error. 268 | whitespace = space-before-tab,trailing-space,tab-in-indent 269 | 270 | [diff] 271 | # Use more time to create better diffs. 272 | # E.g. matching opening/closing braces from neighbour functions. 273 | # See "`git help diff` --patience" and "`git help merge` recursive". 274 | algorithm = patience 275 | 276 | # Use blank lines as a strong hint to identify the changes 277 | compactionHeuristic = true 278 | 279 | # Diff will detect both renames and copies. 280 | renames = copies 281 | 282 | # Default to vimdiff for visualising diffs. 283 | # Override with --tool= in difftool 284 | # See`git help difftool` 285 | # See`git help config` and search for "diff.tool" 286 | tool=opendiff 287 | 288 | [diff "javascript"] 289 | xfuncname = "^\\s*(.*?\\bfunction\\b.*?\\(.*?\\))" 290 | 291 | [diff-so-fancy] 292 | # Configure diff-so-fancy with ASCII separators 293 | useUnicodeRuler = false 294 | 295 | [difftool] 296 | # Difftool will not prompt for every file. 297 | # Use --prompt to override. 298 | prompt = false 299 | 300 | [format] 301 | pretty = colourful 302 | 303 | [help] 304 | # Automatically correct and execute mistyped commands 305 | autocorrect = 1 306 | 307 | [gpg] 308 | program = gpg 309 | 310 | [include] 311 | # Additional Git configuration per machine not committed to the dotfiles repo 312 | path = ~/git/.gitconfig.local 313 | 314 | [init] 315 | # Initialize a new repository with a template for its `.git` folder 316 | # Useful for adding hooks by default 317 | # templatedir = ~/git/.git-template 318 | 319 | # Intialise repos with the default branch called main 320 | defaultBranch = main 321 | 322 | [interactive] 323 | # diffFilter = diff-so-fancy | less --tabs=4 --tilde --status-column --HILITE-UNREAD 324 | 325 | [log] 326 | # Always use .mailmap resolution of author names and emails in git-log 327 | mailmap = 1 328 | 329 | [mailmap] 330 | file = ~/.mailmap 331 | 332 | [merge] 333 | # Include merged common ancestor with ||||||| separator in the merge conflicts 334 | conflictStyle = diff3 335 | 336 | # Include summaries of merged commits in newly created merge commit messages 337 | log = true 338 | 339 | # opendiff opens FileMerge 340 | tool = opendiff 341 | 342 | # Custom merge driver for Composer files. Covers both composer.json and composer.lock. See ~/git/.gitattributes 343 | # https://github.com/balbuf/composer-git-merge-driver 344 | [merge "composer_json"] 345 | name = composer JSON file merge driver 346 | driver = composer-git-merge-driver %O %A %B %L %P 347 | recursive = binary 348 | 349 | [mergetool] 350 | # No *.orig files left when using mergetool. 351 | keepBackup = false 352 | 353 | # Mergetool will not prompt for every file. 354 | # Use --prompt to override. 355 | prompt = false 356 | 357 | [mergetool.fac] 358 | 359 | cmd = fac 360 | 361 | [pager] 362 | # Use colors when paging regardless of default color setting. 363 | color = true 364 | 365 | # diff = diff-so-fancy | less --tabs=4 --RAW-CONTROL-CHARS --quit-if-one-screen --no-init --tilde --status-column --HILITE-UNREAD 366 | show = diff-so-fancy | less --tabs=4 --RAW-CONTROL-CHARS --quit-if-one-screen --no-init --tilde --status-column --HILITE-UNREAD 367 | 368 | [protocol] 369 | # Use faster Git protocol 370 | version = 2 371 | 372 | [pretty] 373 | colourful = "format:%Cred%<(8)%h%Creset %<(75,trunc)%s %Cgreen%<(11)%cr%Creset%Cblue%<(17)% aN%Creset%C(yellow)% D%Creset %gN" 374 | live = "format:%Cred%<(6)%h%Creset %<(50,trunc)%s%C(yellow)% D%Creset %gN" 375 | 376 | [push] 377 | # See `git help config` and search for "push.default" 378 | # for more information on different options of the below setting. 379 | # Setting to Git 2.0 default to surpress warning message 380 | # If you use branches with different remote name, use "upstream" 381 | default = simple 382 | 383 | # Assume --set-upstream on default push when no upstream tracking 384 | # exists for the current branch 385 | autoSetupRemote = true 386 | 387 | [rebase] 388 | # Use --autosquash by default. It's not like one would write !fixup message by accident. 389 | autoSquash = true 390 | 391 | # Use --autostash when running git pull --rebase and when rebasing interactively 392 | autoStash = true 393 | 394 | # Warn about removed commits in interactive mode 395 | missingCommitsCheck = warn 396 | 397 | [rerere] 398 | # Reuse recorded resolutions 399 | enabled = true 400 | 401 | [status] 402 | # Show all untracked files in untracked directories 403 | showUntrackedFiles = all 404 | 405 | [submodule] 406 | # Automatically update submodules when pulling 407 | recurse = true 408 | 409 | [tag] 410 | gpgSign = true 411 | 412 | [trailer] 413 | # Configure commit message trailer handling in Git Duet 414 | # See https://github.com/git-duet/git-duet#co-authored-by-trailer-support 415 | ifexists = addIfDifferent 416 | 417 | # URL shorthands 418 | # 419 | # See `git help config` and search for "url." 420 | # 421 | # gh: is a shorthand for git@github.com 422 | [url "git@github.com:"] 423 | 424 | insteadOf = "gh:" 425 | pushInsteadOf = "github:" 426 | pushInsteadOf = "git://github.com/" 427 | 428 | # github: is a shorthand for git://github.com/ 429 | [url "git://github.com/"] 430 | 431 | insteadOf = "github:" 432 | 433 | # gst: is a shorthand for git://gist.github.com/ 434 | [url "git@gist.github.com:"] 435 | 436 | insteadOf = "gst:" 437 | pushInsteadOf = "gist:" 438 | pushInsteadOf = "git://gist.github.com/" 439 | 440 | # gist: is a shofthand for git://gist.github.com/ 441 | [url "git://gist.github.com/"] 442 | 443 | insteadOf = "gist:" 444 | 445 | # Instruct Git to not guess user.name and user.email, but only allow 446 | # commits if they are set in configuration 447 | [user] 448 | useConfigOnly = true 449 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /.gnupg/gpg-agent.conf: -------------------------------------------------------------------------------- 1 | pinentry-program /usr/local/bin/pinentry-curses 2 | 3 | enable-ssh-support 4 | 5 | default-cache-ttl 60 6 | max-cache-ttl 120 7 | -------------------------------------------------------------------------------- /.gnupg/gpg.conf: -------------------------------------------------------------------------------- 1 | # This is an implementation of these guides: 2 | # https://help.riseup.net/en/security/message-security/openpgp/best-practices 3 | # https://blog.tinned-software.net/create-gnupg-key-with-sub-keys-to-sign-encrypt-authenticate/ 4 | # https://blog.eleven-labs.com/en/openpgp-almost-perfect-key-pair-part-1/ 5 | 6 | #----------------------------- 7 | # export 8 | #----------------------------- 9 | 10 | # Disable inclusion of the version string in ASCII armored output 11 | no-emit-version 12 | 13 | # Disable comment string in clear text signatures and ASCII armored messages 14 | no-comments 15 | 16 | # Minimal information in exports 17 | export-options export-minimal 18 | 19 | #----------------------------- 20 | # input 21 | #----------------------------- 22 | 23 | # (OpenPGP-Configuration-Options) 24 | # Assume that command line arguments are given as UTF8 strings. 25 | utf8-strings 26 | 27 | # Try to use the GnuPG-Agent. With this option, GnuPG first tries to connect to 28 | # the agent before it asks for a passphrase. 29 | use-agent 30 | 31 | #----------------------------- 32 | # view 33 | #----------------------------- 34 | 35 | # Display long key IDs 36 | # Select how to display key IDs. "long" is the more accurate (but less 37 | # convenient) 16-character key ID. Add an "0x" to include an "0x" at the 38 | # beginning of the key ID. 39 | keyid-format 0xlong 40 | 41 | # List all keys with their fingerprints. This is the same output as --list-keys 42 | # but with the additional output of a line with the fingerprint. If this 43 | # command is given twice, the fingerprints of all secondary keys are listed too. 44 | with-fingerprint 45 | with-fingerprint 46 | 47 | # Display the calculated validity of user IDs during key listings 48 | list-options show-uid-validity 49 | verify-options show-uid-validity 50 | 51 | #----------------------------- 52 | # keyserver 53 | #----------------------------- 54 | 55 | # This is the server that --recv-keys, --send-keys, and --search-keys will 56 | # communicate with to receive keys from, send keys to, and search for keys on 57 | keyserver hkps://keys.openpgp.org 58 | 59 | # Provide a certificate store to override the system default 60 | # Get this from https://sks-keyservers.net/sks-keyservers.netCA.pem 61 | # keyserver-options ca-cert-file=/usr/local/etc/ssl/certs/hkps.pool.sks-keyservers.net.pem 62 | 63 | # Set the proxy to use for HTTP and HKP keyservers - default to the standard 64 | # local Tor socks proxy 65 | # It is encouraged to use Tor for improved anonymity. Preferrably use either a 66 | # dedicated SOCKSPort for GnuPG and/or enable IsolateDestPort and 67 | # IsolateDestAddr 68 | #keyserver-options http-proxy=socks5-hostname://127.0.0.1:9050 69 | 70 | # Don't leak DNS, see https://trac.torproject.org/projects/tor/ticket/2846 71 | # keyserver-options no-try-dns-srv 72 | 73 | # When using --refresh-keys, if the key in question has a preferred keyserver 74 | # URL, then disable use of that preferred keyserver to refresh the key from 75 | keyserver-options no-honor-keyserver-url 76 | 77 | # When searching for a key with --search-keys, include keys that are marked on 78 | # the keyserver as revoked 79 | keyserver-options include-revoked 80 | 81 | #----------------------------- 82 | # algorithm and ciphers 83 | #----------------------------- 84 | 85 | # list of personal digest preferences. When multiple digests are supported by 86 | # all recipients, choose the strongest one 87 | personal-cipher-preferences AES256 88 | 89 | # list of personal digest preferences. When multiple ciphers are supported by 90 | # all recipients, choose the strongest one 91 | personal-digest-preferences SHA512 92 | 93 | # message digest algorithm used when signing a key 94 | cert-digest-algo SHA512 95 | 96 | compress-algo ZLIB 97 | 98 | # This preference list is used for new keys and becomes the default for 99 | # "setpref" in the edit menu 100 | # Set the list of default preferences to string. This preference list is used 101 | # for new keys and becomes the default for "setpref" in the edit menu. 102 | default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed 103 | 104 | # (OpenPGP-Protocol-Options) 105 | # Set the list of personal digest/cipher/compression preferences. This allows 106 | # the user to safely override the algorithm chosen by the recipient key 107 | # preferences, as GPG will only select an algorithm that is usable by all 108 | # recipients. 109 | personal-compress-preferences ZLIB BZIP2 ZIP 110 | 111 | #----------------------------- 112 | # symmetric encryption 113 | #----------------------------- 114 | 115 | # Selects how passphrases for symmetric encryption are mangled. 3 (the default) 116 | # iterates the whole process a number of times (see --s2k-count). 117 | s2k-mode 3 118 | 119 | # (OpenPGP-Protocol-Options) 120 | # Use name as the cipher algorithm for symmetric encryption with a passphrase 121 | # if --personal-cipher-preferences and --cipher-algo are not given. The 122 | # default is AES-128. 123 | s2k-cipher-algo AES256 124 | 125 | # (OpenPGP-Protocol-Options) 126 | # Use name as the digest algorithm used to mangle the passphrases for symmetric 127 | # encryption. The default is SHA-1. 128 | s2k-digest-algo SHA512 129 | 130 | # (OpenPGP-Protocol-Options) 131 | # Specify how many times the passphrases mangling for symmetric encryption is 132 | # repeated. This value may range between 1024 and 65011712 inclusive. The 133 | # default is inquired from gpg-agent. Note that not all values in the 134 | # 1024-65011712 range are legal and if an illegal value is selected, GnuPG will 135 | # round up to the nearest legal value. This option is only meaningful if 136 | # --s2k-mode is set to the default of 3. 137 | s2k-count 65011712 138 | -------------------------------------------------------------------------------- /.hgignore: -------------------------------------------------------------------------------- 1 | # Use shell-style glob syntax 2 | syntax: glob 3 | 4 | # Compiled Python files 5 | *.pyc 6 | 7 | # Folder view configuration files 8 | .DS_Store 9 | Desktop.ini 10 | 11 | # Thumbnail cache files 12 | ._* 13 | Thumbs.db 14 | 15 | # Files that might appear on external disks 16 | .Spotlight-V100 17 | .Trashes 18 | -------------------------------------------------------------------------------- /.hushlogin: -------------------------------------------------------------------------------- 1 | # The mere presence of this file in the home directory disables the system 2 | # copyright notice, the date and time of the last login, the message of the 3 | # day as well as other information that may otherwise appear on login. 4 | # See `man login`. 5 | -------------------------------------------------------------------------------- /.inputrc: -------------------------------------------------------------------------------- 1 | # Make Tab autocomplete regardless of filename case 2 | set completion-ignore-case on 3 | 4 | # List all matches in case multiple possible completions are possible 5 | set show-all-if-ambiguous on 6 | 7 | # Immediately add a trailing slash when autocompleting symlinks to directories 8 | set mark-symlinked-directories on 9 | 10 | # Use the text that has already been typed as the prefix for searching through 11 | # commands (i.e. more intelligent Up/Down behavior) 12 | "\e[B": history-search-forward 13 | "\e[A": history-search-backward 14 | 15 | # Allow deleting to previous slash using Ctrl+b 16 | C-b:unix-filename-rubout 17 | 18 | # Do not autocomplete hidden files unless the pattern explicitly begins with a dot 19 | set match-hidden-files off 20 | 21 | # Show all autocomplete results at once 22 | set page-completions off 23 | 24 | # If there are more than 200 possible completions for a word, ask to show them all 25 | set completion-query-items 200 26 | 27 | # Display possible completions using different colors to indicate their file type 28 | set colored-stats on 29 | 30 | # Show extra file information when completing, like `ls -F` does 31 | set visible-stats on 32 | 33 | # Be more intelligent when autocompleting by also looking at the text after 34 | # the cursor. For example, when the current line is "cd ~/src/mozil", and 35 | # the cursor is on the "z", pressing Tab will not autocomplete it to "cd 36 | # ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the 37 | # Readline used by Bash 4.) 38 | set skip-completed-text on 39 | 40 | # Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456' 41 | set input-meta on 42 | set output-meta on 43 | set convert-meta off 44 | 45 | # Use Alt/Meta + Delete to delete the preceding word 46 | "\e[3;3~": kill-word 47 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Haralan Dobrev 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.path: -------------------------------------------------------------------------------- 1 | # Load GNU coreutils into PATH 2 | export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH" 3 | export PATH="$HOMEBREW_PREFIX/opt/gnu-sed/libexec/gnubin:$PATH" 4 | export PATH="$HOMEBREW_PREFIX/opt/grep/libexec/gnubin:$PATH" 5 | 6 | # Discover GNU coreutils man pages 7 | export MANPATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/man:$MANPATH" 8 | export MANPATH="$HOMEBREW_PREFIX/opt/gnu-sed/libexec/man:$MANPATH" 9 | export MANPATH="$HOMEBREW_PREFIX/opt/grep/libexec/man:$MANPATH" 10 | 11 | # Add Yarn and npm global binaries to the `$PATH` 12 | # export PATH="$HOME/.config/yarn/global/node_modules/.bin:$(npm --global prefix)/bin:$PATH" 13 | # 14 | 15 | # Use non-brew node packages 16 | export PATH="$HOME/.npm-packages/bin:$PATH" 17 | 18 | # Add rbenv to PATH 19 | export PATH="$HOME/.rbenv/bin:$PATH" 20 | 21 | # Add Go-installed binaries to PATH 22 | export PATH=$PATH:$HOMEBREW_PREFIX/opt/go/libexec/bin 23 | 24 | export PATH=$PATH:$HOME/go/bin 25 | 26 | export PATH=$PATH:$HOME/Library/Python/3.7/bin 27 | 28 | # Add `~/bin` to the `$PATH` 29 | export PATH="$HOME/bin:$PATH"; 30 | export PATH="$HOMEBREW_PREFIX/opt/openssl@1.1/bin:$PATH" 31 | export PATH="$HOMEBREW_PREFIX/opt/openjdk/bin:$PATH" 32 | export JAVA_HOME="$HOMEBREW_PREFIX/opt/openjdk@11" 33 | export PATH="$HOMEBREW_PREFIX/opt/openjdk@11/bin:$PATH" 34 | export CPPFLAGS="-I$HOMEBREW_PREFIX/opt/openjdk@11/include" 35 | -------------------------------------------------------------------------------- /.rbenv/version: -------------------------------------------------------------------------------- 1 | 2.7.1 2 | -------------------------------------------------------------------------------- /.screenrc: -------------------------------------------------------------------------------- 1 | # Disable the startup message 2 | startup_message off 3 | 4 | # Set a large scrollback buffer 5 | defscrollback 32000 6 | 7 | # Always start `screen` with UTF-8 enabled (`screen -U`) 8 | defutf8 on 9 | -------------------------------------------------------------------------------- /.ssh/config: -------------------------------------------------------------------------------- 1 | Include config.d/* 2 | 3 | IdentitiesOnly yes 4 | ControlPersist 4h 5 | -------------------------------------------------------------------------------- /.ssh/config.d/github: -------------------------------------------------------------------------------- 1 | Host github gh github.com 2 | Hostname github.com 3 | User git 4 | -------------------------------------------------------------------------------- /.ssh/config.d/travisci: -------------------------------------------------------------------------------- 1 | Host to2.tmate.io 2 | Hostname to2.tmate.io 3 | StrictHostKeyChecking no 4 | IdentityFile ~/.ssh/github 5 | PasswordAuthentication no 6 | -------------------------------------------------------------------------------- /.vim/.vimrc.plugins: -------------------------------------------------------------------------------- 1 | " .vimrc.plugins - Vim plugin configuration 2 | " vim: nowrap:sw=4:sts=4 3 | 4 | " Auto-bootstrap vim-plug. 5 | let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' 6 | if empty(glob(data_dir . '/autoload/plug.vim')) 7 | silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 8 | autocmd VimEnter * PlugInstall --sync | source $MYVIMRC 9 | endif 10 | call plug#begin('~/.vim/plugged') 11 | 12 | " File and symbols navigation 13 | Plug 'ctrlpvim/ctrlp.vim' 14 | Plug 'majutsushi/tagbar' 15 | Plug 'scrooloose/nerdtree' 16 | Plug 'Xuyuanp/nerdtree-git-plugin' 17 | Plug 'noahfrederick/vim-composer' 18 | 19 | " Autocompletion and snippets 20 | " Plug 'Valloric/YouCompleteMe' 21 | " supertab has configuration problems on Vim 8 22 | " See https://github.com/ervandew/supertab/issues/185 23 | Plug 'ervandew/supertab' 24 | " Plug 'SirVer/ultisnips' 25 | 26 | " Navigation and manipulation 27 | Plug 'gcmt/breeze.vim' 28 | Plug 'tpope/vim-surround' 29 | Plug 'terryma/vim-multiple-cursors' 30 | Plug 'tomtom/tcomment_vim' 31 | 32 | " Git integration 33 | Plug 'tpope/vim-fugitive' 34 | Plug 'airblade/vim-gitgutter' 35 | 36 | " Indentation and whitespace 37 | Plug 'editorconfig/editorconfig-vim' 38 | 39 | " Syntax 40 | Plug 'cakebaker/scss-syntax.vim' 41 | Plug 'aklt/plantuml-syntax' 42 | 43 | " Themes 44 | Plug 'ajh17/Spacegray.vim' 45 | " Plug 'bling/vim-airline' 46 | " Plug 'vim-airline/vim-airline-themes' 47 | 48 | " Windows 49 | Plug 'vim-scripts/ZoomWin' 50 | 51 | call plug#end() 52 | 53 | """"""""""""""""""""""" 54 | " Plugin confiuguration 55 | """"""""""""""""""""""" 56 | 57 | " Use tree-style listing in netrw 58 | let g:netrw_liststyle = 3 59 | let g:netrw_list_hide = '\.git,\.DS_Store' 60 | 61 | " CtrlP 62 | set wildignore+=*/.git/*,*/.hg/*,*/.svn/* 63 | let g:ctrlp_max_files = 0 64 | 65 | " Ultisnip 66 | " NOTE: otherwise it overrides forever 67 | let g:UltiSnipsExpandTrigger="" 68 | let g:UltiSnipsJumpForwardTrigger="" 69 | let g:UltiSnipsJumpBackwardTrigger="" 70 | let g:did_UltiSnips_vim_after = 1 71 | 72 | " vim-airline 73 | let g:airline#extensions#tabline#enabled = 1 74 | " Airline theme 75 | let g:airline_theme='badwolf' 76 | if !exists('g:airline_symbols') 77 | let g:airline_symbols = {} 78 | endif 79 | 80 | " Disable tComment to escape some entities 81 | let g:tcomment#replacements_xml={} 82 | 83 | " Color scheme 84 | colorscheme spacegray 85 | let g:spacegray_underline_search = 1 86 | 87 | " vim-surround key mappings 88 | " Surround text currently selected while in visual mode 89 | " (The surrounded text is kept selected after being surround) 90 | vmap " S"lvi" 91 | vmap ' S'lvi' 92 | vmap ` S`lvi` 93 | vmap ( S)lvi( 94 | vmap { S}lvi{ 95 | vmap [ S]lvi[ 96 | vmap < S>lvi< 97 | -------------------------------------------------------------------------------- /.vim/ftdetect/gitmessage.vim: -------------------------------------------------------------------------------- 1 | au BufNewFile,BufRead .gitmessage setf gitcommit 2 | -------------------------------------------------------------------------------- /.vim/ftdetect/json.vim: -------------------------------------------------------------------------------- 1 | " Treat .json files as .js 2 | autocmd BufNewFile,BufRead *.json setfiletype json syntax=javascript 3 | -------------------------------------------------------------------------------- /.vim/ftdetect/sshconfig.vim: -------------------------------------------------------------------------------- 1 | au BufNewFile,BufRead ssh_config,*/.ssh/config.d/* setf sshconfig 2 | -------------------------------------------------------------------------------- /.vim/tmp/backups/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hkdobrev/dotfiles/46b319b637336ace38d339e0837cddab7ce00f93/.vim/tmp/backups/.gitkeep -------------------------------------------------------------------------------- /.vim/tmp/swaps/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hkdobrev/dotfiles/46b319b637336ace38d339e0837cddab7ce00f93/.vim/tmp/swaps/.gitkeep -------------------------------------------------------------------------------- /.vim/tmp/undo/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hkdobrev/dotfiles/46b319b637336ace38d339e0837cddab7ce00f93/.vim/tmp/undo/.gitkeep -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | " Make Vim more useful 2 | set nocompatible 3 | 4 | filetype plugin indent on 5 | 6 | """""""" 7 | " Insert 8 | """""""" 9 | 10 | " Configure completion popups 11 | set completeopt=menuone,longest 12 | 13 | " Allow cursor keys in insert mode 14 | set esckeys 15 | 16 | " Allow backspace in insert mode 17 | set backspace=indent,eol,start 18 | 19 | " Make indentation smarter 20 | set autoindent 21 | set smartindent 22 | set cindent 23 | 24 | " Expand tabs to spaces 25 | set expandtab 26 | 27 | " Make tabs as wide as four spaces 28 | set tabstop=4 29 | set shiftwidth=4 30 | set shiftround 31 | 32 | """"""""" 33 | " Visuals 34 | """"""""" 35 | 36 | " Enable syntax highlighting 37 | if has('autocmd') 38 | filetype plugin indent on 39 | endif 40 | if has('syntax') && !exists('g:syntax_on') 41 | syntax enable 42 | endif 43 | 44 | " Disable error bells 45 | set noerrorbells 46 | 47 | " Show the cursor position 48 | set ruler 49 | 50 | " Don’t show the intro message when starting Vim 51 | set shortmess=atIO 52 | 53 | " Show the current mode 54 | set showmode 55 | 56 | " Show the filename in the window titlebar 57 | set title 58 | 59 | " Highlight current line 60 | set cursorline 61 | 62 | " Show the (partial) command as it’s being typed 63 | set showcmd 64 | 65 | " Enable line numbers 66 | set number 67 | 68 | " Use relative line numbers 69 | if exists("&relativenumber") 70 | set relativenumber 71 | au BufReadPost * set relativenumber 72 | endif 73 | 74 | " Start scrolling three lines before the horizontal window border 75 | set scrolloff=3 76 | 77 | " Show matching bracket briefly 78 | set showmatch 79 | 80 | " Enhance command-line completion 81 | set wildmenu 82 | 83 | " Show invisible characters 84 | set listchars=tab:▸\ ,trail:·,eol:¬,nbsp:_ 85 | set list 86 | 87 | """""""" 88 | " Search 89 | """""""" 90 | 91 | " Add the g flag to search/replace by default 92 | set gdefault 93 | 94 | " Highlight searches 95 | set hlsearch 96 | 97 | " Ignore case of searches 98 | set ignorecase 99 | 100 | " Highlight dynamically as pattern is typed 101 | set incsearch 102 | 103 | " Always show status line 104 | set laststatus=2 105 | 106 | " In many terminal emulators the mouse works just fine, thus enable it. 107 | if has('mouse') 108 | set mouse=a 109 | endif 110 | 111 | " Don’t reset cursor to start of line when moving around. 112 | set nostartofline 113 | 114 | """"""""""""""""""" 115 | " Keyboard mappings 116 | """"""""""""""""""" 117 | 118 | " Change mapleader 119 | let mapleader="," 120 | 121 | " -. to find a tag 122 | nnoremap . :CtrlPTag 123 | 124 | " -k to toggle Tagbar 125 | nnoremap k :TagbarToggle 126 | 127 | " to strip trailing whitespace 128 | function! StripWhitespace() 129 | let save_cursor = getpos(".") 130 | let old_query = getreg('/') 131 | :%s/\s\+$//e 132 | call setpos('.', save_cursor) 133 | call setreg('/', old_query) 134 | endfunction 135 | noremap ss :call StripWhitespace() 136 | 137 | " -W save a file as root 138 | noremap W :w !sudo tee % > /dev/null 139 | 140 | " to clear the highlighting of :set hlsearch 141 | if maparg('', 'n') ==# '' 142 | nnoremap :nohlsearch 143 | endif 144 | 145 | " to exit insert mode 146 | inoremap 147 | 148 | " Tabs navigation shortcuts 149 | nnoremap :tabprevious 150 | inoremap :tabpreviousi 151 | nnoremap :tabnext 152 | inoremap :tabnexti 153 | nnoremap :tabnew 154 | inoremap :tabnewi 155 | nnoremap :tabclose 156 | inoremap :tabclosei 157 | 158 | " lazy ':' 159 | map \ : 160 | 161 | nnoremap p :set paste 162 | nnoremap o :set nopaste 163 | 164 | """""""""""""""""""" 165 | " Automatic commands 166 | """""""""""""""""""" 167 | 168 | if has("autocmd") 169 | " Enable file type detection 170 | filetype on 171 | endif 172 | 173 | """"""" 174 | " Other 175 | """"""" 176 | 177 | " Set a short timeout delay 178 | " Helps with determining sequence of keys involving escape sequences 179 | set ttimeout 180 | set ttimeoutlen=50 181 | 182 | " Use the OS clipboard by default (on versions compiled with `+clipboard`) 183 | set clipboard=unnamed 184 | 185 | " Optimize for fast terminal connections 186 | set ttyfast 187 | 188 | " Use UTF-8 without BOM 189 | set encoding=utf-8 nobomb 190 | 191 | " Centralize backups, swapfiles and undo history 192 | set backupdir=~/.vim/tmp/backups 193 | set directory=~/.vim/tmp/swaps 194 | if exists("&undodir") 195 | set undodir=~/.vim/tmp/undo 196 | endif 197 | 198 | " Don’t create backups when editing files in certain directories 199 | set backupskip=/tmp/*,/private/tmp/* 200 | 201 | " Respect modeline in files 202 | set modeline 203 | set modelines=4 204 | 205 | " Enable per-directory .vimrc files and disable unsafe commands in them 206 | set exrc 207 | set secure 208 | 209 | " Automatically reload files if changed outside of Vim and not changed in Vim 210 | set autoread 211 | 212 | " Source local override file if one exists. 213 | if filereadable(expand("~/.vim/.vimrc.local")) 214 | source ~/.vim/.vimrc.local 215 | endif 216 | 217 | " Source plugins. 218 | if filereadable(expand("~/.vim/.vimrc.plugins")) 219 | source ~/.vim/.vimrc.plugins 220 | endif 221 | -------------------------------------------------------------------------------- /.wgetrc: -------------------------------------------------------------------------------- 1 | # Use the server-provided last modification date, if available 2 | timestamping = on 3 | 4 | # Do not go up in the directory structure when downloading recursively 5 | no_parent = on 6 | 7 | # Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect and read. (The default read timeout is 15 minutes!) 8 | timeout = 60 9 | 10 | # Retry a few times when a download fails, but don’t overdo it. (The default is 20!) 11 | tries = 3 12 | 13 | # Retry even when the connection was refused 14 | retry_connrefused = on 15 | 16 | # Use the last component of a redirection URL for the local file name 17 | trust_server_names = on 18 | 19 | # Follow FTP links from HTML documents by default 20 | follow_ftp = on 21 | 22 | # Add a `.html` extension to `text/html` or `application/xhtml+xml` files that lack one, or a `.css` extension to `text/css` files that lack one 23 | adjust_extension = on 24 | 25 | # Use UTF-8 as the default system encoding 26 | # Disabled as it makes `wget` builds that don’t support this feature unusable. 27 | # Does anyone know how to conditionally configure a wget setting? 28 | # http://unix.stackexchange.com/q/34730/6040 29 | #local_encoding = UTF-8 30 | 31 | # Ignore `robots.txt` and `` 32 | robots = off 33 | 34 | # Print the HTTP and FTP server responses 35 | server_response = on 36 | 37 | # Disguise as IE 9 on Windows 7 38 | user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) 39 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | # Install GNU core utilities (those that come with OS X are outdated) 2 | # Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`. 3 | brew 'coreutils' 4 | brew 'less' 5 | 6 | # Install some other useful utilities like `sponge` 7 | brew 'moreutils' 8 | 9 | # Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed 10 | brew 'findutils' 11 | 12 | # Install GNU `sed`, overwriting the built-in `sed` 13 | brew 'gnu-sed' 14 | 15 | # Install Bash 4 16 | # Note: don’t forget to add `/usr/local/bin/bash` to `/etc/shells` before running `chsh`. 17 | brew 'bash' 18 | # Install Bash completion 19 | brew 'bash-completion@2' 20 | 21 | # Install useful completions 22 | brew 'brew-cask-completion' 23 | # brew 'composer-completion' 24 | brew 'gem-completion' 25 | brew 'launchctl-completion' 26 | brew 'open-completion' 27 | brew 'ruby-completion' 28 | brew 'yarn-completion' 29 | 30 | # Install more recent versions of some OS X tools 31 | brew 'vim' 32 | 33 | brew 'grep' 34 | brew 'screen' 35 | brew 'zlib' 36 | 37 | # Install other useful binaries 38 | brew 'ack' 39 | brew 'aria2' 40 | brew 'awk' 41 | brew 'awscli' 42 | brew 'bat' 43 | brew 'bfg' 44 | brew 'cloc' 45 | brew 'cmake' 46 | brew 'csvkit' 47 | brew 'ctags' 48 | brew 'diff-so-fancy' 49 | brew 'docker-compose' 50 | brew 'dust' 51 | brew 'exa' 52 | brew 'fzf' 53 | brew 'gcc' 54 | brew 'gh' 55 | brew 'ghex' 56 | brew 'git' 57 | brew 'git-standup' 58 | brew 'git-quick-stats' 59 | brew 'glow' 60 | brew 'gnupg' 61 | brew 'go' 62 | brew 'goaccess' 63 | brew 'graphviz' 64 | brew 'grip' 65 | brew 'httpie' 66 | brew 'htop-osx' 67 | brew 'http-prompt' 68 | brew 'jp2a' 69 | brew 'jpegoptim' 70 | brew 'jq' 71 | brew 'jrnl' 72 | brew 'jsonlint' 73 | brew 'tdewolff/tap/minify' 74 | brew 'node' # This installs `npm` too using the recommended installation method 75 | brew 'openjdk' 76 | brew 'openssl@1.1' 77 | brew 'optipng' 78 | brew 'p7zip' 79 | brew 'pigz' 80 | brew 'postgresql' 81 | brew 'pv' 82 | brew 'python3' 83 | brew 'rbenv' 84 | brew 'rbenv-binstubs' 85 | brew 'rename' 86 | brew 'ssh-copy-id', link: true 87 | brew 'terraform' 88 | brew 'terraform-docs' 89 | brew 'titlecase' 90 | brew 'tldr' 91 | brew 'tree' 92 | brew 'unar' 93 | brew 'webkit2png' 94 | brew 'wget', ags: ['with-iri'] 95 | brew 'yamllint' 96 | brew 'yarn' 97 | brew 'youtube-dl' 98 | brew 'zopfli' 99 | 100 | # Install Brew Cask along with Desktop apps 101 | tap 'homebrew/cask' 102 | # SVN is a prerequisite for installing fonts from Homebrew 103 | brew 'svn' 104 | tap 'homebrew/cask-fonts' 105 | tap 'homebrew/cask-versions' 106 | 107 | cask '1password-beta' 108 | cask '1password-cli' 109 | cask 'docker' 110 | cask 'font-source-code-pro' 111 | cask 'font-source-sans-pro' 112 | cask 'google-chrome' 113 | cask 'haptickey' 114 | cask 'hey' 115 | cask 'iterm2-beta' 116 | cask 'licecap' 117 | cask 'meetingbar' 118 | # cask 'protonvpn' 119 | cask 'rescuetime' 120 | cask 'screenflick' 121 | cask 'slack-beta' 122 | cask 'tableplus' 123 | cask 'tabula' 124 | cask 'telegram-desktop-dev' 125 | cask 'visual-studio-code' 126 | cask 'zoom' 127 | 128 | # Quick Look plugins 129 | # See https://github.com/sindresorhus/quick-look-plugins 130 | cask 'quicklook-csv' 131 | cask 'quicklook-json' 132 | cask 'suspicious-package' 133 | cask 'webpquicklook' 134 | 135 | # Mac App Store apps 136 | # Install mas cli for these to work 137 | # https://github.com/mas-cli/mas 138 | mas "AntiRSI", id: 442007571 139 | mas "Keynote", id: 409183694 140 | mas "Magnet", id: 441258766 141 | mas "Numbers", id: 409203825 142 | mas "Pages", id: 409201541 143 | mas "Pocket", id: 568494494 144 | mas "The Unarchiver", id: 425424353 145 | -------------------------------------------------------------------------------- /LICENSE-MIT.txt: -------------------------------------------------------------------------------- 1 | Copyright Mathias Bynens 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hkdobrev’s dotfiles 2 | 3 | ![Screenshot of my shell prompt](http://i.imgur.com/EkEtphC.png) 4 | 5 | ## Installation 6 | 7 | ### Using Git and the install script 8 | 9 | The repository is made for use inside your `$HOME` directory. It will ignore everything other than what it explicitly is tracking already. 10 | 11 | ``` bash 12 | cd $HOME 13 | git init 14 | git remote add origin git@github.com:hkdobrev/dotfiles.git 15 | git fetch origin main 16 | git reset --hard origin/main 17 | ``` 18 | 19 | It is recommended to fork the repo and adjust it as needed. 20 | 21 | #### Installing initial tools 22 | 23 | When setting up a new computer use the `init/install.sh` script to install Homebrew, Homebrew bundle, rbenv, vim-plug, Composer, set up Bash 4 and the XCode CLI tools. 24 | 25 | ``` bash 26 | ./init/install.sh 27 | ``` 28 | 29 | # Updating 30 | 31 | To later update the dotfiles configuration: 32 | 33 | ```bash 34 | cd 35 | git pull 36 | ``` 37 | 38 | To update your software run the `update` alias which will update Ruby gems, Homebrew formulae, Composer globals and others: 39 | 40 | ```bash 41 | update 42 | ``` 43 | 44 | ### Specify the `$PATH` 45 | 46 | If `~/.path` exists, it will be sourced along with the other files, before any feature testing (such as [detecting which version of `ls` is being used](https://github.com/hkdobrev/dotfiles/blob/aff769fd75225d8f2e481185a71d5e05b76002dc/.aliases#L21-26)) takes place. 47 | 48 | Here’s an example `~/.path` file that adds `~/utils` to the `$PATH`: 49 | 50 | ```bash 51 | export PATH="$HOME/utils:$PATH" 52 | ``` 53 | 54 | ### Add custom configuration without creating a new fork 55 | 56 | If `~/.extra` exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository. 57 | 58 | Git would try to load additional configuration via `~/git/.gitconfig.local`. Use it to populate your own user information: 59 | 60 | ```bash 61 | # Git credentials 62 | git config --file=~/git/.gitconfig.local user.name "John Doe" 63 | git config --file=~/git/.gitconfig.local user.email "jonh.doe@example.com" 64 | git config --file=~/git/.gitconfig.local user.signingKey "0xABCDE" 65 | ``` 66 | 67 | You could also use `~/.extra` to override settings, functions and aliases from my dotfiles repository. It’s probably better to [fork this repository](https://github.com/hkdobrev/dotfiles/fork) for any significant changes, though. 68 | 69 | ### Install Homebrew formulae and Cask apps 70 | 71 | When setting up a new Mac, you may want to install some common [Homebrew](http://brew.sh/) formulae (after installing Homebrew, of course): 72 | 73 | ```bash 74 | brew bundle ~/Brewfile 75 | ``` 76 | 77 | ## Feedback 78 | 79 | Suggestions/improvements 80 | [welcome](https://github.com/hkdobrev/dotfiles/issues)! 81 | 82 | ## Author 83 | 84 | | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | 85 | |---| 86 | | [Mathias Bynens](http://mathiasbynens.be/) | 87 | 88 | This repo is a fork of the originial dotfiles of Mathias Bynens, it is heavily modified by Haralan Dobrev for his own purposes. 89 | 90 | ## Thanks to… 91 | 92 | * @ptb and [his _OS X Lion Setup_ repository](https://github.com/ptb/Mac-OS-X-Lion-Setup) 93 | * [Ben Alman](http://benalman.com/) and his [dotfiles repository](https://github.com/cowboy/dotfiles) 94 | * [Chris Gerke](http://www.randomsquared.com/) and his [tutorial on creating an OS X SOE master image](http://chris-gerke.blogspot.com/2012/04/mac-osx-soe-master-image-day-7.html) + [_Insta_ repository](https://github.com/cgerke/Insta) 95 | * [Cãtãlin Mariş](https://github.com/alrra) and his [dotfiles repository](https://github.com/alrra/dotfiles) 96 | * [Gianni Chiappetta](http://gf3.ca/) for sharing his [amazing collection of dotfiles](https://github.com/gf3/dotfiles) 97 | * [Jan Moesen](http://jan.moesen.nu/) and his [ancient `.bash_profile`](https://gist.github.com/1156154) + [shiny _tilde_ repository](https://github.com/janmoesen/tilde) 98 | * [Lauri ‘Lri’ Ranta](http://lri.me/) for sharing [loads of hidden preferences](http://osxnotes.net/defaults.html) 99 | * [Matijs Brinkhuis](http://hotfusion.nl/) and his [dotfiles repository](https://github.com/matijs/dotfiles) 100 | * [Nicolas Gallagher](http://nicolasgallagher.com/) and his [dotfiles repository](https://github.com/necolas/dotfiles) 101 | * [Sindre Sorhus](http://sindresorhus.com/) 102 | * [Tom Ryder](http://blog.sanctum.geek.nz/) and his [dotfiles repository](https://github.com/tejr/dotfiles) 103 | * [Kevin Suttle](http://kevinsuttle.com/) and his [dotfiles repository](https://github.com/kevinSuttle/dotfiles) and [OSXDefaults project](https://github.com/kevinSuttle/OSXDefaults), which aims to provide better documentation for [`~/.osx`](http://mths.be/osx) 104 | * [Haralan Dobrev](http://hkdobrev.com/) 105 | 106 | * anyone who [contributed a patch](https://github.com/mathiasbynens/dotfiles/contributors) or [made a helpful suggestion](https://github.com/mathiasbynens/dotfiles/issues) 107 | -------------------------------------------------------------------------------- /bin/git-loglive: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Originially stolen from: https://git.io/vi07z 3 | 4 | while : 5 | do 6 | # Outputting like that reduces blinking 7 | status_output=$(git -c "color.status=always" status --short --branch) 8 | log_output=$(git --no-pager log --color=always --abbrev-commit --date=relative --pretty=live $@) 9 | clear 10 | echo "$status_output" 11 | echo "" 12 | echo "$log_output" 13 | sleep 2 14 | done 15 | -------------------------------------------------------------------------------- /git/.git-template/hooks/prepare-commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | exec git duet-prepare-commit-msg "$@" 3 | -------------------------------------------------------------------------------- /git/.gitattributes: -------------------------------------------------------------------------------- 1 | # Automatically normalize line endings for all text-based files 2 | #* text=auto 3 | # Disabled because of https://github.com/mathiasbynens/dotfiles/issues/149 :( 4 | 5 | # Assign language-aware hunk-headers 6 | *.php diff=php 7 | *.html.twig diff=html 8 | *.html diff=html 9 | *.ruby diff=ruby 10 | *.rake diff=ruby 11 | *.js diff="javascript" 12 | 13 | # Configure conflicts in Composer files to be resolved via the composer_json merge driver 14 | # It is configured in ~/.gitconfig 15 | composer.json merge=composer_json 16 | composer.lock merge=composer_json 17 | -------------------------------------------------------------------------------- /git/.gitignore_global: -------------------------------------------------------------------------------- 1 | # Folder view configuration files # 2 | ################################### 3 | .DS_Store 4 | Desktop.ini 5 | 6 | # Thumbnail cache files # 7 | ######################### 8 | ._* 9 | ehthumbs.db 10 | Thumbs.db 11 | 12 | # Files that might appear on external disks # 13 | ############################################# 14 | .Spotlight-V100 15 | .Trashes 16 | 17 | # Compiled source # 18 | ################### 19 | # *.com 20 | *.class 21 | *.dll 22 | *.exe 23 | *.o 24 | *.phar 25 | *.pyc 26 | *.so 27 | 28 | # Packages and archives # 29 | ######################### 30 | # it's better to unpack these files and commit the raw source 31 | # git has its own built in compression methods 32 | *.7z 33 | *.dmg 34 | *.gz 35 | *.iso 36 | *.jar 37 | *.rar 38 | *.tar 39 | *.zip 40 | 41 | # Logs and databases # 42 | ###################### 43 | *.log 44 | *.sql 45 | *.sqlite 46 | 47 | # Fonts # 48 | ######### 49 | *.ttf 50 | *.otf 51 | *.woff 52 | 53 | # Documents # 54 | ############# 55 | *.pdf 56 | *.doc 57 | *.docx 58 | *.ppt 59 | *.pptx 60 | *.xlc 61 | *.xlsx 62 | *.csv 63 | 64 | # Secrets # 65 | ########### 66 | *.asc 67 | id_rsa 68 | *.sig 69 | *.gpg 70 | *.tfstate 71 | 72 | # IDE-specific # 73 | ################ 74 | *.sublime-workspace 75 | *.code-workspace 76 | .vscode 77 | 78 | # Temporary files - both manually and automatically created 79 | *.tmp 80 | -------------------------------------------------------------------------------- /git/.gitmessage: -------------------------------------------------------------------------------- 1 | 2 | 3 | #----------------------------------------------50^ 4 | 5 | 6 | # TICKET-123 7 | # Closes #123 8 | 9 | # An awesome description of WHY you did this work, not HOW/WHAT it does. 10 | # The diff attached to commit should describe implementation (HOW) 11 | # well-enough. 12 | 13 | #--------------------------------------------------------------------72^ 14 | # 15 | # 1. Summary should be imperative (not past tense), 50 characters or 16 | # less, and not end with a period. 17 | # 18 | # 2. Description of commit should explain WHY a change was made and 19 | # lines should be wrapped to 72 characters. 20 | # 21 | # 3. Optionally, reference a ticket number. If needed, uncomment and 22 | # go to town. 23 | # 24 | # For more tips: 25 | # http://chris.beams.io/posts/git-commit 26 | # https://github.com/erlang/otp/wiki/writing-good-commit-messages#do 27 | # 28 | -------------------------------------------------------------------------------- /init/Solarized Dark xterm-256color.terminal: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BackgroundColor 6 | 7 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 8 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECgw 9 | LjAxNTkyNDQwNTMxIDAuMTI2NTIwOTE2OCAwLjE1OTY5NjAxMjcAEAGAAtIQERITWiRj 10 | bGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVjdF8QD05TS2V5ZWRBcmNo 11 | aXZlctEXGFRyb290gAEIERojLTI3O0FITltijY+RlqGqsrW+0NPYAAAAAAAAAQEAAAAA 12 | AAAAGQAAAAAAAAAAAAAAAAAAANo= 13 | 14 | BlinkText 15 | 16 | CursorColor 17 | 18 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 19 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw 20 | LjQ0MDU4MDI0ODggMC41MDk2MjkzMDkyIDAuNTE2ODU3OTgxNwAQAYAC0hAREhNaJGNs 21 | YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp 22 | dmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAA 23 | AAAZAAAAAAAAAAAAAAAAAAAA2Q== 24 | 25 | Font 26 | 27 | YnBsaXN0MDDUAQIDBAUGGBlYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 28 | AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QVk5TU2l6ZVhOU2ZGbGFnc1ZOU05hbWVWJGNs 29 | YXNzI0AqAAAAAAAAEBCAAoADXU1lbmxvLVJlZ3VsYXLSExQVFlokY2xhc3NuYW1lWCRj 30 | bGFzc2VzVk5TRm9udKIVF1hOU09iamVjdF8QD05TS2V5ZWRBcmNoaXZlctEaG1Ryb290 31 | gAEIERojLTI3PEJLUltiaXJ0dniGi5afpqmyxMfMAAAAAAAAAQEAAAAAAAAAHAAAAAAA 32 | AAAAAAAAAAAAAM4= 33 | 34 | FontAntialias 35 | 36 | FontHeightSpacing 37 | 1.1000000000000001 38 | FontWidthSpacing 39 | 1 40 | ProfileCurrentVersion 41 | 2.02 42 | SelectionColor 43 | 44 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 45 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECgw 46 | LjAzOTM4MDczNjY1IDAuMTYwMTE2NDYzOSAwLjE5ODMzMjc1NjgAEAGAAtIQERITWiRj 47 | bGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVjdF8QD05TS2V5ZWRBcmNo 48 | aXZlctEXGFRyb290gAEIERojLTI3O0FITltijY+RlqGqsrW+0NPYAAAAAAAAAQEAAAAA 49 | AAAAGQAAAAAAAAAAAAAAAAAAANo= 50 | 51 | ShowWindowSettingsNameInTitle 52 | 53 | TerminalType 54 | xterm-256color 55 | TextBoldColor 56 | 57 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 58 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECYw 59 | LjUwNTk5MTkzNTcgMC41NjQ4NTgzNzcgMC41NjM2MzY1NDE0ABABgALSEBESE1okY2xh 60 | c3NuYW1lWCRjbGFzc2VzV05TQ29sb3KiEhRYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2 61 | ZXLRFxhUcm9vdIABCBEaIy0yNztBSE5bYouNj5SfqLCzvM7R1gAAAAAAAAEBAAAAAAAA 62 | ABkAAAAAAAAAAAAAAAAAAADY 63 | 64 | TextColor 65 | 66 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 67 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw 68 | LjQ0MDU4MDI0ODggMC41MDk2MjkzMDkyIDAuNTE2ODU3OTgxNwAQAYAC0hAREhNaJGNs 69 | YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp 70 | dmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAA 71 | AAAZAAAAAAAAAAAAAAAAAAAA2Q== 72 | 73 | UseBrightBold 74 | 75 | blackColour 76 | 77 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 78 | ZmZmg7JNIT2DkvUjPoO+F0s+AYY= 79 | 80 | blueColour 81 | 82 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 83 | ZmZmgyqcAj6DtOHsPoO+RUg/AYY= 84 | 85 | brightBlackColour 86 | 87 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 88 | ZmZmg+ZzgjyDs44BPoNahyM+AYY= 89 | 90 | brightBlueColour 91 | 92 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 93 | ZmZmg7yT4T6DEXcCP4POUAQ/AYY= 94 | 95 | brightCyanColour 96 | 97 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 98 | ZmZmg7CIAT+Dj5oQP4N8ShA/AYY= 99 | 100 | brightGreenColour 101 | 102 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 103 | ZmZmgzyujT6DFZy2PoOYFsQ+AYY= 104 | 105 | brightMagentaColour 106 | 107 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 108 | ZmZmgxMjsj6D+uazPoNkyTc/AYY= 109 | 110 | brightRedColour 111 | 112 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 113 | ZmZmgyfkPT+D/15aPoMgl5Y9AYY= 114 | 115 | brightWhiteColour 116 | 117 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 118 | ZmZmg49LfT+D0Dt1P4MGM10/AYY= 119 | 120 | brightYellowColour 121 | 122 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 123 | ZmZmg1MTpj6DeHnQPoPQg+A+AYY= 124 | 125 | cyanColour 126 | 127 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 128 | ZmZmg4VRFj6DfyESP4PkZwY/AYY= 129 | 130 | greenColour 131 | 132 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 133 | ZmZmg9lI5j6DIYkKP4PVjKU8AYY= 134 | 135 | magentaColour 136 | 137 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 138 | ZmZmg/4CRz+DBTzdPYMgzt4+AYY= 139 | 140 | name 141 | Solarized Dark xterm-256color 142 | redColour 143 | 144 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 145 | ZmZmg6i7UT+DUATePYMl2hA+AYY= 146 | 147 | type 148 | Window Settings 149 | whiteColour 150 | 151 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 152 | ZmZmgzqGaj+D2tdjP4NYPUw/AYY= 153 | 154 | yellowColour 155 | 156 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 157 | ZmZmg0DAJT+DB17vPoM4Y8A8AYY= 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /init/Solarized Dark.itermcolors: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ansi 0 Color 7 | 8 | Blue Component 9 | 0.19370138645172119 10 | Green Component 11 | 0.15575926005840302 12 | Red Component 13 | 0.0 14 | 15 | Ansi 1 Color 16 | 17 | Blue Component 18 | 0.14145714044570923 19 | Green Component 20 | 0.10840655118227005 21 | Red Component 22 | 0.81926977634429932 23 | 24 | Ansi 10 Color 25 | 26 | Blue Component 27 | 0.38298487663269043 28 | Green Component 29 | 0.35665956139564514 30 | Red Component 31 | 0.27671992778778076 32 | 33 | Ansi 11 Color 34 | 35 | Blue Component 36 | 0.43850564956665039 37 | Green Component 38 | 0.40717673301696777 39 | Red Component 40 | 0.32436618208885193 41 | 42 | Ansi 12 Color 43 | 44 | Blue Component 45 | 0.51685798168182373 46 | Green Component 47 | 0.50962930917739868 48 | Red Component 49 | 0.44058024883270264 50 | 51 | Ansi 13 Color 52 | 53 | Blue Component 54 | 0.72908437252044678 55 | Green Component 56 | 0.33896297216415405 57 | Red Component 58 | 0.34798634052276611 59 | 60 | Ansi 14 Color 61 | 62 | Blue Component 63 | 0.56363654136657715 64 | Green Component 65 | 0.56485837697982788 66 | Red Component 67 | 0.50599193572998047 68 | 69 | Ansi 15 Color 70 | 71 | Blue Component 72 | 0.86405980587005615 73 | Green Component 74 | 0.95794391632080078 75 | Red Component 76 | 0.98943418264389038 77 | 78 | Ansi 2 Color 79 | 80 | Blue Component 81 | 0.020208755508065224 82 | Green Component 83 | 0.54115492105484009 84 | Red Component 85 | 0.44977453351020813 86 | 87 | Ansi 3 Color 88 | 89 | Blue Component 90 | 0.023484811186790466 91 | Green Component 92 | 0.46751424670219421 93 | Red Component 94 | 0.64746475219726562 95 | 96 | Ansi 4 Color 97 | 98 | Blue Component 99 | 0.78231418132781982 100 | Green Component 101 | 0.46265947818756104 102 | Red Component 103 | 0.12754884362220764 104 | 105 | Ansi 5 Color 106 | 107 | Blue Component 108 | 0.43516635894775391 109 | Green Component 110 | 0.10802463442087173 111 | Red Component 112 | 0.77738940715789795 113 | 114 | Ansi 6 Color 115 | 116 | Blue Component 117 | 0.52502274513244629 118 | Green Component 119 | 0.57082360982894897 120 | Red Component 121 | 0.14679534733295441 122 | 123 | Ansi 7 Color 124 | 125 | Blue Component 126 | 0.79781103134155273 127 | Green Component 128 | 0.89001238346099854 129 | Red Component 130 | 0.91611063480377197 131 | 132 | Ansi 8 Color 133 | 134 | Blue Component 135 | 0.15170273184776306 136 | Green Component 137 | 0.11783610284328461 138 | Red Component 139 | 0.0 140 | 141 | Ansi 9 Color 142 | 143 | Blue Component 144 | 0.073530435562133789 145 | Green Component 146 | 0.21325300633907318 147 | Red Component 148 | 0.74176257848739624 149 | 150 | Background Color 151 | 152 | Blue Component 153 | 0.15170273184776306 154 | Green Component 155 | 0.11783610284328461 156 | Red Component 157 | 0.0 158 | 159 | Bold Color 160 | 161 | Blue Component 162 | 0.56363654136657715 163 | Green Component 164 | 0.56485837697982788 165 | Red Component 166 | 0.50599193572998047 167 | 168 | Cursor Color 169 | 170 | Blue Component 171 | 0.51685798168182373 172 | Green Component 173 | 0.50962930917739868 174 | Red Component 175 | 0.44058024883270264 176 | 177 | Cursor Text Color 178 | 179 | Blue Component 180 | 0.19370138645172119 181 | Green Component 182 | 0.15575926005840302 183 | Red Component 184 | 0.0 185 | 186 | Foreground Color 187 | 188 | Blue Component 189 | 0.51685798168182373 190 | Green Component 191 | 0.50962930917739868 192 | Red Component 193 | 0.44058024883270264 194 | 195 | Selected Text Color 196 | 197 | Blue Component 198 | 0.56363654136657715 199 | Green Component 200 | 0.56485837697982788 201 | Red Component 202 | 0.50599193572998047 203 | 204 | Selection Color 205 | 206 | Blue Component 207 | 0.19370138645172119 208 | Green Component 209 | 0.15575926005840302 210 | Red Component 211 | 0.0 212 | 213 | 214 | 215 | -------------------------------------------------------------------------------- /init/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # ======== XCode ========== 6 | 7 | # Install Command Line Tools 8 | xcode-select --install 9 | 10 | # Agree to the XCode license 11 | sudo xcodebuild -license 12 | 13 | # ========= Brew ========== 14 | 15 | # Install brew 16 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 17 | 18 | # Install brew bundle 19 | brew tap Homebrew/bundle 20 | 21 | # Install Brew formulae and apps via Cask 22 | brew bundle --file=Brewfile 23 | 24 | # Enable latest Bash installed from brew 25 | # Add the Bash shell to the list of legit shells 26 | sudo bash -c "echo /opt/homebrew/bin/bash >> /private/etc/shells" 27 | 28 | # Change the shell for the user 29 | chsh -s /opt/homebrew/bin/bash 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "license": "MIT", 3 | "devDependencies": { 4 | }, 5 | "dependencies": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hkdobrev/dotfiles/46b319b637336ace38d339e0837cddab7ce00f93/projects/.gitkeep --------------------------------------------------------------------------------