Dot Files

Published Nov 19, 2021



The configs are intentionally simple. I usually try to use the default configurations as much as possible, so I can easily switch between different computers without spending time configuring each of them. Also, I'm not too fond of code or configuration that I don't understand. It might do magical things, but when things go awry, which they do, I need to be able to fix it.



input "Install metasploit? (Y/N): " getms

install_brew() {
  mkdir -p ~/.nvm
  xcode-select --install
  if ( ! command -v brew &> /dev/null ); then
    /bin/bash -c "$(curl -fsSL"
    brew analytics off && brew analytics state
  brew update
  brew upgrade
  brew install jq
  brew install go
  brew install git
  brew install php
  brew install nvm
  brew install deno
  brew install llvm
  brew install rust
  brew install ruby
  brew install grep
  brew install curl
  brew install wget
  brew install tmux
  brew install whois
  brew install netcat
  brew install awscli
  brew install openssl
  brew install mysql
  brew install postgresql
  brew install nmap
  brew install exploitdb
  brew install --cask lulu
  brew install --cask netiquette
  brew install --cask do-not-disturb
  brew install --cask 1password
  brew install --cask electrum
  brew install --cask ledger-live
  brew install --cask protonvpn
  brew install --cask mullvadvpn
  brew install --cask tunnelblick
  brew install --cask tor-browser
  brew install --cask firefox
  brew install --cask google-chrome
  brew install --cask istat-menus
  brew install --cask the-unarchiver
  brew install --cask folx
  brew install --cask vlc
  brew install --cask spotify
  brew install --cask netnewswire
  brew install --cask signal
  brew install --cask telegram
  brew install --cask discord
  brew install --cask iterm2
  brew install --cask visual-studio-code
  brew install --cask postman
  brew install --cask docker
  brew install --cask wireshark
  brew install --cask burp-suite
  brew install --cask pgadmin4
  brew install --cask mysqlworkbench
  brew install --cask mongodb-compass
  brew tap mongodb/brew && brew install mongodb-community@5.0
  brew tap caffix/amass && brew install amass

install_apt() {
  sudo apt update -y
  sudo apt upgrade -y
  sudo apt install -y jq
  sudo apt install -y git
  sudo apt install -y g++
  sudo apt install -y gcc
  sudo apt install -y make
  sudo apt install -y tmux
  sudo apt install -y whois
  sudo apt install -y openvpn
  sudo apt install -y net-tools
  sudo apt install -y ruby-full
  sudo apt install -y python3-pip
  sudo apt install -y build-essential
  sudo apt install -y golang
  sudo apt install -y awscli
  sudo apt install -y tor
  sudo apt install -y proxychains
  sudo apt install -y nmap
  sudo apt install -y masscan
  sudo apt install -y john
  sudo apt install -y hydra
  sudo apt install -y exploitdb
  rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz
  echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bash_profile
  source ~/.bash_profile

install_ohmyzsh() {
  git clone ~/.oh-my-zsh

install_anywhere() {
  rm -rf ~/tools && mkdir ~/tools && cd ~/tools
  sudo gem install wpscan
  go install
  go install
  go install
  go install
  go install
  go install
  go install
  go install
  go install
  go install
  go install
  go install
  go install
  git clone --depth 1 sqlmap-dev && cd ~/tools
  git clone && cd NoSQLMap && python3 install && cd ~/tools
  git clone && cd CMSmap && pip3 install . && cd ~/tools
  git clone && cd CMSeeK && pip3 install -r requirements.txt && cd ~/tools
  git clone && cd GitDorker && pip3 install -r requirements.txt && cd ~/tools
  git clone && cd wafw00f && python3 install && cd ~/tools
  git clone && cd Corsy && pip3 install requests && cd ~/tools
  git clone && cd Arjun && python3 install && cd ~/tools
  git clone && cd ParamSpider && pip3 install -r requirements.txt && cd ~/tools
  git clone
  git clone
  git clone
  git clone
  git clone
  git clone
  git clone
  curl "" -o rockyou.txt.gz && gunzip rockyou.txt.gz
  if [[ $getms == [yY] || $getms == [yY][eE][sS] ]]; then
    mkdir metasploit && cd metasploit
    curl "" > msfinstall && chmod 755 msfinstall && ./msfinstall
    cd ~/tools

echo "Installing tools (part 1)"
if [ "$(uname)" == "Darwin" ]; then install_brew;
elif [ -f /etc/debian_version ]; then install_apt;

echo "Installing tools (part 2)"
if [ "$(uname)" == "Darwin" ] || [ -f /etc/debian_version ]; then install_anywhere;

echo "Installing oh-my-zsh"
if [ ! -d ~/.oh-my-zsh ]; then install_ohmyzsh;

echo "Cleaning up"
if [ "$(uname)" == "Darwin" ]; then brew update && brew upgrade && brew cleanup && brew doctor;
elif [ -f /etc/debian_version ]; then sudo apt autoremove -y && sudo apt autoclean -y && sudo apt clean;

echo; echo ".zshrc"
echo "********************************"
echo '
export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:~/go/bin:$PATH
export ZSH=$HOME/.oh-my-zsh


source $ZSH/

alias ll="ls -la"
alias cleanmymac="brew update && brew upgrade && brew cleanup && brew doctor"
alias cleancahce="rm -rf ~/Library/Caches 2> /dev/null"
alias findgit="find . -type f -name config -not -path node_modules -exec grep -H github {} \; 2> /dev/null"
alias deploysite="rsync -avr --exclude={node_modules,dist,build,.next,.git,.DS_Store,package-lock.json} ~/site/ -e \"ssh -i ~/.ssh/id\" user@"
alias previewsite="rsync -avrn --exclude={node_modules,dist,build,.next,.git,.DS_Store,package-lock.json} ~/site/ -e \"ssh -i ~/.ssh/id\" user@"

export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/" ] && \. "/opt/homebrew/opt/nvm/"  # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"  # This loads nvm bash_completion

echo; echo ".vimrc"
echo "********************************"
echo '
syntax on
syntax enable
set history=500
set nocompatible
set clipboard=unnamed
set wildmenu
set esckeys
set backspace=indent,eol,start
set ttyfast
set gdefault
set encoding=utf-8 nobomb
let mapleader=","
set backupskip=/tmp/*,/private/tmp/*
set nobackup
set nowb
set noswapfile
set modeline
set modelines=4
set exrc
set secure
set number
set cursorline
set expandtab
set tabstop=2
set list
set lcs=tab:▸\ ,trail:·,eol:¬,nbsp:_
set hlsearch
set ignorecase
set incsearch
set autoindent
set laststatus=2
set mouse=a
set noerrorbells
set nostartofline
set ruler
set shortmess=atI
set showmode
set title
set showcmd
set wrap
set linebreak

echo; echo ".gitconfig"
echo "********************************"
echo '
  name = example
  email =
  defaultBranch = main
  l = log --pretty=oneline --graph --abbrev-commit
  s = status -s
  co  = checkout
  cob = checkout -b
  f   = fetch -p
  ba  = branch -a
  bd  = branch -d
  bD  = branch -D
  dc  = diff --cached

echo; echo "vscode-settings.json"
echo "********************************"
echo '
  "window.restoreFullscreen": true,
  "window.newWindowDimensions": "maximized",
  "terminal.integrated.fontSize": 15,
  "editor.tabSize": 2,
  "editor.fontSize": 15,
  "editor.insertSpaces": true,
  "editor.wordWrap": "on",
  "editor.tabCompletion": "on",
  "editor.cursorStyle": "block",
  "editor.cursorBlinking": "solid",
  "editor.matchBrackets": "never",
  "editor.renderWhitespace": "trailing",
  "editor.glyphMargin": false,
  "editor.parameterHints.enabled": false,
  "editor.hideCursorInOverviewRuler": true,
  "editor.snippetSuggestions": "top",
  "editor.minimap.enabled": false,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.guides.bracketPairs": "active",
  "editor.fontFamily": "\"Fira Code\", Menlo, Monaco, \"Courier New\", monospace",
  "workbench.startupEditor": "none",
  "workbench.settings.editor": "json",
  "workbench.settings.useSplitJSON": true,
  "workbench.editor.enablePreview": false,
  "workbench.editor.untitled.hint": "hidden",
  "workbench.iconTheme": "material-icon-theme",
  "breadcrumbs.enabled": false,
  "extensions.ignoreRecommendations": true,
  "diffEditor.ignoreTrimWhitespace": false,
  "telemetry.telemetryLevel": "off"