├── .gitignore ├── windows ├── install-python.sh ├── install-golang.sh ├── setup-anaconda.bat ├── .bashrc ├── install-node.sh ├── link-gitconfig.sh ├── add-debian-repo.sh ├── install-oh-my-zsh.sh ├── install-choco-dependencies.bat ├── install-code.sh ├── .zshrc ├── magic-keyboard.ahk └── .hyper.js ├── backup-pictures.sh ├── backup.sh ├── git ├── gitignore └── gitconfig ├── set-defaults.sh ├── setup.sh ├── README.md ├── .zshrc └── iterm └── profiles.json /.gitignore: -------------------------------------------------------------------------------- 1 | .zsh_history 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /windows/install-python.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo apt-get update 4 | sudo apt-get install python3.7 -y -------------------------------------------------------------------------------- /windows/install-golang.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo add-apt-repository ppa:gophers/archive 4 | sudo apt-get update 5 | sudo apt-get install golang-1.11-go -y -------------------------------------------------------------------------------- /windows/setup-anaconda.bat: -------------------------------------------------------------------------------- 1 | conda create -n tensorflow-gpu-keras python=3.6 -y 2 | activate tensorflow-gpu-keras 3 | conda install tensorflow-gpu -y 4 | conda install keras -y -------------------------------------------------------------------------------- /windows/.bashrc: -------------------------------------------------------------------------------- 1 | bash -c zsh 2 | # ~/.bashrc: executed by bash(1) for non-login shells. 3 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 4 | # for examples 5 | # If not running interactively, don't do anything 6 | case $- in -------------------------------------------------------------------------------- /backup-pictures.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Backing up 2019 to /Volumes/photo" 4 | rsync --archive --verbose --human-readable ~/Pictures/2019 /Volumes/photo 5 | 6 | echo "Backing up Lightroom to /Volumes/photo" 7 | rsync --archive --verbose --human-readable ~/Pictures/Lightroom /Volumes/photo -------------------------------------------------------------------------------- /windows/install-node.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | apt-get update 4 | 5 | export PROFILE=~/.zshrc 6 | curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash 7 | 8 | source ~/.zshrc 9 | 10 | nvm install 8 11 | nvm install 10 12 | nvm install 11 13 | nvm alias default 11 -------------------------------------------------------------------------------- /windows/link-gitconfig.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | 5 | echo $CURRENT_DIR 6 | 7 | rm ~/.gitconfig 8 | ln -s $CURRENT_DIR/../git/gitconfig ~/.gitconfig 9 | 10 | rm ~/.gitignore 11 | ln -s $CURRENT_DIR/../git/gitignore ~/.gitignore -------------------------------------------------------------------------------- /windows/add-debian-repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl https://ftp-master.debian.org/keys/archive-key-8.asc | gpg --dearmor > /tmp/debian-archive-key-8.gpg 4 | sudo install -o root -g root -m 644 /tmp/debian-archive-key-8.gpg /etc/apt/trusted.gpg.d/ 5 | sudo sh -c 'echo "deb http://ftp.be.debian.org/debian/ buster main contrib non-free" > /etc/apt/sources.list.d/sources.list' 6 | rm /tmp/debian-archive-key-8.gpg -------------------------------------------------------------------------------- /backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ -z "${BACKUP_ROOT}" ]]; then 4 | echo "BACKUP_ROOT must be set" 5 | exit 1 6 | fi 7 | 8 | DATE=$(date +%Y%m%d%H%M%S) 9 | DRIVE_BACKUP=$BACKUP_ROOT/$DATE 10 | 11 | echo "Backing up to $DRIVE_BACKUP" 12 | mkdir -p "$DRIVE_BACKUP" 13 | 14 | echo "Copy ~/.ssh" 15 | cp -r ~/.ssh "$DRIVE_BACKUP" 16 | 17 | echo "Copy ~/.zsh_history" 18 | cp ~/.zsh_history "$DRIVE_BACKUP" -------------------------------------------------------------------------------- /windows/install-oh-my-zsh.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo apt-get install zsh 4 | 5 | # Configure ZSH 6 | CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 7 | rm ~/.bashrc 8 | ln -s $CURRENT_DIR/.bashrc ~/.bashrc 9 | ln -s $CURRENT_DIR/.zshrc ~/.zshrc 10 | 11 | # Install Oh My ZSH 12 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" -------------------------------------------------------------------------------- /windows/install-choco-dependencies.bat: -------------------------------------------------------------------------------- 1 | choco install microsoft-teams -y 2 | choco install whatsapp -y 3 | choco install slack -y 4 | choco install openhardwaremonitor -y 5 | choco install hwmonitor -y 6 | choco install vlc -y 7 | choco install f.lux -y 8 | choco install cpu-z -y 9 | choco install hyper -y 10 | choco install conemu -y 11 | choco install mobaxterm -y 12 | choco install vscode -y 13 | choco install steam -y 14 | choco install virtualbox -y 15 | choco install git -y 16 | choco install geforce-experience -y 17 | choco install autohotkey -y 18 | choco install discord -y 19 | choco install anaconda3 --params '"/AddToPath"' -y -------------------------------------------------------------------------------- /windows/install-code.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg 4 | sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/ 5 | sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' 6 | 7 | sudo apt-get install apt-transport-https 8 | sudo apt-get update 9 | sudo apt-get install code # or code-insiders 10 | 11 | sudo apt-get install libgtk2.0-0 libxss1 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget -------------------------------------------------------------------------------- /git/gitignore: -------------------------------------------------------------------------------- 1 | # OSX taken from: https://github.com/github/gitignore/blob/master/Global/OSX.gitignore 2 | # ---------------------------------------------------------------------------------------------- 3 | .DS_Store 4 | # Thumbnails 5 | ._* 6 | # Files that might appear on external disk 7 | .Spotlight-V100 8 | .Trashes 9 | 10 | # Windows taken from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore 11 | # ---------------------------------------------------------------------------------------------- 12 | # Windows image file caches 13 | Thumbs.db 14 | 15 | # Folder config file 16 | Desktop.ini 17 | 18 | # Tags taken from: https://github.com/github/gitignore/blob/master/Global/Tags.gitignore 19 | # ---------------------------------------------------------------------------------------------- 20 | # Ignore tags created by etags, ctags, gtags (GNU global) and cscope 21 | TAGS 22 | !TAGS/ 23 | tags 24 | !tags/ 25 | gtags.files 26 | GTAGS 27 | GRTAGS 28 | GPATH 29 | cscope.files 30 | cscope.out 31 | cscope.in.out 32 | cscope.po.out 33 | 34 | # Vim taken from: https://github.com/github/gitignore/blob/master/Global/vim.gitignore 35 | # ---------------------------------------------------------------------------------------------- 36 | [._]*.s[a-w][a-z] 37 | [._]s[a-w][a-z] 38 | *.un~ 39 | Session.vim 40 | .netrwhist 41 | *~ 42 | 43 | # SASS 44 | # ---------------------------------------------------------------------------------------------- 45 | .sass-cache 46 | -------------------------------------------------------------------------------- /windows/.zshrc: -------------------------------------------------------------------------------- 1 | # Path to your oh-my-zsh installation. 2 | export ZSH="/home/carlosbaraza/.oh-my-zsh" 3 | ZSH_THEME="robbyrussell" 4 | plugins=(git) 5 | 6 | source $ZSH/oh-my-zsh.sh 7 | 8 | # User configuration 9 | # Configure X Server display 10 | export DISPLAY=:0 11 | 12 | export EDITOR='vim' 13 | 14 | # You may need to manually set your language environment 15 | export LANG=en_US.UTF-8 16 | 17 | # ssh 18 | export SSH_KEY_PATH="~/.ssh/rsa_id" 19 | 20 | # NVM 21 | export NVM_DIR="$HOME/.nvm" 22 | # Original NVM initialization 23 | # [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm 24 | # [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion 25 | 26 | # Extracted from https://www.growingwiththeweb.com/2018/01/slow-nvm-init.html 27 | # Defer initialization of nvm until nvm, node or a node-dependent command is 28 | # run. Ensure this block is only run once if .bashrc gets sourced multiple times 29 | # by checking whether __init_nvm is a function. 30 | if [ -s "$HOME/.nvm/nvm.sh" ] && [ ! "$(whence __init_nvm)" = "__init_nvm" ]; then 31 | [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" 32 | declare -a __node_commands=('nvm' 'node' 'npm' 'yarn' 'gulp' 'grunt' 'webpack') 33 | function __init_nvm() { 34 | for i in "${__node_commands[@]}"; do unalias $i; done 35 | . "$NVM_DIR"/nvm.sh 36 | unset __node_commands 37 | unset -f __init_nvm 38 | } 39 | for i in "${__node_commands[@]}"; do alias $i='__init_nvm && '$i; done 40 | fi 41 | 42 | # Go configuration 43 | export PATH=$PATH:"/usr/lib/go-1.11/bin" # Go binary path 44 | export GO111MODULE=on # Enable modules 45 | export GOPATH=$HOME/go 46 | export PATH=$PATH:$GOPATH/bin -------------------------------------------------------------------------------- /set-defaults.sh: -------------------------------------------------------------------------------- 1 | # Sets reasonable OS X defaults. 2 | 3 | # Show hidden files. 4 | defaults write com.apple.Finder AppleShowAllFiles YES 5 | 6 | # Disable press-and-hold for keys in favor of key repeat. 7 | defaults write -g ApplePressAndHoldEnabled -bool false 8 | 9 | # Use AirDrop over every interface. srsly this should be a default. 10 | defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1 11 | 12 | # Always open everything in Finder's list view. This is important. 13 | defaults write com.apple.Finder FXPreferredViewStyle Nlsv 14 | sudo find / -name '.DS_Store' -exec rm {} \; 15 | 16 | # Show the ~/Library folder. 17 | chflags nohidden ~/Library 18 | 19 | # Set a really fast key repeat. 20 | defaults write -g InitialKeyRepeat -int 15 21 | defaults write -g KeyRepeat -int 2 22 | defaults write NSGlobalDomain KeyRepeat -int 2 23 | 24 | # Set the Finder prefs for showing a few different volumes on the Desktop. 25 | defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true 26 | defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true 27 | 28 | # Run the screensaver if we're in the bottom-left hot corner. 29 | defaults write com.apple.dock wvous-bl-corner -int 5 30 | defaults write com.apple.dock wvous-bl-modifier -int 0 31 | 32 | # Hide Safari's bookmark bar. 33 | defaults write com.apple.Safari ShowFavoritesBar -bool false 34 | 35 | # Set up Safari for development. 36 | defaults write com.apple.Safari IncludeInternalDebugMenu -bool true 37 | defaults write com.apple.Safari IncludeDevelopMenu -bool true 38 | defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true 39 | defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true 40 | defaults write NSGlobalDomain WebKitDeveloperExtras -bool true 41 | 42 | # Speed up Dock animations 43 | defaults write com.apple.dock expose-animation-duration -float 0.1 44 | 45 | # Disable control+up mission control 46 | defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 32 'enabled' 47 | # Disable control+down app expose 48 | defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 35 'enabled' 49 | 50 | # Disable navigation with two fingers in Chrome 51 | defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE 52 | -------------------------------------------------------------------------------- /windows/magic-keyboard.ahk: -------------------------------------------------------------------------------- 1 | ;----------------------------------------- 2 | ; Mac keyboard to Windows Key Mappings 3 | ;========================================= 4 | 5 | ; -------------------------------------------------------------- 6 | ; NOTES 7 | ; -------------------------------------------------------------- 8 | ; ! = ALT 9 | ; ^ = CTRL 10 | ; + = SHIFT 11 | ; # = WIN 12 | ; 13 | ; Debug action snippet: MsgBox You pressed Control-A while Notepad is active. 14 | 15 | #InstallKeybdHook 16 | SetTitleMatchMode 2 17 | SendMode Input 18 | 19 | ; -------------------------------------------------------------- 20 | ; media/function keys all mapped to the right option key 21 | ; -------------------------------------------------------------- 22 | 23 | RAlt & F7::SendInput {Media_Prev} 24 | RAlt & F8::SendInput {Media_Play_Pause} 25 | RAlt & F9::SendInput {Media_Next} 26 | F10::SendInput {Volume_Mute} 27 | F11::SendInput {Volume_Down} 28 | F12::SendInput {Volume_Up} 29 | 30 | ; F13-15, standard windows mapping 31 | F13::SendInput {PrintScreen} 32 | F14::SendInput {ScrollLock} 33 | F15::SendInput {Pause} 34 | 35 | ; ------------------------------- 36 | ; Cursor Movement 37 | ; 38 | ; cmd + arrows - start & end of lines, with shift for selecting text 39 | ; ------------------------------- 40 | #Left::SendInput {Home} 41 | #Right::SendInput {End} 42 | +#Left::SendInput +{Home} 43 | +#Right::SendInput +{End} 44 | !Left::SendInput ^{Left} 45 | !Right::SendInput ^{Right} 46 | !+Left::SendInput ^+{Left} 47 | !+Right::SendInput ^+{Right} 48 | 49 | ; -------------------------------------------------------------- 50 | ; OS X system shortcuts 51 | ; -------------------------------------------------------------- 52 | 53 | 54 | #s::SendInput ^{s} 55 | #a::SendInput ^{a} 56 | #c::SendInput ^{c} 57 | ; #v::SendInput ^{v} 58 | #x::SendInput ^{x} 59 | #o::SendInput ^{o} 60 | #f::SendInput ^{f} 61 | #z::SendInput ^{z} 62 | #y::SendInput ^{y} 63 | #t::SendInput ^{t} 64 | #w::SendInput ^{w} 65 | 66 | ; Close windows (cmd + q to Alt + F4) 67 | #q::Send !{F4} 68 | 69 | ; Remap Windows + Tab to Alt + Tab. 70 | Lwin & Tab::AltTab 71 | 72 | ; minimize windows 73 | #m::WinMinimize,a 74 | 75 | 76 | ; ; -------------------------------------------------------------- 77 | ; ; Miscelaneous 78 | ; ; -------------------------------------------------------------- 79 | ; Snap windows 80 | ^!#Left::SendInput #{Left} 81 | ^!#Right::SendInput #{Right} 82 | 83 | ^!Left::SendInput ^{PgUp} 84 | ^!Right::SendInput ^{PgDn} 85 | 86 | ; ; -------------------------------------------------------------- 87 | ; ; OS X keyboard mappings for special chars 88 | ; ; -------------------------------------------------------------- 89 | 90 | ; ; Map Alt + L to @ 91 | ; !l::SendInput {@} 92 | 93 | ; ; Map Alt + N to \ 94 | ; +!7::SendInput {\} 95 | 96 | ; ; Map Alt + N to © 97 | ; !g::SendInput {©} 98 | 99 | ; ; Map Alt + o to ø 100 | ; !o::SendInput {ø} 101 | 102 | ; ; Map Alt + 5 to [ 103 | ; !5::SendInput {[} 104 | 105 | ; ; Map Alt + 6 to ] 106 | ; !6::SendInput {]} 107 | 108 | ; ; Map Alt + E to € 109 | ; !e::SendInput {€} 110 | 111 | ; ; Map Alt + - to – 112 | ; !-::SendInput {–} 113 | 114 | ; ; Map Alt + 8 to { 115 | ; !8::SendInput {{} 116 | 117 | ; ; Map Alt + 9 to } 118 | ; !9::SendInput {}} 119 | 120 | ; ; Map Alt + - to ± 121 | ; !+::SendInput {±} 122 | 123 | ; ; Map Alt + R to ® 124 | ; !r::SendInput {®} 125 | 126 | ; ; Map Alt + N to | 127 | ; !7::SendInput {|} 128 | 129 | ; ; Map Alt + W to ∑ 130 | ; !w::SendInput {∑} 131 | 132 | ; ; Map Alt + N to ~ 133 | ; !n::SendInput {~} 134 | 135 | ; ; Map Alt + 3 to # 136 | ; !3::SendInput {#} 137 | 138 | 139 | 140 | ; -------------------------------------------------------------- 141 | ; Custom mappings for special chars 142 | ; -------------------------------------------------------------- 143 | 144 | ;#ö::SendInput {[} 145 | ;#ä::SendInput {]} 146 | 147 | ;^ö::SendInput {{} 148 | ;^ä::SendInput {}} 149 | 150 | 151 | ; -------------------------------------------------------------- 152 | ; Application specific 153 | ; -------------------------------------------------------------- 154 | 155 | ; Google Chrome 156 | #IfWinActive, ahk_class Chrome_WidgetWin_1 157 | 158 | ; Show Web Developer Tools with cmd + alt + i 159 | #!i::Send {F12} 160 | 161 | ; Show source code with cmd + alt + u 162 | #!u::Send ^u 163 | 164 | #IfWinActive -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | if [[ "${TRACE-0}" == "1" ]]; then 7 | set -o xtrace 8 | fi 9 | 10 | if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then 11 | echo 'Usage: ./script.sh arg-one arg-two 12 | 13 | This is an awesome bash script to make your life better. 14 | 15 | ' 16 | exit 17 | fi 18 | 19 | cd "$(dirname "$0")" 20 | 21 | main() { 22 | # ZSH 23 | ############################################################################### 24 | # Install oh-my-zsh 25 | #sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 26 | 27 | # Install theme for shell 28 | mkdir -p ~/.oh-my-zsh/custom/themes/ 29 | curl -L -o ~/.oh-my-zsh/custom/themes/bullet-train.zsh-theme http://raw.github.com/caiogondim/bullet-train-oh-my-zsh-theme/master/bullet-train.zsh-theme 30 | rm -f ~/.zshrc; ln -s ~/dotfiles/.zshrc ~/.zshrc 31 | 32 | # Add history if you want to keep the command history 33 | # mkdir -p ~/sync 34 | # touch ~/.zsh_history 35 | # if [ ! -f ~/sync/.zsh_history ]; then # if file not exists 36 | # cp ~/.zsh_history ~/sync/.zsh_history 37 | # fi 38 | # rm -f ~/.zsh_history 39 | # ln -s ~/sync/.zsh_history ~/.zsh_history 40 | 41 | # Install powerline compatible fonts 42 | git clone https://github.com/powerline/fonts ~/powerline-fonts 43 | ~/powerline-fonts/install.sh 44 | rm -rf ~/powerline-fonts 45 | 46 | 47 | # GIT 48 | ################################################################################ 49 | rm -f ~/.gitconfig; ln -s ~/dotfiles/git/gitconfig ~/.gitconfig 50 | rm -f ~/.gitignore; ln -s ~/dotfiles/git/gitignore ~/.gitignore 51 | 52 | 53 | # Homebrew 54 | ################################################################################ 55 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 56 | 57 | brew install node 58 | brew install nvm 59 | brew install terraform 60 | brew install watchman 61 | 62 | # Python 63 | brew install pyenv 64 | 65 | # Install GO 66 | brew install go 67 | brew install svn 68 | 69 | # Install iterm2 70 | brew install tmux 71 | brew install --cask iterm2 72 | brew install --cask warp 73 | 74 | brew install --cask visual-studio-code 75 | brew install --cask google-chrome 76 | brew install --cask chromium --no-quarantine 77 | brew install --cask firefox 78 | brew install --cask slack 79 | brew install --cask istat-menus 80 | brew install --cask spotify 81 | brew install --cask cakebrew 82 | brew install --cask alfred 83 | brew install --cask rectangle 84 | brew install --cask the-unarchiver 85 | brew install --cask vlc 86 | brew install --cask diffmerge 87 | brew install --cask whatsapp 88 | brew install --cask docker 89 | brew install --cask geekbench 90 | brew install --cask google-cloud-sdk 91 | brew install --cask google-drive 92 | 93 | # https://jvns.ca/blog/2022/04/12/a-list-of-new-ish--command-line-tools/ 94 | brew install dust 95 | brew install fd 96 | brew install duf 97 | brew install exa 98 | brew install ripgrep 99 | brew install bat 100 | brew install git-delta 101 | brew install dog 102 | brew install glances 103 | brew install sd 104 | brew install pdfgrep 105 | brew install broot 106 | brew install choose-rust 107 | brew install ctop 108 | brew install rga 109 | brew install fzf 110 | brew install ldns # DNS (drill) 111 | 112 | brew install wget 113 | brew install cmake 114 | 115 | # Install macvim 116 | brew install macvim 117 | ln -s /usr/local/opt/macvim/MacVim.app/Contents/MacOS/Vim /usr/local/bin/vim 118 | ln -s /usr/local/opt/macvim/MacVim.app/Contents/MacOS/Vim /usr/local/bin/vi 119 | brew install neovim 120 | 121 | # Install vimrc (Cool vim configuration) 122 | # https://github.com/amix/vimrc 123 | git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime 124 | sh ~/.vim_runtime/install_awesome_vimrc.sh 125 | 126 | # Install ag search command 127 | brew install the_silver_searcher 128 | 129 | # Rust 130 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 131 | } 132 | 133 | main "$@" 134 | 135 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Windows 2 | 3 | ## Install chocolatey: 4 | 5 | 1. Open `cmd.exe` as Administrator: 6 | 2. Run: 7 | ``` 8 | @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" 9 | ``` 10 | 11 | ## Install choco dependencies 12 | Open PowerShell as Administrator and run: 13 | 14 | ``` 15 | .\windows\install-choco-dependencies.bat 16 | ``` 17 | 18 | ## Install WSL 19 | Open PowerShell as Administrator and run: 20 | 21 | ``` 22 | Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux 23 | ``` 24 | 25 | Now open Microsoft Store and install Ubuntu 18.04 26 | 27 | ## Configure Hyper 28 | Copy `.hyper.js` to `c:\Users\carlo\.hyper.js` and overwrite. 29 | 30 | ## Git and GitHub 31 | We need to configure git twice, once for Windows apps like VS Code 32 | and another time for the WSL: 33 | 1. Open `Git GUI` and generate an SSH key 34 | 2. Add to permitted GitHub SSH keys in GitHub settings 35 | 3. Open `Git Bash` windows app 36 | 4. Configure git: 37 | ``` 38 | git config --global user.email "email@example.com" 39 | git config --global user.name "Carlos Baraza" 40 | ``` 41 | 5. Finally add github.com to `known_hosts`: 42 | ``` 43 | ssh-keyscan -H github.com >> ~/.ssh/known_hosts 44 | ``` 45 | 46 | Now we configure Git for WSL: 47 | 1. Open Hyper, which should open `bash.exe` terminal 48 | 2. Generate another key `ssh-keygen` 49 | 3. Copy `~/.ssh/id_rsa.pub` 50 | 4. Add to permitted GitHub SSH keys in GitHub settings 51 | 5. Configure git: 52 | ```bash 53 | # Add my custom GitHub configuration 54 | ./windows/link-gitconfig.sh 55 | ``` 56 | 6. Finally add github.com to `known_hosts`: 57 | ``` 58 | ssh-keyscan -H github.com >> ~/.ssh/known_hosts 59 | ``` 60 | 61 | Done, now we can use Git with GitHub 62 | 63 | ## Oh my ZSH 64 | Using Hyper (with Bash): 65 | 66 | ``` 67 | ./windows/install-oh-my-zsh.sh 68 | ``` 69 | 70 | This will set up Oh My ZSH, which in my opinion is better than just pure Bash. 71 | 72 | ## Configure VS Code 73 | 74 | Change the shell to WSL in `settings.json` (`ctrl+,` to open): 75 | ``` 76 | { 77 | "terminal.integrated.shell.windows": "C:\\Windows\\System32\\wsl.exe", 78 | "files.eol": "\n" 79 | } 80 | ``` 81 | It's important to change the default EOL because Windows behaves differently than most UNIX systems, 82 | and GIT does not like that, creating some merge conflicts and other nasty situations. 83 | 84 | ## Install Node 85 | In Hyper (now ZSH) 86 | 87 | ``` 88 | ./windows/install-node.sh 89 | ``` 90 | 91 | ## Install Golang 92 | In Hyper (now ZSH) 93 | 94 | ``` 95 | ./windows/install-golang.sh 96 | ``` 97 | 98 | ## Install Python 99 | In Hyper (now ZSH) 100 | 101 | ``` 102 | ./windows/install-python.sh 103 | ``` 104 | 105 | ## Graphical applications on WSL with XServer (MobaXterm) 106 | Follow the MobaXterm section of [this article](https://nickjanetakis.com/blog/using-wsl-and-mobaxterm-to-create-a-linux-dev-environment-on-windows) 107 | 108 | ## Apple Magic Keyboard mappings 109 | I use a Magic Keyboard to work and it was slowing me down a lot not to have the right mappings, 110 | at least while I get used to the Windows shortcuts. Therefore I added a script to accelerate 111 | the development while adapting. 112 | 113 | To use just open the `magic-keyboard.ahk` file and it will open with AutoHotkey, which was 114 | installed with Choco. To stop it, just close the program. 115 | 116 | ## Setting up Deep Learning environment 117 | We installed `anaconda3` with `choco` and then we need to take the following steps, 118 | taken from [this article](https://towardsdatascience.com/python-environment-setup-for-deep-learning-on-windows-10-c373786e36d1). 119 | 120 | 1. Install Geforce Experience (already done with choco) 121 | 2. Install Cuda Toolkit 9, not available in choco :(. TF 1.13.0 adds support for Cuda 10, so you should be able to upgrade soon. -> [Manual install](https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal) 122 | 3. Run Sample and confirm CUDA works C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.0\1_Utilities\deviceQuery 123 | 4. Install [cuDNN](https://developer.nvidia.com/cudnn). This library accelerates deep learning algorithms 124 | 5. Run the `./windows/setup-anaconda.bat` using `cmd.exe`. Anaconda environments don't work in PowerShell 125 | -------------------------------------------------------------------------------- /git/gitconfig: -------------------------------------------------------------------------------- 1 | # set your user tokens as environment variables, such as ~/.secrets 2 | # See the README for examples. 3 | [color] 4 | ui = true 5 | [color "branch"] 6 | current = yellow reverse 7 | local = yellow 8 | remote = green 9 | [color "diff"] 10 | meta = yellow bold 11 | frag = magenta bold 12 | old = red 13 | new = green 14 | [alias] 15 | # add 16 | a = add # add 17 | chunkyadd = add --patch # stage commits chunk by chunk 18 | 19 | # via http://blog.apiaxle.com/post/handy-git-tips-to-stop-you-getting-fired/ 20 | snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}" 21 | snapshots = !git stash list --grep snapshot 22 | 23 | #via http://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit 24 | recent-branches = !git for-each-ref --count=15 --sort=-committerdate refs/heads/ --format='%(refname:short)' 25 | 26 | # branch 27 | b = branch -v # branch (verbose) 28 | 29 | # commit 30 | c = commit -m # commit with message 31 | ca = commit -am # commit all with message 32 | ci = commit # commit 33 | amend = commit --amend # ammend your last commit 34 | ammend = commit --amend # ammend your last commit 35 | 36 | # checkout 37 | co = checkout # checkout 38 | nb = checkout -b # create and switch to a new branch (mnemonic: "git new branch branchname...") 39 | 40 | # cherry-pick 41 | cp = cherry-pick -x # grab a change from a branch 42 | 43 | # diff 44 | d = diff # diff unstaged changes 45 | dc = diff --cached # diff staged changes 46 | last = diff HEAD^ # diff last committed change 47 | 48 | # log 49 | l = log --graph --date=short 50 | changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status 51 | short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" 52 | simple = log --pretty=format:\" * %s\" 53 | shortnocolor = log --pretty=format:\"%h %cr %cn %s\" 54 | 55 | # pull 56 | pl = pull # pull 57 | 58 | # push 59 | ps = push # push 60 | 61 | # rebase 62 | rc = rebase --continue # continue rebase 63 | rs = rebase --skip # skip rebase 64 | 65 | # remote 66 | r = remote -v # show remotes (verbose) 67 | 68 | # reset 69 | unstage = reset HEAD # remove files from index (tracking) 70 | uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state 71 | filelog = log -u # show changes to a file 72 | mt = mergetool # fire up the merge tool 73 | 74 | # stash 75 | ss = stash # stash changes 76 | sl = stash list # list stashes 77 | sa = stash apply # apply stash (restore changes) 78 | sd = stash drop # drop stashes (destory changes) 79 | 80 | # status 81 | s = status # status 82 | st = status # status 83 | stat = status # status 84 | 85 | # tag 86 | t = tag -n # show tags with lines of each tag message 87 | 88 | # svn helpers 89 | svnr = svn rebase 90 | svnd = svn dcommit 91 | svnl = svn log --oneline --show-commit 92 | [format] 93 | pretty = format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(magenta) [%an]%Creset 94 | [mergetool] 95 | prompt = false 96 | [mergetool "mvimdiff"] 97 | cmd="mvim -c 'Gdiff' $MERGED" # use fugitive.vim for 3-way merge 98 | keepbackup=false 99 | [merge] 100 | summary = true 101 | verbosity = 1 102 | tool = diffmerge 103 | conflictstyle = diff3 104 | [apply] 105 | whitespace = nowarn 106 | [branch] 107 | autosetupmerge = true 108 | [push] 109 | # 'git push' will push the current branch to its tracking branch 110 | # the usual default is to push all branches 111 | default = upstream 112 | [core] 113 | autocrlf = false 114 | editor = vim 115 | excludesfile = /Users/carlosbaraza/.gitignore_global 116 | pager = delta 117 | [advice] 118 | statusHints = false 119 | [interactive] 120 | diffFilter = delta --color-only 121 | [delta] 122 | navigate = true # use n and N to move between diff sections 123 | [diff] 124 | # Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject 125 | # instead of a/b/c/d as prefixes for patches 126 | mnemonicprefix = true 127 | algorithm = patience 128 | tool = diffmerge 129 | colorMoved = default 130 | [rerere] 131 | # Remember my merges 132 | # http://gitfu.wordpress.com/2008/04/20/git-rerere-rereremember-what-you-did-last-time/ 133 | enabled = true 134 | [include] 135 | path = .gitconfig.user 136 | [difftool "sourcetree"] 137 | cmd = opendiff \"$LOCAL\" \"$REMOTE\" 138 | path = 139 | [mergetool "sourcetree"] 140 | cmd = /opt/homebrew-cask/Caskroom/sourcetree/2.2.4/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" 141 | trustExitCode = true 142 | [user] 143 | name = Carlos Baraza Haro 144 | email = carlos.baraza@ieee.org 145 | [difftool "diffmerge"] 146 | cmd = /usr/local/bin/diffmerge \"$LOCAL\" \"$REMOTE\" 147 | [mergetool "diffmerge"] 148 | trustExitCode = true 149 | cmd = "diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$(if test -f \"$BASE\"; then echo \"$BASE\"; else echo \"$LOCAL\"; fi)\" \"$REMOTE\"" 150 | # [url "git@github.com:"] 151 | # insteadOf = https://github.com/ 152 | [init] 153 | defaultBranch = main 154 | -------------------------------------------------------------------------------- /windows/.hyper.js: -------------------------------------------------------------------------------- 1 | // Future versions of Hyper may add additional config options, 2 | // which will not automatically be merged into this file. 3 | // See https://hyper.is#cfg for all currently supported options. 4 | 5 | module.exports = { 6 | config: { 7 | // choose either `'stable'` for receiving highly polished, 8 | // or `'canary'` for less polished but more frequent updates 9 | updateChannel: 'stable', 10 | 11 | // default font size in pixels for all tabs 12 | fontSize: 12, 13 | 14 | // font family with optional fallbacks 15 | fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', 16 | 17 | // default font weight: 'normal' or 'bold' 18 | fontWeight: 'normal', 19 | 20 | // font weight for bold characters: 'normal' or 'bold' 21 | fontWeightBold: 'bold', 22 | 23 | // line height as a relative unit 24 | lineHeight: 1, 25 | 26 | // letter spacing as a relative unit 27 | letterSpacing: 0, 28 | 29 | // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) 30 | cursorColor: 'rgba(248,28,229,0.8)', 31 | 32 | // terminal text color under BLOCK cursor 33 | cursorAccentColor: '#000', 34 | 35 | // `'BEAM'` for |, `'UNDERLINE'` for _, `'BLOCK'` for █ 36 | cursorShape: 'BLOCK', 37 | 38 | // set to `true` (without backticks and without quotes) for blinking cursor 39 | cursorBlink: false, 40 | 41 | // color of the text 42 | foregroundColor: '#fff', 43 | 44 | // terminal background color 45 | // opacity is only supported on macOS 46 | backgroundColor: '#000', 47 | 48 | // terminal selection color 49 | selectionColor: 'rgba(248,28,229,0.3)', 50 | 51 | // border color (window, tabs) 52 | borderColor: '#333', 53 | 54 | // custom CSS to embed in the main window 55 | css: '', 56 | 57 | // custom CSS to embed in the terminal window 58 | termCSS: '', 59 | 60 | // if you're using a Linux setup which show native menus, set to false 61 | // default: `true` on Linux, `true` on Windows, ignored on macOS 62 | showHamburgerMenu: '', 63 | 64 | // set to `false` (without backticks and without quotes) if you want to hide the minimize, maximize and close buttons 65 | // additionally, set to `'left'` if you want them on the left, like in Ubuntu 66 | // default: `true` (without backticks and without quotes) on Windows and Linux, ignored on macOS 67 | showWindowControls: '', 68 | 69 | // custom padding (CSS format, i.e.: `top right bottom left`) 70 | padding: '12px 14px', 71 | 72 | // the full list. if you're going to provide the full color palette, 73 | // including the 6 x 6 color cubes and the grayscale map, just provide 74 | // an array here instead of a color map object 75 | colors: { 76 | black: '#000000', 77 | red: '#C51E14', 78 | green: '#1DC121', 79 | yellow: '#C7C329', 80 | blue: '#0A2FC4', 81 | magenta: '#C839C5', 82 | cyan: '#20C5C6', 83 | white: '#C7C7C7', 84 | lightBlack: '#686868', 85 | lightRed: '#FD6F6B', 86 | lightGreen: '#67F86F', 87 | lightYellow: '#FFFA72', 88 | lightBlue: '#6A76FB', 89 | lightMagenta: '#FD7CFC', 90 | lightCyan: '#68FDFE', 91 | lightWhite: '#FFFFFF', 92 | }, 93 | 94 | // the shell to run when spawning a new session (i.e. /usr/local/bin/fish) 95 | // if left empty, your system's login shell will be used by default 96 | // 97 | // Windows 98 | // - Make sure to use a full path if the binary name doesn't work 99 | // - Remove `--login` in shellArgs 100 | // 101 | // Bash on Windows 102 | // - Example: `C:\\Windows\\System32\\bash.exe` 103 | // 104 | // PowerShell on Windows 105 | // - Example: `C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe` 106 | shell: 'C:\\Windows\\System32\\bash.exe', 107 | 108 | // for setting shell arguments (i.e. for using interactive shellArgs: `['-i']`) 109 | // by default `['--login']` will be used 110 | shellArgs: ['--login'], 111 | 112 | // for environment variables 113 | env: {}, 114 | 115 | // set to `false` for no bell 116 | bell: 'SOUND', 117 | 118 | // if `true` (without backticks and without quotes), selected text will automatically be copied to the clipboard 119 | copyOnSelect: false, 120 | 121 | // if `true` (without backticks and without quotes), hyper will be set as the default protocol client for SSH 122 | defaultSSHApp: true, 123 | 124 | // if `true` (without backticks and without quotes), on right click selected text will be copied or pasted if no 125 | // selection is present (`true` by default on Windows and disables the context menu feature) 126 | // quickEdit: true, 127 | 128 | // URL to custom bell 129 | // bellSoundURL: 'http://example.com/bell.mp3', 130 | 131 | // for advanced config flags please refer to https://hyper.is/#cfg 132 | }, 133 | 134 | // a list of plugins to fetch and install from npm 135 | // format: [@org/]project[#version] 136 | // examples: 137 | // `hyperpower` 138 | // `@company/project` 139 | // `project#1.0.1` 140 | plugins: [ 141 | 'hyper-material-theme', 142 | 'hyper-search', 143 | 'hypercwd', 144 | 'hyper-pane' 145 | ], 146 | 147 | // in development, you can create a directory under 148 | // `~/.hyper_plugins/local/` and include it here 149 | // to load it and avoid it being `npm install`ed 150 | localPlugins: [], 151 | 152 | keymaps: { 153 | // Example 154 | // 'window:devtools': 'cmd+alt+o', 155 | }, 156 | }; 157 | -------------------------------------------------------------------------------- /.zshrc: -------------------------------------------------------------------------------- 1 | # Path to your oh-my-zsh installation. 2 | export ZSH=/Users/carlosbaraza/.oh-my-zsh 3 | 4 | # Set name of the theme to load. 5 | # Look in ~/.oh-my-zsh/themes/ 6 | # Optionally, if you set this to "random", it'll load a random theme each 7 | # time that oh-my-zsh is loaded. 8 | ZSH_THEME="robbyrussell" 9 | 10 | # Uncomment the following line to use case-sensitive completion. 11 | # CASE_SENSITIVE="true" 12 | 13 | # Uncomment the following line to use hyphen-insensitive completion. Case 14 | # sensitive completion must be off. _ and - will be interchangeable. 15 | # HYPHEN_INSENSITIVE="true" 16 | 17 | # Uncomment the following line to disable bi-weekly auto-update checks. 18 | # DISABLE_AUTO_UPDATE="true" 19 | 20 | # Uncomment the following line to change how often to auto-update (in days). 21 | # export UPDATE_ZSH_DAYS=13 22 | 23 | # Uncomment the following line to disable colors in ls. 24 | # DISABLE_LS_COLORS="true" 25 | 26 | # Uncomment the following line to disable auto-setting terminal title. 27 | # DISABLE_AUTO_TITLE="true" 28 | 29 | # Uncomment the following line to enable command auto-correction. 30 | # ENABLE_CORRECTION="true" 31 | 32 | # Uncomment the following line to display red dots whilst waiting for completion. 33 | # COMPLETION_WAITING_DOTS="true" 34 | 35 | # Uncomment the following line if you want to disable marking untracked files 36 | # under VCS as dirty. This makes repository status check for large repositories 37 | # much, much faster. 38 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 39 | 40 | # Uncomment the following line if you want to change the command execution time 41 | # stamp shown in the history command output. 42 | # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 43 | # HIST_STAMPS="mm/dd/yyyy" 44 | 45 | # Would you like to use another custom folder than $ZSH/custom? 46 | # ZSH_CUSTOM=/path/to/new-custom-folder 47 | 48 | # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) 49 | # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ 50 | # Example format: plugins=(rails git textmate ruby lighthouse) 51 | # Add wisely, as too many plugins slow down shell startup. 52 | plugins=(git) 53 | 54 | # User configuration 55 | 56 | export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" 57 | # export MANPATH="/usr/local/man:$MANPATH" 58 | 59 | source $ZSH/oh-my-zsh.sh 60 | 61 | # You may need to manually set your language environment 62 | # export LANG=en_US.UTF-8 63 | 64 | # Preferred editor for local and remote sessions 65 | # if [[ -n $SSH_CONNECTION ]]; then 66 | # export EDITOR='vim' 67 | # else 68 | # export EDITOR='mvim' 69 | # fi 70 | 71 | # Compilation flags 72 | # export ARCHFLAGS="-arch x86_64" 73 | 74 | # ssh 75 | # export SSH_KEY_PATH="~/.ssh/dsa_id" 76 | 77 | # Set personal aliases, overriding those provided by oh-my-zsh libs, 78 | # plugins, and themes. Aliases can be placed here, though oh-my-zsh 79 | # users are encouraged to define aliases within the ZSH_CUSTOM folder. 80 | # For a full list of active aliases, run `alias`. 81 | # 82 | # Example aliases 83 | # alias zshconfig="mate ~/.zshrc" 84 | # alias ohmyzsh="mate ~/.oh-my-zsh" 85 | export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/go/libexec/bin 86 | 87 | # Set PATH, MANPATH, etc., for Homebrew. 88 | eval "$(/opt/homebrew/bin/brew shellenv)" 89 | 90 | # QT 91 | export PATH=$PATH:/Users/carlosbaraza/Qt/5.5/clang_64/bin 92 | 93 | test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" 94 | 95 | # NPM 96 | export PATH=$PATH:$(npm root -g):./node_modules/.bin 97 | 98 | # NVM 99 | export NVM_DIR="$HOME/.nvm" 100 | [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm 101 | [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion 102 | 103 | # Autoload NVM when changing directories if .nvmrc is found 104 | autoload -U add-zsh-hook 105 | load-nvmrc() { 106 | local node_version="$(nvm version)" 107 | local nvmrc_path="$(nvm_find_nvmrc)" 108 | 109 | if [ -n "$nvmrc_path" ]; then 110 | local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") 111 | 112 | if [ "$nvmrc_node_version" = "N/A" ]; then 113 | nvm install 114 | elif [ "$nvmrc_node_version" != "$node_version" ]; then 115 | nvm use 116 | fi 117 | elif [ "$node_version" != "$(nvm version default)" ]; then 118 | echo "Reverting to nvm default version" 119 | nvm use default 120 | fi 121 | } 122 | add-zsh-hook chpwd load-nvmrc 123 | load-nvmrc 124 | 125 | # Python3 126 | export PATH=$PATH:/Users/carlosbaraza/Library/Python/3.6/bin 127 | 128 | # Anaconda 129 | # added by Anaconda3 4.4.0 installer 130 | export PATH="$PATH:/Users/carlosbaraza/anaconda3/bin" 131 | export PATH=/usr/local/anaconda3/bin:$PATH 132 | 133 | # tabtab source for serverless package 134 | # uninstall by removing these lines or running `tabtab uninstall serverless` 135 | [[ -f /Users/carlosbaraza/.nvm/versions/node/v8.4.0/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.zsh ]] && . /Users/carlosbaraza/.nvm/versions/node/v8.4.0/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.zsh 136 | # tabtab source for sls package 137 | # uninstall by removing these lines or running `tabtab uninstall sls` 138 | [[ -f /Users/carlosbaraza/.nvm/versions/node/v8.4.0/lib/node_modules/serverless/node_modules/tabtab/.completions/sls.zsh ]] && . /Users/carlosbaraza/.nvm/versions/node/v8.4.0/lib/node_modules/serverless/node_modules/tabtab/.completions/sls.zsh 139 | 140 | export PATH="/usr/local/sbin:$PATH" 141 | 142 | # gcloud - brew cask install google-cloud-sdk 143 | source '/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc' 144 | source '/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc' 145 | 146 | # GO 147 | export GO111MODULE=on # Enable modules 148 | export GOPATH=$HOME/go 149 | export PATH=$PATH:$GOPATH/bin 150 | export PATH=$PATH:/usr/local/opt/go/libexec/bin 151 | 152 | # Rust 153 | export PATH=$HOME/.cargo/bin:$PATH 154 | 155 | # Bison 156 | export PATH=/usr/local/opt/bison/bin:$PATH 157 | 158 | # Private env variables 159 | source ~/.env 160 | 161 | export DISPLAY=:0 162 | 163 | # Android 164 | export PATH=~/Library/Android/sdk/platform-tools:$PATH 165 | 166 | # Init pyenv to have multiple python versions 167 | eval "$(pyenv init -)" 168 | 169 | # Deno binaries 170 | export PATH="/Users/carlosbaraza/.deno/bin:$PATH" 171 | 172 | # source /Users/carlosbaraza/.config/broot/launcher/bash/br 173 | 174 | rga-fzf() { 175 | RG_PREFIX="rga --files-with-matches" 176 | local file 177 | file="$( 178 | FZF_DEFAULT_COMMAND="$RG_PREFIX '$1'" \ 179 | fzf --sort --preview="[[ ! -z {} ]] && rga --pretty --context 5 {q} {}" \ 180 | --phony -q "$1" \ 181 | --bind "change:reload:$RG_PREFIX {q}" \ 182 | --preview-window="60%:wrap" 183 | )" && 184 | echo "opening $file" && 185 | open "$file" 186 | } 187 | 188 | export PATH="/opt/homebrew/opt/postgresql@13/bin:$PATH" 189 | # https://linguinecode.com/post/how-to-fix-m1-mac-puppeteer-chromium-arm64-bug 190 | export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true 191 | export PUPPETEER_EXECUTABLE_PATH=`which chromium` 192 | -------------------------------------------------------------------------------- /iterm/profiles.json: -------------------------------------------------------------------------------- 1 | { 2 | "Profiles": [ 3 | { 4 | "Use Non-ASCII Font": false, 5 | "Tags": ["Dynamic"], 6 | "Ansi 12 Color": { 7 | "Red Component": 0.092801079154014587, 8 | "Color Space": "Calibrated", 9 | "Blue Component": 0.8550257682800293, 10 | "Alpha Component": 1, 11 | "Green Component": 0.47093504667282099 12 | }, 13 | "Ansi 7 Color": { 14 | "Red Component": 1, 15 | "Color Space": "sRGB", 16 | "Blue Component": 1, 17 | "Alpha Component": 1, 18 | "Green Component": 1 19 | }, 20 | "Ansi 8 Color": { 21 | "Red Component": 0, 22 | "Color Space": "sRGB", 23 | "Blue Component": 0.16470588235294117, 24 | "Alpha Component": 1, 25 | "Green Component": 0.11764705882352941 26 | }, 27 | "Bold Color": { 28 | "Red Component": 0.57646560668945312, 29 | "Color Space": "Calibrated", 30 | "Blue Component": 0.79642432928085327, 31 | "Alpha Component": 1, 32 | "Green Component": 0.80075311660766602 33 | }, 34 | "Ansi 9 Color": { 35 | "Green Component": 0.21325300633907321, 36 | "Red Component": 0.74176257848739624, 37 | "Blue Component": 0.073530435562133789 38 | }, 39 | "Ansi 1 Color": { 40 | "Green Component": 0.10840655118227011, 41 | "Red Component": 0.81926977634429932, 42 | "Blue Component": 0.1414571404457092 43 | }, 44 | "Ansi 5 Color": { 45 | "Green Component": 0.10802463442087171, 46 | "Red Component": 0.77738940715789795, 47 | "Blue Component": 0.43516635894775391 48 | }, 49 | "Rows": 25, 50 | "Default Bookmark": "No", 51 | "Cursor Guide Color": { 52 | "Red Component": 0.70213186740875244, 53 | "Color Space": "sRGB", 54 | "Blue Component": 1, 55 | "Alpha Component": 0.078431372549019607, 56 | "Green Component": 0.9268307089805603 57 | }, 58 | "Non-ASCII Anti Aliased": true, 59 | "Use Bright Bold": true, 60 | "Ansi 10 Color": { 61 | "Red Component": 0.62378913164138794, 62 | "Color Space": "Calibrated", 63 | "Blue Component": 0.038516540080308907, 64 | "Alpha Component": 1, 65 | "Green Component": 0.75124913454055786 66 | }, 67 | "Use Cursor Guide": true, 68 | "Ambiguous Double Width": false, 69 | "Jobs to Ignore": ["rlogin", "ssh", "slogin", "telnet"], 70 | "Show Status Bar": true, 71 | "Ansi 15 Color": { 72 | "Red Component": 1, 73 | "Color Space": "sRGB", 74 | "Blue Component": 1, 75 | "Alpha Component": 1, 76 | "Green Component": 1 77 | }, 78 | "Foreground Color": { 79 | "Red Component": 0.922119140625, 80 | "Color Space": "sRGB", 81 | "Blue Component": 0.89205064997076988, 82 | "Alpha Component": 1, 83 | "Green Component": 0.89205064997076988 84 | }, 85 | "Working Directory": "/Users/carlosbaraza", 86 | "Use Tab Color": false, 87 | "Blinking Cursor": false, 88 | "Disable Window Resizing": true, 89 | "Sync Title": false, 90 | "Prompt Before Closing 2": false, 91 | "BM Growl": true, 92 | "Command": "", 93 | "Description": "Default", 94 | "Smart Cursor Color": false, 95 | "Dynamic Profile Filename": "/Users/carlosbaraza/Library/Application Support/iTerm2/DynamicProfiles/profiles.json", 96 | "Screen": -1, 97 | "Selection Color": { 98 | "Red Component": 0, 99 | "Color Space": "sRGB", 100 | "Blue Component": 1, 101 | "Alpha Component": 1, 102 | "Green Component": 0.81385448310828057 103 | }, 104 | "Mouse Reporting": true, 105 | "Columns": 80, 106 | "Idle Code": 0, 107 | "Ansi 13 Color": { 108 | "Green Component": 0.33896297216415411, 109 | "Red Component": 0.34798634052276611, 110 | "Blue Component": 0.72908437252044678 111 | }, 112 | "Custom Command": "No", 113 | "ASCII Anti Aliased": true, 114 | "Non Ascii Font": "RobotoMonoForPowerline-Regular 12", 115 | "Vertical Spacing": 1, 116 | "Use Bold Font": true, 117 | "Option Key Sends": 0, 118 | "Selected Text Color": { 119 | "Red Component": 0, 120 | "Color Space": "sRGB", 121 | "Blue Component": 0.16470588235294117, 122 | "Alpha Component": 1, 123 | "Green Component": 0.11764705882352941 124 | }, 125 | "Background Color": { 126 | "Red Component": 0, 127 | "Color Space": "sRGB", 128 | "Blue Component": 0.16741943359375, 129 | "Alpha Component": 1, 130 | "Green Component": 0.12076189368963242 131 | }, 132 | "Character Encoding": 4, 133 | "Ansi 11 Color": { 134 | "Red Component": 0.80323439836502075, 135 | "Color Space": "Calibrated", 136 | "Blue Component": 0.03394583985209465, 137 | "Alpha Component": 1, 138 | "Green Component": 0.57799136638641357 139 | }, 140 | "Use Italic Font": true, 141 | "Unlimited Scrollback": true, 142 | "Keyboard Map": { 143 | "0x5e-0x60000": { 144 | "Text": "0x1e", 145 | "Action": 11 146 | }, 147 | "0xf702-0x280000": { 148 | "Text": "b", 149 | "Action": 10 150 | }, 151 | "0xf702-0x260000": { 152 | "Text": "0x1b 0x1b 0x5b 0x44", 153 | "Action": 11 154 | }, 155 | "0xf703-0x280000": { 156 | "Text": "f", 157 | "Action": 10 158 | }, 159 | "0xf70a-0x20000": { 160 | "Text": "[28~", 161 | "Action": 10 162 | }, 163 | "0xf703-0x260000": { 164 | "Text": "[C", 165 | "Action": 10 166 | }, 167 | "0xf702-0x220000": { 168 | "Text": "[D", 169 | "Action": 10 170 | }, 171 | "0xf703-0x240000": { 172 | "Text": "[5C", 173 | "Action": 10 174 | }, 175 | "0xf702-0x240000": { 176 | "Text": "[5D", 177 | "Action": 10 178 | }, 179 | "0xf703-0x220000": { 180 | "Text": "[C", 181 | "Action": 10 182 | }, 183 | "0xf700-0x280000": { 184 | "Text": "[A", 185 | "Action": 10 186 | }, 187 | "0xf72b-0x20000": { 188 | "Text": "[F", 189 | "Action": 10 190 | }, 191 | "0xf700-0x260000": { 192 | "Text": "[A", 193 | "Action": 10 194 | }, 195 | "0xf701-0x280000": { 196 | "Text": "[B", 197 | "Action": 10 198 | }, 199 | "0xf700-0x240000": { 200 | "Text": "[A", 201 | "Action": 10 202 | }, 203 | "0xf701-0x260000": { 204 | "Text": "[B", 205 | "Action": 10 206 | }, 207 | "0xf700-0x220000": { 208 | "Text": "[A", 209 | "Action": 10 210 | }, 211 | "0xf701-0x240000": { 212 | "Text": "[B", 213 | "Action": 10 214 | }, 215 | "0xf72b-0x40000": { 216 | "Text": "", 217 | "Action": 4 218 | }, 219 | "0xf708-0x20000": { 220 | "Text": "[25~", 221 | "Action": 10 222 | }, 223 | "0xf701-0x220000": { 224 | "Text": "[B", 225 | "Action": 10 226 | }, 227 | "0x2d-0x40000": { 228 | "Text": "0x1f", 229 | "Action": 11 230 | }, 231 | "0xf70b-0x20000": { 232 | "Text": "[29~", 233 | "Action": 10 234 | }, 235 | "0xf709-0x20000": { 236 | "Text": "[26~", 237 | "Action": 10 238 | }, 239 | "0xf729-0x20000": { 240 | "Text": "[H", 241 | "Action": 10 242 | }, 243 | "0xf729-0x40000": { 244 | "Text": "", 245 | "Action": 5 246 | } 247 | }, 248 | "Window Type": 0, 249 | "Use HFS Plus Mapping": false, 250 | "Cursor Boost": 0, 251 | "Background Image Location": "", 252 | "Blur": false, 253 | "Badge Color": { 254 | "Red Component": 1, 255 | "Color Space": "Calibrated", 256 | "Blue Component": 0, 257 | "Alpha Component": 0.5, 258 | "Green Component": 0 259 | }, 260 | "Scrollback Lines": 0, 261 | "Send Code When Idle": false, 262 | "Close Sessions On End": true, 263 | "Terminal Type": "xterm-256color", 264 | "Visual Bell": true, 265 | "Flashing Bell": false, 266 | "Status Bar Layout": { 267 | "components": [ 268 | { 269 | "class": "iTermStatusBarJobComponent", 270 | "configuration": { 271 | "knobs": { 272 | "base: priority": 5, 273 | "minwidth": 0, 274 | "base: compression resistance": 1, 275 | "maxwidth": 1.7976931348623157e308 276 | }, 277 | "layout advanced configuration dictionary value": { 278 | "font": ".AppleSystemUIFont 12", 279 | "algorithm": 0 280 | } 281 | } 282 | }, 283 | { 284 | "class": "iTermStatusBarCPUUtilizationComponent", 285 | "configuration": { 286 | "knobs": { 287 | "base: priority": 5, 288 | "base: compression resistance": 1 289 | }, 290 | "layout advanced configuration dictionary value": { 291 | "font": ".AppleSystemUIFont 12", 292 | "algorithm": 0 293 | } 294 | } 295 | }, 296 | { 297 | "class": "iTermStatusBarMemoryUtilizationComponent", 298 | "configuration": { 299 | "knobs": { 300 | "base: priority": 5, 301 | "base: compression resistance": 1 302 | }, 303 | "layout advanced configuration dictionary value": { 304 | "font": ".AppleSystemUIFont 12", 305 | "algorithm": 0 306 | } 307 | } 308 | }, 309 | { 310 | "class": "iTermStatusBarNetworkUtilizationComponent", 311 | "configuration": { 312 | "knobs": { 313 | "base: priority": 5, 314 | "base: compression resistance": 1 315 | }, 316 | "layout advanced configuration dictionary value": { 317 | "algorithm": 0 318 | } 319 | } 320 | }, 321 | { 322 | "class": "iTermStatusBarSearchFieldComponent", 323 | "configuration": { 324 | "knobs": { 325 | "base: priority": 5, 326 | "base: compression resistance": 1 327 | }, 328 | "layout advanced configuration dictionary value": { 329 | "algorithm": 0 330 | } 331 | } 332 | } 333 | ], 334 | "advanced configuration": { 335 | "font": ".AppleSystemUIFont 12", 336 | "algorithm": 0 337 | } 338 | }, 339 | "Silence Bell": false, 340 | "Ansi 14 Color": { 341 | "Red Component": 0.36789458990097051, 342 | "Color Space": "Calibrated", 343 | "Blue Component": 0.75209617614746094, 344 | "Alpha Component": 1, 345 | "Green Component": 0.75880372524261475 346 | }, 347 | "Name": "Blue", 348 | "Cursor Text Color": { 349 | "Green Component": 0.15575926005840299, 350 | "Red Component": 0, 351 | "Blue Component": 0.19370138645172119 352 | }, 353 | "Minimum Contrast": 0.50022194602272729, 354 | "Shortcut": "", 355 | "Cursor Color": { 356 | "Red Component": 0, 357 | "Color Space": "sRGB", 358 | "Blue Component": 1, 359 | "Alpha Component": 1, 360 | "Green Component": 0.81176470588235294 361 | }, 362 | "Ansi 0 Color": { 363 | "Red Component": 0, 364 | "Color Space": "sRGB", 365 | "Blue Component": 0.16470588235294117, 366 | "Alpha Component": 1, 367 | "Green Component": 0.11764705882352941 368 | }, 369 | "Transparency": 0, 370 | "Horizontal Spacing": 1, 371 | "Custom Directory": "Recycle", 372 | "Link Color": { 373 | "Red Component": 0.023, 374 | "Color Space": "Calibrated", 375 | "Blue Component": 0.67800000000000005, 376 | "Alpha Component": 1, 377 | "Green Component": 0.27000000000000002 378 | }, 379 | "Right Option Key Sends": 0, 380 | "Ansi 6 Color": { 381 | "Green Component": 0.57082360982894897, 382 | "Red Component": 0.14679534733295441, 383 | "Blue Component": 0.52502274513244629 384 | }, 385 | "Guid": "ba19744f-6af3-434d-aaa6-0a48e0969958", 386 | "Normal Font": "RobotoMonoForPowerline-Regular 12", 387 | "Ansi 2 Color": { 388 | "Green Component": 0.54115492105484009, 389 | "Red Component": 0.44977453351020807, 390 | "Blue Component": 0.02020875550806522 391 | }, 392 | "Ansi 4 Color": { 393 | "Green Component": 0.46265947818756098, 394 | "Red Component": 0.12754884362220761, 395 | "Blue Component": 0.78231418132781982 396 | }, 397 | "Ansi 3 Color": { 398 | "Green Component": 0.46751424670219421, 399 | "Red Component": 0.64746475219726562, 400 | "Blue Component": 0.02348481118679047 401 | } 402 | } 403 | ] 404 | } 405 | --------------------------------------------------------------------------------