From a569784e19dd6acecf290e0d5ec711d81dce72cd Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 15 Aug 2016 21:40:26 -0400 Subject: [PATCH 001/141] - Inital commit, massive changes copied from once private repo. --- .aliases | 22 +- .bash_profile | 14 +- .bash_prompt | 136 +-- .bashrc | 4 + .config/pep8 | 3 + .exports | 5 - .functions | 318 +++---- .gdbinit | 1 - .gitattributes | 3 - .gitconfig | 221 ++--- .gitignore | 20 +- .vim/backups/.gitignore => .gitmessage | 0 .hgignore | 17 - .hushlogin | 4 - .inputrc | 40 - .macos | 678 +------------- .osx | 1 - .screenrc | 8 - .vim/colors/solarized.vim | 969 -------------------- .vim/swaps/.gitignore | 0 .vim/syntax/json.vim | 74 -- .vim/undo/.gitignore | 0 .vimrc | 514 +++++++++-- .wgetrc | 38 - LICENSE-MIT.txt | 20 - README.md | 111 +-- bin/subl | 1 - brew.sh | 106 --- init/Preferences.sublime-settings | 41 - init/Solarized Dark xterm-256color.terminal | 160 ---- init/Solarized Dark.itermcolors | 214 ----- 31 files changed, 808 insertions(+), 2935 deletions(-) create mode 100644 .config/pep8 delete mode 100644 .gdbinit delete mode 100644 .gitattributes rename .vim/backups/.gitignore => .gitmessage (100%) delete mode 100644 .hgignore delete mode 100644 .hushlogin delete mode 100644 .inputrc mode change 100755 => 100644 .macos delete mode 100644 .osx delete mode 100644 .screenrc delete mode 100644 .vim/colors/solarized.vim delete mode 100644 .vim/swaps/.gitignore delete mode 100644 .vim/syntax/json.vim delete mode 100644 .vim/undo/.gitignore delete mode 100644 .wgetrc delete mode 100644 LICENSE-MIT.txt delete mode 120000 bin/subl delete mode 100755 brew.sh delete mode 100644 init/Preferences.sublime-settings delete mode 100644 init/Solarized Dark xterm-256color.terminal delete mode 100644 init/Solarized Dark.itermcolors diff --git a/.aliases b/.aliases index 42a6eeeb01e..63a4cc5580d 100644 --- a/.aliases +++ b/.aliases @@ -9,21 +9,18 @@ alias ~="cd ~" # `cd` is probably faster to type though alias -- -="cd -" # Shortcuts -alias d="cd ~/Documents/Dropbox" -alias dl="cd ~/Downloads" -alias dt="cd ~/Desktop" -alias p="cd ~/projects" +alias cddl="cd ~/Downloads" +alias cddt="cd ~/Desktop" +alias cdp="cd ~/Projects" alias g="git" alias h="history" alias j="jobs" # Detect which `ls` flavor is in use if ls --color > /dev/null 2>&1; then # GNU `ls` - colorflag="--color" - export LS_COLORS='no=00:fi=00:di=01;31: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:' + colorflag="--color" else # macOS `ls` - colorflag="-G" - export LSCOLORS='BxBxhxDxfxhxhxhxhxcxcx' + colorflag="-G" fi # List all files colorized in long format @@ -37,6 +34,8 @@ alias lsd="ls -lF ${colorflag} | grep --color=never '^d'" # Always use color output for `ls` alias ls="command ls ${colorflag}" +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:' + # Always enable colored `grep` output # Note: `GREP_OPTIONS="--color=auto"` is deprecated, hence the alias usage. @@ -53,8 +52,9 @@ alias week='date +%V' # Stopwatch alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' -# Get macOS Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages -alias update='sudo softwareupdate -i -a; brew update; brew upgrade --all; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update' +# Get macOS Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages. +# TODO: Should also prune un-needed packages, but note that brew cleanup blows away npm for some reason... +alias update='sudo softwareupdate -i -a; brew update; brew upgrade --all; sudo npm update -g; sudo gem update --system; sudo gem update' # IP addresses alias ip="dig +short myip.opendns.com @resolver1.opendns.com" @@ -130,7 +130,7 @@ alias map="xargs -n1" # One of @janmoesen’s ProTip™s for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do - alias "$method"="lwp-request -m '$method'" + alias "$method"="lwp-request -m '$method'" done # Make Grunt print stack traces by default diff --git a/.bash_profile b/.bash_profile index 29717373d18..bada47616d7 100644 --- a/.bash_profile +++ b/.bash_profile @@ -5,7 +5,7 @@ export PATH="$HOME/bin:$PATH"; # * ~/.path can be used to extend `$PATH`. # * ~/.extra can be used for other settings you don’t want to commit. for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do - [ -r "$file" ] && [ -f "$file" ] && source "$file"; + [ -r "$file" ] && [ -f "$file" ] && source "$file"; done; unset file; @@ -22,19 +22,19 @@ shopt -s cdspell; # * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux` # * Recursive globbing, e.g. `echo **/*.txt` for option in autocd globstar; do - shopt -s "$option" 2> /dev/null; + shopt -s "$option" 2> /dev/null; done; # Add tab completion for many Bash commands if which brew &> /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then - source "$(brew --prefix)/share/bash-completion/bash_completion"; + source "$(brew --prefix)/share/bash-completion/bash_completion"; elif [ -f /etc/bash_completion ]; then - source /etc/bash_completion; + source /etc/bash_completion; fi; # Enable tab completion for `g` by marking it as an alias for `git` if type _git &> /dev/null && [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then - complete -o default -o nospace -F _git g; + complete -o default -o nospace -F _git g; fi; # Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards @@ -46,3 +46,7 @@ complete -W "NSGlobalDomain" defaults; # Add `killall` tab completion for common apps complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall; + +# OLD + +[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* diff --git a/.bash_prompt b/.bash_prompt index 3ff63eb6821..70835ecd3c5 100644 --- a/.bash_prompt +++ b/.bash_prompt @@ -6,103 +6,103 @@ # iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then - export TERM='gnome-256color'; + export TERM='gnome-256color'; elif infocmp xterm-256color >/dev/null 2>&1; then - export TERM='xterm-256color'; + export TERM='xterm-256color'; fi; prompt_git() { - local s=''; - local branchName=''; + local s=''; + local branchName=''; - # Check if the current directory is in a Git repository. - if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") == '0' ]; then + # Check if the current directory is in a Git repository. + if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") == '0' ]; then - # check if the current directory is in .git before running git checks - if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then + # check if the current directory is in .git before running git checks + if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then - # Ensure the index is up to date. - git update-index --really-refresh -q &>/dev/null; + # Ensure the index is up to date. + git update-index --really-refresh -q &>/dev/null; - # Check for uncommitted changes in the index. - if ! $(git diff --quiet --ignore-submodules --cached); then - s+='+'; - fi; + # Check for uncommitted changes in the index. + if ! $(git diff --quiet --ignore-submodules --cached); then + s+='+'; + fi; - # Check for unstaged changes. - if ! $(git diff-files --quiet --ignore-submodules --); then - s+='!'; - fi; + # Check for unstaged changes. + if ! $(git diff-files --quiet --ignore-submodules --); then + s+='!'; + fi; - # Check for untracked files. - if [ -n "$(git ls-files --others --exclude-standard)" ]; then - s+='?'; - fi; + # Check for untracked files. + if [ -n "$(git ls-files --others --exclude-standard)" ]; then + s+='?'; + fi; - # Check for stashed files. - if $(git rev-parse --verify refs/stash &>/dev/null); then - s+='$'; - fi; + # Check for stashed files. + if $(git rev-parse --verify refs/stash &>/dev/null); then + s+='$'; + fi; - fi; + fi; - # Get the short symbolic ref. - # If HEAD isn’t a symbolic ref, get the short SHA for the latest commit - # Otherwise, just give up. - branchName="$(git symbolic-ref --quiet --short HEAD 2> /dev/null || \ - git rev-parse --short HEAD 2> /dev/null || \ - echo '(unknown)')"; + # Get the short symbolic ref. + # If HEAD isn’t a symbolic ref, get the short SHA for the latest commit + # Otherwise, just give up. + branchName="$(git symbolic-ref --quiet --short HEAD 2> /dev/null || \ + git rev-parse --short HEAD 2> /dev/null || \ + echo '(unknown)')"; - [ -n "${s}" ] && s=" [${s}]"; + [ -n "${s}" ] && s=" [${s}]"; - echo -e "${1}${branchName}${2}${s}"; - else - return; - fi; + echo -e "${1}${branchName}${2}${s}"; + else + return; + fi; } if tput setaf 1 &> /dev/null; then - tput sgr0; # reset colors - bold=$(tput bold); - reset=$(tput sgr0); - # Solarized colors, taken from http://git.io/solarized-colors. - black=$(tput setaf 0); - blue=$(tput setaf 33); - cyan=$(tput setaf 37); - green=$(tput setaf 64); - orange=$(tput setaf 166); - purple=$(tput setaf 125); - red=$(tput setaf 124); - violet=$(tput setaf 61); - white=$(tput setaf 15); - yellow=$(tput setaf 136); + tput sgr0; # reset colors + bold=$(tput bold); + reset=$(tput sgr0); + # Solarized colors, taken from http://git.io/solarized-colors. + black=$(tput setaf 0); + blue=$(tput setaf 33); + cyan=$(tput setaf 37); + green=$(tput setaf 64); + orange=$(tput setaf 166); + purple=$(tput setaf 125); + red=$(tput setaf 124); + violet=$(tput setaf 61); + white=$(tput setaf 15); + yellow=$(tput setaf 136); else - bold=''; - reset="\e[0m"; - black="\e[1;30m"; - blue="\e[1;34m"; - cyan="\e[1;36m"; - green="\e[1;32m"; - orange="\e[1;33m"; - purple="\e[1;35m"; - red="\e[1;31m"; - violet="\e[1;35m"; - white="\e[1;37m"; - yellow="\e[1;33m"; + bold=''; + reset="\e[0m"; + black="\e[1;30m"; + blue="\e[1;34m"; + cyan="\e[1;36m"; + green="\e[1;32m"; + orange="\e[1;33m"; + purple="\e[1;35m"; + red="\e[1;31m"; + violet="\e[1;35m"; + white="\e[1;37m"; + yellow="\e[1;33m"; fi; # Highlight the user name when logged in as root. if [[ "${USER}" == "root" ]]; then - userStyle="${red}"; + userStyle="${red}"; else - userStyle="${orange}"; + userStyle="${orange}"; fi; # Highlight the hostname when connected via SSH. if [[ "${SSH_TTY}" ]]; then - hostStyle="${bold}${red}"; + hostStyle="${bold}${red}"; else - hostStyle="${yellow}"; + hostStyle="${yellow}"; fi; # Set the terminal title and prompt. diff --git a/.bashrc b/.bashrc index 12570026634..20a05ed2f16 100644 --- a/.bashrc +++ b/.bashrc @@ -1 +1,5 @@ [ -n "$PS1" ] && source ~/.bash_profile; + +# OLD + +export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting diff --git a/.config/pep8 b/.config/pep8 new file mode 100644 index 00000000000..45e6b2f2b96 --- /dev/null +++ b/.config/pep8 @@ -0,0 +1,3 @@ +[pep8] +ignore=E128 +max-line-length = 300 diff --git a/.exports b/.exports index adb45b1948f..2c1d17e1180 100644 --- a/.exports +++ b/.exports @@ -5,17 +5,12 @@ export EDITOR='vim'; # Enable persistent REPL history for `node`. export NODE_REPL_HISTORY=~/.node_history; -# Allow 32³ entries; the default is 1000. -export NODE_REPL_HISTORY_SIZE='32768'; # Use sloppy mode by default, matching web browsers. export NODE_REPL_MODE='sloppy'; # Make Python use UTF-8 encoding for output to stdin, stdout, and stderr. export PYTHONIOENCODING='UTF-8'; -# Increase Bash history size. Allow 32³ entries; the default is 500. -export HISTSIZE='32768'; -export HISTFILESIZE="${HISTSIZE}"; # Omit duplicates and commands that begin with a space from history. export HISTCONTROL='ignoreboth'; diff --git a/.functions b/.functions index a21a7817410..249f77cd366 100644 --- a/.functions +++ b/.functions @@ -1,248 +1,206 @@ #!/usr/bin/env bash +# Touch and vim a file +function touchgo() +{ + touch $1; + vim $1; +} + # Simple calculator function calc() { - local result=""; - result="$(printf "scale=10;$*\n" | bc --mathlib | tr -d '\\\n')"; - # └─ default (when `--mathlib` is used) is 20 - # - if [[ "$result" == *.* ]]; then - # improve the output for decimal numbers - printf "$result" | - sed -e 's/^\./0./' `# add "0" for cases like ".5"` \ - -e 's/^-\./-0./' `# add "0" for cases like "-.5"`\ - -e 's/0*$//;s/\.$//'; # remove trailing zeros - else - printf "$result"; - fi; - printf "\n"; + local result=""; + result="$(printf "scale=10;$*\n" | bc --mathlib | tr -d '\\\n')"; + # └─ default (when `--mathlib` is used) is 20 + # + if [[ "$result" == *.* ]]; then + # improve the output for decimal numbers + printf "$result" | + sed -e 's/^\./0./' `# add "0" for cases like ".5"` \ + -e 's/^-\./-0./' `# add "0" for cases like "-.5"`\ + -e 's/0*$//;s/\.$//'; # remove trailing zeros + else + printf "$result"; + fi; + printf "\n"; } # Create a new directory and enter it function mkd() { - mkdir -p "$@" && cd "$_"; + mkdir -p "$@" && cd "$_"; } # Change working directory to the top-most Finder window location function cdf() { # short for `cdfinder` - cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')"; + cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')"; } # Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression function targz() { - local tmpFile="${@%/}.tar"; - tar -cvf "${tmpFile}" --exclude=".DS_Store" "${@}" || return 1; - - size=$( - stat -f"%z" "${tmpFile}" 2> /dev/null; # macOS `stat` - stat -c"%s" "${tmpFile}" 2> /dev/null; # GNU `stat` - ); - - local cmd=""; - if (( size < 52428800 )) && hash zopfli 2> /dev/null; then - # the .tar file is smaller than 50 MB and Zopfli is available; use it - cmd="zopfli"; - else - if hash pigz 2> /dev/null; then - cmd="pigz"; - else - cmd="gzip"; - fi; - fi; - - echo "Compressing .tar ($((size / 1000)) kB) using \`${cmd}\`…"; - "${cmd}" -v "${tmpFile}" || return 1; - [ -f "${tmpFile}" ] && rm "${tmpFile}"; - - zippedSize=$( - stat -f"%z" "${tmpFile}.gz" 2> /dev/null; # macOS `stat` - stat -c"%s" "${tmpFile}.gz" 2> /dev/null; # GNU `stat` - ); - - echo "${tmpFile}.gz ($((zippedSize / 1000)) kB) created successfully."; + local tmpFile="${@%/}.tar"; + tar -cvf "${tmpFile}" --exclude=".DS_Store" "${@}" || return 1; + + size=$( + stat -f"%z" "${tmpFile}" 2> /dev/null; # macOS `stat` + stat -c"%s" "${tmpFile}" 2> /dev/null; # GNU `stat` + ); + + local cmd=""; + if (( size < 52428800 )) && hash zopfli 2> /dev/null; then + # the .tar file is smaller than 50 MB and Zopfli is available; use it + cmd="zopfli"; + else + if hash pigz 2> /dev/null; then + cmd="pigz"; + else + cmd="gzip"; + fi; + fi; + + echo "Compressing .tar ($((size / 1000)) kB) using \`${cmd}\`…"; + "${cmd}" -v "${tmpFile}" || return 1; + [ -f "${tmpFile}" ] && rm "${tmpFile}"; + + zippedSize=$( + stat -f"%z" "${tmpFile}.gz" 2> /dev/null; # macOS `stat` + stat -c"%s" "${tmpFile}.gz" 2> /dev/null; # GNU `stat` + ); + + echo "${tmpFile}.gz ($((zippedSize / 1000)) kB) created successfully."; } # Determine size of a file or total size of a directory function fs() { - if du -b /dev/null > /dev/null 2>&1; then - local arg=-sbh; - else - local arg=-sh; - fi - if [[ -n "$@" ]]; then - du $arg -- "$@"; - else - du $arg .[^.]* ./*; - fi; + if du -b /dev/null > /dev/null 2>&1; then + local arg=-sbh; + else + local arg=-sh; + fi + if [[ -n "$@" ]]; then + du $arg -- "$@"; + else + du $arg .[^.]* ./*; + fi; } # Use Git’s colored diff when available hash git &>/dev/null; if [ $? -eq 0 ]; then - function diff() { - git diff --no-index --color-words "$@"; - } + function diff() { + git diff --no-index --color-words "$@"; + } fi; # Create a data URL from a file function dataurl() { - local mimeType=$(file -b --mime-type "$1"); - if [[ $mimeType == text/* ]]; then - mimeType="${mimeType};charset=utf-8"; - fi - echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')"; + local mimeType=$(file -b --mime-type "$1"); + if [[ $mimeType == text/* ]]; then + mimeType="${mimeType};charset=utf-8"; + fi + echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')"; } # Create a git.io short URL function gitio() { - if [ -z "${1}" -o -z "${2}" ]; then - echo "Usage: \`gitio slug url\`"; - return 1; - fi; - curl -i https://git.io/ -F "url=${2}" -F "code=${1}"; + if [ -z "${1}" -o -z "${2}" ]; then + echo "Usage: \`gitio slug url\`"; + return 1; + fi; + curl -i https://git.io/ -F "url=${2}" -F "code=${1}"; } # Start an HTTP server from a directory, optionally specifying the port function server() { - local port="${1:-8000}"; - sleep 1 && open "http://localhost:${port}/" & - # Set the default Content-Type to `text/plain` instead of `application/octet-stream` - # And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files) - 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"; -} - -# Start a PHP server from a directory, optionally specifying the port -# (Requires PHP 5.4.0+.) -function phpserver() { - local port="${1:-4000}"; - local ip=$(ipconfig getifaddr en1); - sleep 1 && open "http://${ip}:${port}/" & - php -S "${ip}:${port}"; + local port="${1:-8000}"; + sleep 1 && open "http://localhost:${port}/" & + # Set the default Content-Type to `text/plain` instead of `application/octet-stream` + # And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files) + 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"; } # Compare original and gzipped file size function gz() { - local origsize=$(wc -c < "$1"); - local gzipsize=$(gzip -c "$1" | wc -c); - local ratio=$(echo "$gzipsize * 100 / $origsize" | bc -l); - printf "orig: %d bytes\n" "$origsize"; - printf "gzip: %d bytes (%2.2f%%)\n" "$gzipsize" "$ratio"; + local origsize=$(wc -c < "$1"); + local gzipsize=$(gzip -c "$1" | wc -c); + local ratio=$(echo "$gzipsize * 100 / $origsize" | bc -l); + printf "orig: %d bytes\n" "$origsize"; + printf "gzip: %d bytes (%2.2f%%)\n" "$gzipsize" "$ratio"; } # Syntax-highlight JSON strings or files # Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json` function json() { - if [ -t 0 ]; then # argument - python -mjson.tool <<< "$*" | pygmentize -l javascript; - else # pipe - python -mjson.tool | pygmentize -l javascript; - fi; + if [ -t 0 ]; then # argument + python -mjson.tool <<< "$*" | pygmentize -l javascript; + else # pipe + python -mjson.tool | pygmentize -l javascript; + fi; } # Run `dig` and display the most useful info function digga() { - dig +nocmd "$1" any +multiline +noall +answer; + dig +nocmd "$1" any +multiline +noall +answer; } # UTF-8-encode a string of Unicode symbols function escape() { - printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u); - # print a newline unless we’re piping the output to another program - if [ -t 1 ]; then - echo ""; # newline - fi; + printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u); + # print a newline unless we’re piping the output to another program + if [ -t 1 ]; then + echo ""; # newline + fi; } # Decode \x{ABCD}-style Unicode escape sequences function unidecode() { - perl -e "binmode(STDOUT, ':utf8'); print \"$@\""; - # print a newline unless we’re piping the output to another program - if [ -t 1 ]; then - echo ""; # newline - fi; + perl -e "binmode(STDOUT, ':utf8'); print \"$@\""; + # print a newline unless we’re piping the output to another program + if [ -t 1 ]; then + echo ""; # newline + fi; } # Get a character’s Unicode code point function codepoint() { - perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))"; - # print a newline unless we’re piping the output to another program - if [ -t 1 ]; then - echo ""; # newline - fi; + perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))"; + # print a newline unless we’re piping the output to another program + if [ -t 1 ]; then + echo ""; # newline + fi; } # Show all the names (CNs and SANs) listed in the SSL certificate # for a given domain function getcertnames() { - if [ -z "${1}" ]; then - echo "ERROR: No domain specified."; - return 1; - fi; - - local domain="${1}"; - echo "Testing ${domain}…"; - echo ""; # newline - - local tmp=$(echo -e "GET / HTTP/1.0\nEOT" \ - | openssl s_client -connect "${domain}:443" -servername "${domain}" 2>&1); - - if [[ "${tmp}" = *"-----BEGIN CERTIFICATE-----"* ]]; then - local certText=$(echo "${tmp}" \ - | openssl x509 -text -certopt "no_aux, no_header, no_issuer, no_pubkey, \ - no_serial, no_sigdump, no_signame, no_validity, no_version"); - echo "Common Name:"; - echo ""; # newline - echo "${certText}" | grep "Subject:" | sed -e "s/^.*CN=//" | sed -e "s/\/emailAddress=.*//"; - echo ""; # newline - echo "Subject Alternative Name(s):"; - echo ""; # newline - echo "${certText}" | grep -A 1 "Subject Alternative Name:" \ - | sed -e "2s/DNS://g" -e "s/ //g" | tr "," "\n" | tail -n +2; - return 0; - else - echo "ERROR: Certificate not found."; - return 1; - fi; -} - -# `s` with no arguments opens the current directory in Sublime Text, otherwise -# opens the given location -function s() { - if [ $# -eq 0 ]; then - subl .; - else - subl "$@"; - fi; -} - -# `a` with no arguments opens the current directory in Atom Editor, otherwise -# opens the given location -function a() { - if [ $# -eq 0 ]; then - atom .; - else - atom "$@"; - fi; -} - -# `v` with no arguments opens the current directory in Vim, otherwise opens the -# given location -function v() { - if [ $# -eq 0 ]; then - vim .; - else - vim "$@"; - fi; -} - -# `o` with no arguments opens the current directory, otherwise opens the given -# location -function o() { - if [ $# -eq 0 ]; then - open .; - else - open "$@"; - fi; + if [ -z "${1}" ]; then + echo "ERROR: No domain specified."; + return 1; + fi; + + local domain="${1}"; + echo "Testing ${domain}…"; + echo ""; # newline + + local tmp=$(echo -e "GET / HTTP/1.0\nEOT" \ + | openssl s_client -connect "${domain}:443" -servername "${domain}" 2>&1); + + if [[ "${tmp}" = *"-----BEGIN CERTIFICATE-----"* ]]; then + local certText=$(echo "${tmp}" \ + | openssl x509 -text -certopt "no_aux, no_header, no_issuer, no_pubkey, \ + no_serial, no_sigdump, no_signame, no_validity, no_version"); + echo "Common Name:"; + echo ""; # newline + echo "${certText}" | grep "Subject:" | sed -e "s/^.*CN=//" | sed -e "s/\/emailAddress=.*//"; + echo ""; # newline + echo "Subject Alternative Name(s):"; + echo ""; # newline + echo "${certText}" | grep -A 1 "Subject Alternative Name:" \ + | sed -e "2s/DNS://g" -e "s/ //g" | tr "," "\n" | tail -n +2; + return 0; + else + echo "ERROR: Certificate not found."; + return 1; + fi; } # `tre` is a shorthand for `tree` with hidden files and color enabled, ignoring @@ -250,5 +208,5 @@ function o() { # `less` with options to preserve color and line numbers, unless the output is # small enough for one screen. function tre() { - tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX; -} + tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX; +} \ No newline at end of file diff --git a/.gdbinit b/.gdbinit deleted file mode 100644 index 9422460c765..00000000000 --- a/.gdbinit +++ /dev/null @@ -1 +0,0 @@ -set disassembly-flavor intel diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 6bdc702247e..00000000000 --- a/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -# Automatically normalize line endings for all text-based files -#* text=auto -# Disabled because of https://github.com/mathiasbynens/dotfiles/issues/149 :( diff --git a/.gitconfig b/.gitconfig index 0fb10f14420..233516320ef 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,182 +1,187 @@ +[user] + name = Igor Barsi + email = ibarsi@unioncreative.com + [alias] - # View abbreviated SHA, description, and history graph of the latest 20 commits - l = log --pretty=oneline -n 20 --graph --abbrev-commit + # View abbreviated SHA, description, and history graph of the latest 20 commits + l = log --pretty=oneline -n 20 --graph --abbrev-commit - # View the current working tree status using the short format - s = status -s + # View the current working tree status using the short format + s = status -s - # Show the diff between the latest commit and the current state - d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" + # Show the diff between the latest commit and the current state + d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" - # `git di $number` shows the diff between the state `$number` revisions ago and the current state - di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" + # `git di $number` shows the diff between the state `$number` revisions ago and the current state + di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" - # Pull in remote changes for the current repository and all its submodules - p = !"git pull; git submodule foreach git pull origin master" + # Pull in remote changes for the current repository and all its submodules + p = !"git pull; git submodule foreach git pull origin master" - # Clone a repository including all submodules - c = clone --recursive + # Clone a repository including all submodules + c = clone --recursive - # Commit all changes - ca = !git add -A && git commit -av + # Commit all changes + ca = !git add -A && git commit -av - # Switch to a branch, creating it if necessary - go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" + # Switch to a branch, creating it if necessary + go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" - # Show verbose output about tags, branches or remotes - tags = tag -l - branches = branch -a - remotes = remote -v + # Show verbose output about tags, branches or remotes + tags = tag -l + branches = branch -a + remotes = remote -v - # Amend the currently staged files to the latest commit - amend = commit --amend --reuse-message=HEAD + # Amend the currently staged files to the latest commit + amend = commit --amend --reuse-message=HEAD - # Credit an author on the latest commit - credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" + # Credit an author on the latest commit + credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" - # Interactive rebase with the given number of latest commits - reb = "!r() { git rebase -i HEAD~$1; }; r" + # Interactive rebase with the given number of latest commits + reb = "!r() { git rebase -i HEAD~$1; }; r" - # Remove the old tag with this name and tag the latest commit with it. - retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r" + # Remove the old tag with this name and tag the latest commit with it. + retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r" - # Find branches containing commit - fb = "!f() { git branch -a --contains $1; }; f" + # Find branches containing commit + fb = "!f() { git branch -a --contains $1; }; f" - # Find tags containing commit - ft = "!f() { git describe --always --contains $1; }; f" + # Find tags containing commit + ft = "!f() { git describe --always --contains $1; }; f" - # Find commits by source code - fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f" + # Find commits by source code + fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f" - # Find commits by commit message - fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" + # Find commits by commit message + fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" - # Remove branches that have already been merged with master - # a.k.a. ‘delete merged’ - dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" + # Remove branches that have already been merged with master + # a.k.a. ‘delete merged’ + dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" - # List contributors with number of commits - contributors = shortlog --summary --numbered + # List contributors with number of commits + contributors = shortlog --summary --numbered - # Merge GitHub pull request on top of the current branch or, - # if a branch name is specified, on top of the specified branch - mpr = "!f() { \ - declare currentBranch=\"$(git symbolic-ref --short HEAD)\"; \ - declare branch=\"${2:-$currentBranch}\"; \ - if [ $(printf \"%s\" \"$1\" | grep '^[0-9]\\+$' > /dev/null; printf $?) -eq 0 ]; then \ - git fetch origin refs/pull/$1/head:pr/$1 && \ - git checkout -B $branch && \ - git rebase $branch pr/$1 && \ - git checkout -B $branch && \ - git merge pr/$1 && \ - git branch -D pr/$1 && \ - git commit --amend -m \"$(git log -1 --pretty=%B)\n\nCloses #$1.\"; \ - fi \ - }; f" + # Merge GitHub pull request on top of the current branch or, + # if a branch name is specified, on top of the specified branch + mpr = "!f() { \ + declare currentBranch=\"$(git symbolic-ref --short HEAD)\"; \ + declare branch=\"${2:-$currentBranch}\"; \ + if [ $(printf \"%s\" \"$1\" | grep '^[0-9]\\+$' > /dev/null; printf $?) -eq 0 ]; then \ + git fetch origin refs/pull/$1/head:pr/$1 && \ + git checkout -B $branch && \ + git rebase $branch pr/$1 && \ + git checkout -B $branch && \ + git merge pr/$1 && \ + git branch -D pr/$1 && \ + git commit --amend -m \"$(git log -1 --pretty=%B)\n\nCloses #$1.\"; \ + fi \ + }; f" [apply] - # Detect whitespace errors when applying a patch - whitespace = fix + # Detect whitespace errors when applying a patch + whitespace = fix [core] - # Use custom `.gitignore` and `.gitattributes` - excludesfile = ~/.gitignore - attributesfile = ~/.gitattributes + # Use custom `.gitignore` and `.gitattributes` + excludesfile = ~/.gitignore + attributesfile = ~/.gitattributes - # Treat spaces before tabs and all kinds of trailing whitespace as an error - # [default] trailing-space: looks for spaces at the end of a line - # [default] space-before-tab: looks for spaces before tabs at the beginning of a line - whitespace = space-before-tab,-indent-with-non-tab,trailing-space + # Treat spaces before tabs and all kinds of trailing whitespace as an error + # [default] trailing-space: looks for spaces at the end of a line + # [default] space-before-tab: looks for spaces before tabs at the beginning of a line + whitespace = space-before-tab,-indent-with-non-tab,trailing-space - # Make `git rebase` safer on macOS - # More info: - trustctime = false + # Make `git rebase` safer on macOS + # More info: + trustctime = false - # Prevent showing files whose names contain non-ASCII symbols as unversioned. - # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html - precomposeunicode = false + # Prevent showing files whose names contain non-ASCII symbols as unversioned. + # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html + precomposeunicode = false [color] - # Use colors in Git commands that are capable of colored output when - # outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.) - ui = auto + # Use colors in Git commands that are capable of colored output when + # outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.) + ui = auto [color "branch"] - current = yellow reverse - local = yellow - remote = green + current = yellow reverse + local = yellow + remote = green [color "diff"] - meta = yellow bold - frag = magenta bold # line info - old = red # deletions - new = green # additions + meta = yellow bold + frag = magenta bold # line info + old = red # deletions + new = green # additions [color "status"] - added = yellow - changed = green - untracked = cyan + added = yellow + changed = green + untracked = cyan [commit] - # https://help.github.com/articles/signing-commits-using-gpg/ - gpgsign = true + template = ~/.gitmessage + # https://help.github.com/articles/signing-commits-using-gpg/ + # gpgsign = true [diff] - # Detect copies as well as renames - renames = copies + # Detect copies as well as renames + renames = copies [diff "bin"] - # Use `hexdump` to diff binary files - textconv = hexdump -v -C + # Use `hexdump` to diff binary files + textconv = hexdump -v -C [help] - # Automatically correct and execute mistyped commands - autocorrect = 1 + # Automatically correct and execute mistyped commands + autocorrect = 1 [merge] - # Include summaries of merged commits in newly created merge commit messages - log = true + # Include summaries of merged commits in newly created merge commit messages + log = true [push] - # Use the Git 1.x.x default to avoid errors on machines with old Git - # installations. To use `simple` instead, add this to your `~/.extra` file: - # `git config --global push.default simple`. See http://git.io/mMah-w. - default = matching - # Make `git push` push relevant annotated tags when pushing branches out. - followTags = true + # Use the Git 1.x.x default to avoid errors on machines with old Git + # installations. To use `simple` instead, add this to your `~/.extra` file: + # `git config --global push.default simple`. See http://git.io/mMah-w. + default = matching + # Make `git push` push relevant annotated tags when pushing branches out. + followTags = true # URL shorthands [url "git@github.com:"] - insteadOf = "gh:" - pushInsteadOf = "github:" - pushInsteadOf = "git://github.com/" + insteadOf = "gh:" + pushInsteadOf = "github:" + pushInsteadOf = "git://github.com/" [url "git://github.com/"] - insteadOf = "github:" + insteadOf = "github:" [url "git@gist.github.com:"] - insteadOf = "gst:" - pushInsteadOf = "gist:" - pushInsteadOf = "git://gist.github.com/" + insteadOf = "gst:" + pushInsteadOf = "gist:" + pushInsteadOf = "git://gist.github.com/" [url "git://gist.github.com/"] - insteadOf = "gist:" + insteadOf = "gist:" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 93965b64753..bf0573b9cdc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,18 @@ -# Compiled Python files -*.pyc +# Static files +**/node_modules + +# Python +**/*.pyc +**/*.sqlite3 # Folder view configuration files -.DS_Store -Desktop.ini +**/.DS_Store +**/Desktop.ini # Thumbnail cache files -._* -Thumbs.db +**/._* +**/Thumbs.db # Files that might appear on external disks -.Spotlight-V100 -.Trashes +**/.Spotlight-V100 +**/.Trashes diff --git a/.vim/backups/.gitignore b/.gitmessage similarity index 100% rename from .vim/backups/.gitignore rename to .gitmessage diff --git a/.hgignore b/.hgignore deleted file mode 100644 index ac1973e78e2..00000000000 --- a/.hgignore +++ /dev/null @@ -1,17 +0,0 @@ -# Use shell-style glob syntax -syntax: glob - -# Compiled Python files -*.pyc - -# Folder view configuration files -.DS_Store -Desktop.ini - -# Thumbnail cache files -._* -Thumbs.db - -# Files that might appear on external disks -.Spotlight-V100 -.Trashes diff --git a/.hushlogin b/.hushlogin deleted file mode 100644 index bff8a51fd15..00000000000 --- a/.hushlogin +++ /dev/null @@ -1,4 +0,0 @@ -# The mere presence of this file in the home directory disables the system -# copyright notice, the date and time of the last login, the message of the -# day as well as other information that may otherwise appear on login. -# See `man login`. diff --git a/.inputrc b/.inputrc deleted file mode 100644 index 942281a785d..00000000000 --- a/.inputrc +++ /dev/null @@ -1,40 +0,0 @@ -# Make Tab autocomplete regardless of filename case -set completion-ignore-case on - -# List all matches in case multiple possible completions are possible -set show-all-if-ambiguous on - -# Immediately add a trailing slash when autocompleting symlinks to directories -set mark-symlinked-directories on - -# Use the text that has already been typed as the prefix for searching through -# commands (i.e. more intelligent Up/Down behavior) -"\e[B": history-search-forward -"\e[A": history-search-backward - -# Do not autocomplete hidden files unless the pattern explicitly begins with a dot -set match-hidden-files off - -# Show all autocomplete results at once -set page-completions off - -# If there are more than 200 possible completions for a word, ask to show them all -set completion-query-items 200 - -# Show extra file information when completing, like `ls -F` does -set visible-stats on - -# Be more intelligent when autocompleting by also looking at the text after -# the cursor. For example, when the current line is "cd ~/src/mozil", and -# the cursor is on the "z", pressing Tab will not autocomplete it to "cd -# ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the -# Readline used by Bash 4.) -set skip-completed-text on - -# Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456' -set input-meta on -set output-meta on -set convert-meta off - -# Use Alt/Meta + Delete to delete the preceding word -"\e[3;3~": kill-word diff --git a/.macos b/.macos old mode 100755 new mode 100644 index 9c39086ccf2..c99b280d4f9 --- a/.macos +++ b/.macos @@ -18,30 +18,14 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & #sudo scutil --set LocalHostName "0x6D746873" #sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "0x6D746873" -# Set standby delay to 24 hours (default is 1 hour) -sudo pmset -a standbydelay 86400 - # Disable the sound effects on boot -sudo nvram SystemAudioVolume=" " +# sudo nvram SystemAudioVolume=" " # Disable transparency in the menu bar and elsewhere on Yosemite -defaults write com.apple.universalaccess reduceTransparency -bool true - -# Menu bar: hide the Time Machine, Volume, and User icons -for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do - defaults write "${domain}" dontAutoLoad -array \ - "/System/Library/CoreServices/Menu Extras/TimeMachine.menu" \ - "/System/Library/CoreServices/Menu Extras/Volume.menu" \ - "/System/Library/CoreServices/Menu Extras/User.menu" -done -defaults write com.apple.systemuiserver menuExtras -array \ - "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" \ - "/System/Library/CoreServices/Menu Extras/AirPort.menu" \ - "/System/Library/CoreServices/Menu Extras/Battery.menu" \ - "/System/Library/CoreServices/Menu Extras/Clock.menu" +# defaults write com.apple.universalaccess reduceTransparency -bool true # Set highlight color to green -defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" +# defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" # Set sidebar icon size to medium defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 @@ -51,14 +35,7 @@ defaults write NSGlobalDomain AppleShowScrollBars -string "Always" # Possible values: `WhenScrolling`, `Automatic` and `Always` # Disable the over-the-top focus ring animation -defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false - -# Disable smooth scrolling -# (Uncomment if you’re on an older Mac that messes up the animation) -#defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false - -# Increase window resize speed for Cocoa applications -defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 +# defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false # Expand save panel by default defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true @@ -78,70 +55,36 @@ defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true defaults write com.apple.LaunchServices LSQuarantine -bool false # Remove duplicates in the “Open With” menu (also see `lscleanup` alias) -/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user - -# Display ASCII control characters using caret notation in standard text views -# Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt` -defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true +# /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user # Disable Resume system-wide -defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false +# defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false # Disable automatic termination of inactive apps -defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true - -# Disable the crash reporter -#defaults write com.apple.CrashReporter DialogType -string "none" - -# Set Help Viewer windows to non-floating mode -defaults write com.apple.helpviewer DevMode -bool true - -# Fix for the ancient UTF-8 bug in QuickLook (https://mths.be/bbo) -# Commented out, as this is known to cause problems in various Adobe apps :( -# See https://github.com/mathiasbynens/dotfiles/issues/237 -#echo "0x08000100:0" > ~/.CFUserTextEncoding +# defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true # Reveal IP address, hostname, OS version, etc. when clicking the clock # in the login window sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName # Restart automatically if the computer freezes -sudo systemsetup -setrestartfreeze on - -# Never go into computer sleep mode -sudo systemsetup -setcomputersleep Off > /dev/null - -# Disable Notification Center and remove the menu bar icon -launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null +# sudo systemsetup -setrestartfreeze on # Disable smart quotes as they’re annoying when typing code -defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false +# defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false # Disable smart dashes as they’re annoying when typing code -defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false - -# Set a custom wallpaper image. `DefaultDesktop.jpg` is already a symlink, and -# all wallpapers are in `/Library/Desktop Pictures/`. The default is `Wave.jpg`. -#rm -rf ~/Library/Application Support/Dock/desktoppicture.db -#sudo rm -rf /System/Library/CoreServices/DefaultDesktop.jpg -#sudo ln -s /path/to/your/image /System/Library/CoreServices/DefaultDesktop.jpg +# defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false ############################################################################### # SSD-specific tweaks # ############################################################################### # Disable hibernation (speeds up entering sleep mode) -sudo pmset -a hibernatemode 0 - -# Remove the sleep image file to save disk space -sudo rm /private/var/vm/sleepimage -# Create a zero-byte file instead… -sudo touch /private/var/vm/sleepimage -# …and make sure it can’t be rewritten -sudo chflags uchg /private/var/vm/sleepimage +# sudo pmset -a hibernatemode 0 # Disable the sudden motion sensor as it’s not useful for SSDs -sudo pmset -a sms 0 +# sudo pmset -a sms 0 ############################################################################### # Trackpad, mouse, keyboard, Bluetooth accessories, and input # @@ -158,9 +101,6 @@ defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightC defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1 defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true -# Disable “natural” (Lion-style) scrolling -defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false - # Increase sound quality for Bluetooth headphones/headsets defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 @@ -168,43 +108,19 @@ defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int # (e.g. enable Tab in modal dialogs) defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 -# Use scroll gesture with the Ctrl (^) modifier key to zoom -defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true -defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 -# Follow the keyboard focus while zoomed in -defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true - # Disable press-and-hold for keys in favor of key repeat defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false # Set a blazingly fast keyboard repeat rate -defaults write NSGlobalDomain KeyRepeat -float 0.000000000001 - -# Set language and text formats -# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with -# `Inches`, `en_GB` with `en_US`, and `true` with `false`. -defaults write NSGlobalDomain AppleLanguages -array "en" "nl" -defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR" -defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" -defaults write NSGlobalDomain AppleMetricUnits -bool true - -# Set the timezone; see `sudo systemsetup -listtimezones` for other values -sudo systemsetup -settimezone "Europe/Brussels" > /dev/null +defaults write NSGlobalDomain KeyRepeat -int 0 # Disable auto-correct -defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false - -# Stop iTunes from responding to the keyboard media keys -#launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null +# defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false ############################################################################### # Screen # ############################################################################### -# Require password immediately after sleep or screen saver begins -defaults write com.apple.screensaver askForPassword -int 1 -defaults write com.apple.screensaver askForPasswordDelay -int 0 - # Save screenshots to the desktop defaults write com.apple.screencapture location -string "${HOME}/Desktop" @@ -227,20 +143,11 @@ sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutio # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons defaults write com.apple.finder QuitMenuItem -bool true -# Finder: disable window animations and Get Info animations -defaults write com.apple.finder DisableAllAnimations -bool true - # Set Desktop as the default location for new Finder windows # For other paths, use `PfLo` and `file:///full/path/here/` defaults write com.apple.finder NewWindowTarget -string "PfDe" defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" -# Show icons for hard drives, servers, and removable media on the desktop -defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true -defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true -defaults write com.apple.finder ShowMountedServersOnDesktop -bool true -defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true - # Finder: show hidden files by default #defaults write com.apple.finder AppleShowAllFiles -bool true @@ -254,7 +161,7 @@ defaults write com.apple.finder ShowStatusBar -bool true defaults write com.apple.finder ShowPathbar -bool true # Display full POSIX path as Finder window title -defaults write com.apple.finder _FXShowPosixPathInTitle -bool true +# defaults write com.apple.finder _FXShowPosixPathInTitle -bool true # When performing a search, search the current folder by default defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" @@ -271,11 +178,6 @@ defaults write NSGlobalDomain com.apple.springing.delay -float 0 # Avoid creating .DS_Store files on network volumes defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true -# Disable disk image verification -defaults write com.apple.frameworks.diskimages skip-verify -bool true -defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true -defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true - # Automatically open a new Finder window when a volume is mounted defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true @@ -295,18 +197,13 @@ defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist # Increase grid spacing for icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist - -# Increase the size of icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 50" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 50" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 50" ~/Library/Preferences/com.apple.finder.plist # Use list view in all Finder windows by default # Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` -defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" +# defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" # Disable the warning before emptying the Trash defaults write com.apple.finder WarnOnEmptyTrash -bool false @@ -323,16 +220,12 @@ chflags nohidden ~/Library # Show the /Volumes folder sudo chflags nohidden /Volumes -# Remove Dropbox’s green checkmark icons in Finder -file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns -[ -e "${file}" ] && mv -f "${file}" "${file}.bak" - # Expand the following File Info panes: # “General”, “Open with”, and “Sharing & Permissions” defaults write com.apple.finder FXInfoPanesExpanded -dict \ - General -bool true \ - OpenWith -bool true \ - Privileges -bool true + General -bool true \ + OpenWith -bool true \ + Privileges -bool true ############################################################################### # Dock, Dashboard, and hot corners # @@ -341,12 +234,6 @@ defaults write com.apple.finder FXInfoPanesExpanded -dict \ # Enable highlight hover effect for the grid view of a stack (Dock) defaults write com.apple.dock mouse-over-hilite-stack -bool true -# Set the icon size of Dock items to 36 pixels -defaults write com.apple.dock tilesize -int 36 - -# Change minimize/maximize window effect -defaults write com.apple.dock mineffect -string "scale" - # Minimize windows into their application’s icon defaults write com.apple.dock minimize-to-application -bool true @@ -356,59 +243,15 @@ defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true # Show indicator lights for open applications in the Dock defaults write com.apple.dock show-process-indicators -bool true -# Wipe all (default) app icons from the Dock -# This is only really useful when setting up a new Mac, or if you don’t use -# the Dock to launch apps. -#defaults write com.apple.dock persistent-apps -array - -# Show only open applications in the Dock -#defaults write com.apple.dock static-only -bool true - -# Don’t animate opening applications from the Dock -defaults write com.apple.dock launchanim -bool false - -# Speed up Mission Control animations -defaults write com.apple.dock expose-animation-duration -float 0.1 - -# Don’t group windows by application in Mission Control -# (i.e. use the old Exposé behavior instead) -defaults write com.apple.dock expose-group-by-app -bool false - -# Disable Dashboard -defaults write com.apple.dashboard mcx-disabled -bool true - -# Don’t show Dashboard as a Space -defaults write com.apple.dock dashboard-in-overlay -bool true - -# Don’t automatically rearrange Spaces based on most recent use -defaults write com.apple.dock mru-spaces -bool false - # Remove the auto-hiding Dock delay defaults write com.apple.dock autohide-delay -float 0 -# Remove the animation when hiding/showing the Dock -defaults write com.apple.dock autohide-time-modifier -float 0 - -# Automatically hide and show the Dock -defaults write com.apple.dock autohide -bool true # Make Dock icons of hidden applications translucent defaults write com.apple.dock showhidden -bool true -# Disable the Launchpad gesture (pinch with thumb and three fingers) -#defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 - # Reset Launchpad, but keep the desktop wallpaper intact find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 -delete -# Add iOS & Watch Simulator to Launchpad -sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app" "/Applications/Simulator.app" -sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator (Watch).app" "/Applications/Simulator (Watch).app" - -# Add a spacer to the left side of the Dock (where the applications are) -#defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' -# Add a spacer to the right side of the Dock (where the Trash is) -#defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}' - # Hot corners # Possible values: # 0: no-op @@ -421,324 +264,19 @@ sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator ( # 10: Put display to sleep # 11: Launchpad # 12: Notification Center + # Top left screen corner → Mission Control -defaults write com.apple.dock wvous-tl-corner -int 2 -defaults write com.apple.dock wvous-tl-modifier -int 0 +# defaults write com.apple.dock wvous-tl-corner -int 2 +# defaults write com.apple.dock wvous-tl-modifier -int 0 + # Top right screen corner → Desktop defaults write com.apple.dock wvous-tr-corner -int 4 defaults write com.apple.dock wvous-tr-modifier -int 0 + # Bottom left screen corner → Start screen saver defaults write com.apple.dock wvous-bl-corner -int 5 defaults write com.apple.dock wvous-bl-modifier -int 0 -############################################################################### -# Safari & WebKit # -############################################################################### - -# Privacy: don’t send search queries to Apple -defaults write com.apple.Safari UniversalSearchEnabled -bool false -defaults write com.apple.Safari SuppressSearchSuggestions -bool true - -# Press Tab to highlight each item on a web page -defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true - -# Show the full URL in the address bar (note: this still hides the scheme) -defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true - -# Set Safari’s home page to `about:blank` for faster loading -defaults write com.apple.Safari HomePage -string "about:blank" - -# Prevent Safari from opening ‘safe’ files automatically after downloading -defaults write com.apple.Safari AutoOpenSafeDownloads -bool false - -# Allow hitting the Backspace key to go to the previous page in history -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true - -# Hide Safari’s bookmarks bar by default -defaults write com.apple.Safari ShowFavoritesBar -bool false - -# Hide Safari’s sidebar in Top Sites -defaults write com.apple.Safari ShowSidebarInTopSites -bool false - -# Disable Safari’s thumbnail cache for History and Top Sites -defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 - -# Enable Safari’s debug menu -defaults write com.apple.Safari IncludeInternalDebugMenu -bool true - -# Make Safari’s search banners default to Contains instead of Starts With -defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false - -# Remove useless icons from Safari’s bookmarks bar -defaults write com.apple.Safari ProxiesInBookmarksBar "()" - -# Enable the Develop menu and the Web Inspector in Safari -defaults write com.apple.Safari IncludeDevelopMenu -bool true -defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true - -# Add a context menu item for showing the Web Inspector in web views -defaults write NSGlobalDomain WebKitDeveloperExtras -bool true - -# Enable continuous spellchecking -defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true -# Disable auto-correct -defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false - -# Disable AutoFill -defaults write com.apple.Safari AutoFillFromAddressBook -bool false -defaults write com.apple.Safari AutoFillPasswords -bool false -defaults write com.apple.Safari AutoFillCreditCardData -bool false -defaults write com.apple.Safari AutoFillMiscellaneousForms -bool false - -# Warn about fraudulent websites -defaults write com.apple.Safari WarnAboutFraudulentWebsites -bool true - -# Disable plug-ins -defaults write com.apple.Safari WebKitPluginsEnabled -bool false -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false - -# Disable Java -defaults write com.apple.Safari WebKitJavaEnabled -bool false -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false - -# Block pop-up windows -defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false - -# Enable “Do Not Track” -defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true - -# Update extensions automatically -defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true - -############################################################################### -# Mail # -############################################################################### - -# Disable send and reply animations in Mail.app -defaults write com.apple.mail DisableReplyAnimations -bool true -defaults write com.apple.mail DisableSendAnimations -bool true - -# Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app -defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false - -# Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app -defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\U21a9" - -# Display emails in threaded mode, sorted by date (oldest at the top) -defaults write com.apple.mail DraftsViewerAttributes -dict-add "DisplayInThreadedMode" -string "yes" -defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortedDescending" -string "yes" -defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortOrder" -string "received-date" - -# Disable inline attachments (just show the icons) -defaults write com.apple.mail DisableInlineAttachmentViewing -bool true - -# Disable automatic spell checking -defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" - -############################################################################### -# Spotlight # -############################################################################### - -# Hide Spotlight tray-icon (and subsequent helper) -#sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search -# Disable Spotlight indexing for any volume that gets mounted and has not yet -# been indexed before. -# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume. -sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" -# Change indexing order and disable some search results -# Yosemite-specific search results (remove them if you are using macOS 10.9 or older): -# MENU_DEFINITION -# MENU_CONVERSION -# MENU_EXPRESSION -# MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) -# MENU_WEBSEARCH (send search queries to Apple) -# MENU_OTHER -defaults write com.apple.spotlight orderedItems -array \ - '{"enabled" = 1;"name" = "APPLICATIONS";}' \ - '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ - '{"enabled" = 1;"name" = "DIRECTORIES";}' \ - '{"enabled" = 1;"name" = "PDF";}' \ - '{"enabled" = 1;"name" = "FONTS";}' \ - '{"enabled" = 0;"name" = "DOCUMENTS";}' \ - '{"enabled" = 0;"name" = "MESSAGES";}' \ - '{"enabled" = 0;"name" = "CONTACT";}' \ - '{"enabled" = 0;"name" = "EVENT_TODO";}' \ - '{"enabled" = 0;"name" = "IMAGES";}' \ - '{"enabled" = 0;"name" = "BOOKMARKS";}' \ - '{"enabled" = 0;"name" = "MUSIC";}' \ - '{"enabled" = 0;"name" = "MOVIES";}' \ - '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ - '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ - '{"enabled" = 0;"name" = "SOURCE";}' \ - '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ - '{"enabled" = 0;"name" = "MENU_OTHER";}' \ - '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ - '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ - '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ - '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' -# Load new settings before rebuilding the index -killall mds > /dev/null 2>&1 -# Make sure indexing is enabled for the main volume -sudo mdutil -i on / > /dev/null -# Rebuild the index from scratch -sudo mdutil -E / > /dev/null - -############################################################################### -# Terminal & iTerm 2 # -############################################################################### - -# Only use UTF-8 in Terminal.app -defaults write com.apple.terminal StringEncodings -array 4 - -# Use a modified version of the Solarized Dark theme by default in Terminal.app -osascript < /dev/null && sudo tmutil disablelocal - -############################################################################### -# Activity Monitor # -############################################################################### - -# Show the main window when launching Activity Monitor -defaults write com.apple.ActivityMonitor OpenMainWindow -bool true - -# Visualize CPU usage in the Activity Monitor Dock icon -defaults write com.apple.ActivityMonitor IconType -int 5 - -# Show all processes in Activity Monitor -defaults write com.apple.ActivityMonitor ShowCategory -int 0 - -# Sort Activity Monitor results by CPU usage -defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" -defaults write com.apple.ActivityMonitor SortDirection -int 0 - -############################################################################### -# Address Book, Dashboard, iCal, TextEdit, and Disk Utility # -############################################################################### - -# Enable the debug menu in Address Book -defaults write com.apple.addressbook ABShowDebugMenu -bool true - -# Enable Dashboard dev mode (allows keeping widgets on the desktop) -defaults write com.apple.dashboard devmode -bool true - -# Enable the debug menu in iCal (pre-10.8) -defaults write com.apple.iCal IncludeDebugMenu -bool true - -# Use plain text mode for new TextEdit documents -defaults write com.apple.TextEdit RichText -int 0 -# Open and save files as UTF-8 in TextEdit -defaults write com.apple.TextEdit PlainTextEncoding -int 4 -defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 - -# Enable the debug menu in Disk Utility -defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true -defaults write com.apple.DiskUtility advanced-image-options -bool true - -# Auto-play videos when opened with QuickTime Player -defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen -bool true - -############################################################################### -# Mac App Store # -############################################################################### - -# Enable the WebKit Developer Tools in the Mac App Store -defaults write com.apple.appstore WebKitDeveloperExtras -bool true - -# Enable Debug Menu in the Mac App Store -defaults write com.apple.appstore ShowDebugMenu -bool true - -# Enable the automatic update check -defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true - -# Check for software updates daily, not just once per week -defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 - -# Download newly available updates in background -defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 - -# Install System data files & security updates -defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 - -# Automatically download apps purchased on other Macs -defaults write com.apple.SoftwareUpdate ConfigDataInstall -int 1 - -# Turn on app auto-update -defaults write com.apple.commerce AutoUpdate -bool true - -# Allow the App Store to reboot machine on macOS updates -defaults write com.apple.commerce AutoUpdateRestartRequired -bool true - ############################################################################### # Photos # ############################################################################### @@ -746,168 +284,14 @@ defaults write com.apple.commerce AutoUpdateRestartRequired -bool true # Prevent Photos from opening automatically when devices are plugged in defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true -############################################################################### -# Messages # -############################################################################### - -# Disable automatic emoji substitution (i.e. use plain text smileys) -defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false - -# Disable smart quotes as it’s annoying for messages that contain code -defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false - -# Disable continuous spell checking -defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false - -############################################################################### -# Google Chrome & Google Chrome Canary # -############################################################################### - -# Allow installing user scripts via GitHub Gist or Userscripts.org -defaults write com.google.Chrome ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*" -defaults write com.google.Chrome.canary ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*" - -# Disable the all too sensitive backswipe on trackpads -defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false -defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false - -# Disable the all too sensitive backswipe on Magic Mouse -defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false -defaults write com.google.Chrome.canary AppleEnableMouseSwipeNavigateWithScrolls -bool false - -# Use the system-native print preview dialog -defaults write com.google.Chrome DisablePrintPreview -bool true -defaults write com.google.Chrome.canary DisablePrintPreview -bool true - -# Expand the print dialog by default -defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true -defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool true - -############################################################################### -# GPGMail 2 # -############################################################################### - -# Disable signing emails by default -defaults write ~/Library/Preferences/org.gpgtools.gpgmail SignNewEmailsByDefault -bool false - -############################################################################### -# Opera & Opera Developer # -############################################################################### - -# Expand the print dialog by default -defaults write com.operasoftware.Opera PMPrintingExpandedStateForPrint2 -boolean true -defaults write com.operasoftware.OperaDeveloper PMPrintingExpandedStateForPrint2 -boolean true - -############################################################################### -# SizeUp.app # -############################################################################### - -# Start SizeUp at login -defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true - -# Don’t show the preferences window on next start -defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false - -############################################################################### -# Sublime Text # -############################################################################### - -# Install Sublime Text settings -cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null - -############################################################################### -# Transmission.app # -############################################################################### - -# Use `~/Documents/Torrents` to store incomplete downloads -defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true -defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents" - -# Don’t prompt for confirmation before downloading -defaults write org.m0k.transmission DownloadAsk -bool false -defaults write org.m0k.transmission MagnetOpenAsk -bool false - -# Trash original torrent files -defaults write org.m0k.transmission DeleteOriginalTorrent -bool true - -# Hide the donate message -defaults write org.m0k.transmission WarningDonate -bool false -# Hide the legal disclaimer -defaults write org.m0k.transmission WarningLegal -bool false - -# IP block list. -# Source: https://giuliomac.wordpress.com/2014/02/19/best-blocklist-for-transmission/ -defaults write org.m0k.transmission BlocklistURL -string "http://john.bitsurge.net/public/biglist.p2p.gz" -defaults write org.m0k.transmission BlocklistAutoUpdate -bool true - -############################################################################### -# Twitter.app # -############################################################################### - -# Disable smart quotes as it’s annoying for code tweets -defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false - -# Show the app window when clicking the menu bar icon -defaults write com.twitter.twitter-mac MenuItemBehavior -int 1 - -# Enable the hidden ‘Develop’ menu -defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true - -# Open links in the background -defaults write com.twitter.twitter-mac openLinksInBackground -bool true - -# Allow closing the ‘new tweet’ window by pressing `Esc` -defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true - -# Show full names rather than Twitter handles -defaults write com.twitter.twitter-mac ShowFullNames -bool true - -# Hide the app in the background if it’s not the front-most window -defaults write com.twitter.twitter-mac HideInBackground -bool true - -############################################################################### -# Tweetbot.app # -############################################################################### - -# Bypass the annoyingly slow t.co URL shortener -defaults write com.tapbots.TweetbotMac OpenURLsDirectly -bool true - -############################################################################### -# Spectacle.app # -############################################################################### - -# Set up my preferred keyboard shortcuts -defaults write com.divisiblebyzero.Spectacle MakeLarger -data 62706c6973743030d40102030405061819582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708101155246e756c6cd4090a0b0c0d0e0d0f596d6f64696669657273546e616d65576b6579436f64655624636c6173731000800280035a4d616b654c6172676572d2121314155a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21617585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11a1b54726f6f74800108111a232d32373c424b555a62696b6d6f7a7f8a939c9fa8b1c3c6cb0000000000000101000000000000001c000000000000000000000000000000cd -defaults write com.divisiblebyzero.Spectacle MakeSmaller -data 62706c6973743030d40102030405061819582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708101155246e756c6cd4090a0b0c0d0e0d0f596d6f64696669657273546e616d65576b6579436f64655624636c6173731000800280035b4d616b65536d616c6c6572d2121314155a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21617585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11a1b54726f6f74800108111a232d32373c424b555a62696b6d6f7b808b949da0a9b2c4c7cc0000000000000101000000000000001c000000000000000000000000000000ce -defaults write com.divisiblebyzero.Spectacle MoveToBottomDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107d80035f10134d6f7665546f426f74746f6d446973706c6179d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a217185d5a65726f4b6974486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072888d98a1afb2c0c9dbdee30000000000000101000000000000001d000000000000000000000000000000e5 -defaults write com.divisiblebyzero.Spectacle MoveToBottomHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107d80035f10104d6f7665546f426f74746f6d48616c66d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072858a959ea7aab3bcced1d60000000000000101000000000000001d000000000000000000000000000000d8 -defaults write com.divisiblebyzero.Spectacle MoveToCenter -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 -defaults write com.divisiblebyzero.Spectacle MoveToFullscreen -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002102e80035f10104d6f7665546f46756c6c73637265656ed2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072858a959ea7aab3bcced1d60000000000000101000000000000001d000000000000000000000000000000d8 -defaults write com.divisiblebyzero.Spectacle MoveToLeftDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107b80035f10114d6f7665546f4c656674446973706c6179d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a217185d5a65726f4b6974486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072868b969fadb0bec7d9dce10000000000000101000000000000001d000000000000000000000000000000e3 -defaults write com.divisiblebyzero.Spectacle MoveToLeftHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107b80035e4d6f7665546f4c65667448616c66d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70728186919aa3a6afb8cacdd20000000000000101000000000000001d000000000000000000000000000000d4 -defaults write com.divisiblebyzero.Spectacle MoveToLowerLeft -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731113008002107b80035f100f4d6f7665546f4c6f7765724c656674d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e70728489949dabafbdc6cfe1e4e90000000000000101000000000000001e000000000000000000000000000000eb -defaults write com.divisiblebyzero.Spectacle MoveToLowerRight -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731113008002107c80035f10104d6f7665546f4c6f7765725269676874d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e7072858a959eacb0bec7d0e2e5ea0000000000000101000000000000001e000000000000000000000000000000ec -defaults write com.divisiblebyzero.Spectacle MoveToNextDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731118008002107c80035f10114d6f7665546f4e657874446973706c6179d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072868b969fa8abb4bdcfd2d70000000000000101000000000000001d000000000000000000000000000000d9 -defaults write com.divisiblebyzero.Spectacle MoveToNextThird -data 62706c6973743030d40102030405061819582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708101155246e756c6cd4090a0b0c0d0e0d0f596d6f64696669657273546e616d65576b6579436f64655624636c6173731000800280035f100f4d6f7665546f4e6578745468697264d2121314155a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21617585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11a1b54726f6f74800108111a232d32373c424b555a62696b6d6f8186919aa3a6afb8cacdd20000000000000101000000000000001c000000000000000000000000000000d4 -defaults write com.divisiblebyzero.Spectacle MoveToPreviousDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731118008002107b80035f10154d6f7665546f50726576696f7573446973706c6179d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70728a8f9aa3acafb8c1d3d6db0000000000000101000000000000001d000000000000000000000000000000dd -defaults write com.divisiblebyzero.Spectacle MoveToPreviousThird -data 62706c6973743030d40102030405061819582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708101155246e756c6cd4090a0b0c0d0e0d0f596d6f64696669657273546e616d65576b6579436f64655624636c6173731000800280035f10134d6f7665546f50726576696f75735468697264d2121314155a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21617585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11a1b54726f6f74800108111a232d32373c424b555a62696b6d6f858a959ea7aab3bcced1d60000000000000101000000000000001c000000000000000000000000000000d8 -defaults write com.divisiblebyzero.Spectacle MoveToRightDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107c80035f10124d6f7665546f5269676874446973706c6179d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a217185d5a65726f4b6974486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072878c97a0aeb1bfc8dadde20000000000000101000000000000001d000000000000000000000000000000e4 -defaults write com.divisiblebyzero.Spectacle MoveToRightHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107c80035f100f4d6f7665546f526967687448616c66d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70728489949da6a9b2bbcdd0d50000000000000101000000000000001d000000000000000000000000000000d7 -defaults write com.divisiblebyzero.Spectacle MoveToTopDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107e80035f10104d6f7665546f546f70446973706c6179d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a217185d5a65726f4b6974486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072858a959eacafbdc6d8dbe00000000000000101000000000000001d000000000000000000000000000000e2 -defaults write com.divisiblebyzero.Spectacle MoveToTopHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107e80035d4d6f7665546f546f7048616c66d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e707280859099a2a5aeb7c9ccd10000000000000101000000000000001d000000000000000000000000000000d3 -defaults write com.divisiblebyzero.Spectacle MoveToUpperLeft -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731111008002107b80035f100f4d6f7665546f55707065724c656674d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e70728489949dabafbdc6cfe1e4e90000000000000101000000000000001e000000000000000000000000000000eb -defaults write com.divisiblebyzero.Spectacle MoveToUpperRight -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731111008002107c80035f10104d6f7665546f55707065725269676874d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e7072858a959eacb0bec7d0e2e5ea0000000000000101000000000000001e000000000000000000000000000000ec -defaults write com.divisiblebyzero.Spectacle RedoLastMove -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c617373110b008002100680035c5265646f4c6173744d6f7665d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a6aab8c1cadcdfe40000000000000101000000000000001e000000000000000000000000000000e6 -defaults write com.divisiblebyzero.Spectacle UndoLastMove -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731109008002100680035c556e646f4c6173744d6f7665d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a6aab8c1cadcdfe40000000000000101000000000000001e000000000000000000000000000000e6 - ############################################################################### # Kill affected applications # ############################################################################### for app in "Activity Monitor" "Address Book" "Calendar" "Contacts" "cfprefsd" \ - "Dock" "Finder" "Google Chrome" "Google Chrome Canary" "Mail" "Messages" \ - "Opera" "Photos" "Safari" "SizeUp" "Spectacle" "SystemUIServer" "Terminal" \ - "Transmission" "Tweetbot" "Twitter" "iCal"; do - killall "${app}" &> /dev/null + "Dock" "Finder" "Google Chrome" "Google Chrome Canary" "Mail" "Messages" \ + "Opera" "Photos" "Safari" "SizeUp" "Spectacle" "SystemUIServer" "Terminal" \ + "Transmission" "Tweetbot" "Twitter" "iCal"; do + killall "${app}" &> /dev/null done echo "Done. Note that some of these changes require a logout/restart to take effect." diff --git a/.osx b/.osx deleted file mode 100644 index 4eacb4e03b7..00000000000 --- a/.osx +++ /dev/null @@ -1 +0,0 @@ -# 301 https://github.com/mathiasbynens/dotfiles/blob/master/.macos diff --git a/.screenrc b/.screenrc deleted file mode 100644 index a4a33ba125b..00000000000 --- a/.screenrc +++ /dev/null @@ -1,8 +0,0 @@ -# Disable the startup message -startup_message off - -# Set a large scrollback buffer -defscrollback 32000 - -# Always start `screen` with UTF-8 enabled (`screen -U`) -defutf8 on diff --git a/.vim/colors/solarized.vim b/.vim/colors/solarized.vim deleted file mode 100644 index ee46b1715e2..00000000000 --- a/.vim/colors/solarized.vim +++ /dev/null @@ -1,969 +0,0 @@ -" Name: Solarized vim colorscheme -" Author: Ethan Schoonover -" URL: http://ethanschoonover.com/solarized -" (see this url for latest release & screenshots) -" License: OSI approved MIT license (see end of this file) -" Created: In the middle of the night -" Modified: 2011 Apr 14 -" -" Usage "{{{ -" -" --------------------------------------------------------------------- -" ABOUT: -" --------------------------------------------------------------------- -" Solarized is a carefully designed selective contrast colorscheme with dual -" light and dark modes that runs in both GUI, 256 and 16 color modes. -" -" See the homepage above for screenshots and details. -" -" --------------------------------------------------------------------- -" INSTALLATION: -" --------------------------------------------------------------------- -" -" Two options for installation: manual or pathogen -" -" MANUAL INSTALLATION OPTION: -" --------------------------------------------------------------------- -" -" 1. Put the files in the right place! -" 2. Move `solarized.vim` to your `.vim/colors` directory. -" -" RECOMMENDED PATHOGEN INSTALLATION OPTION: -" --------------------------------------------------------------------- -" -" 1. Download and install Tim Pope's Pathogen from: -" https://github.com/tpope/vim-pathogen -" -" 2. Next, move or clone the `vim-colors-solarized` directory so that it is -" a subdirectory of the `.vim/bundle` directory. -" -" a. **clone with git:** -" -" $ cd ~/.vim/bundle -" $ git clone git://github.com/altercation/vim-colors-solarized.git -" -" b. **or move manually into the pathogen bundle directory:** -" In the parent directory of vim-colors-solarized: -" -" $ mv vim-colors-solarized ~/.vim/bundle/ -" -" MODIFY VIMRC: -" -" After either Option 1 or Option 2 above, put the following two lines in your -" .vimrc: -" -" syntax enable -" set background=dark -" colorscheme solarized -" -" or, for the light background mode of Solarized: -" -" syntax enable -" set background=light -" colorscheme solarized -" -" I like to have a different background in GUI and terminal modes, so I can use -" the following if-then. However, I find vim's background autodetection to be -" pretty good and, at least with MacVim, I can leave this background value -" assignment out entirely and get the same results. -" -" if has('gui_running') -" set background=light -" else -" set background=dark -" endif -" -" See the Solarized homepage at http://ethanschoonover.com/solarized for -" screenshots which will help you select either the light or dark background. -" -" Other options are detailed below. -" -" IMPORTANT NOTE FOR TERMINAL USERS: -" -" If you are going to use Solarized in Terminal mode (i.e. not in a GUI version -" like gvim or macvim), **please please please** consider setting your terminal -" emulator's colorscheme to used the Solarized palette. I've included palettes -" for some popular terminal emulator as well as Xdefaults in the official -" Solarized download available from [Solarized homepage]. If you use -" Solarized *without* these colors, Solarized will need to be told to degrade -" its colorscheme to a set compatible with the limited 256 terminal palette -" (whereas by using the terminal's 16 ansi color values, you can set the -" correct, specific values for the Solarized palette). -" -" If you do use the custom terminal colors, solarized.vim should work out of -" the box for you. If you are using a terminal emulator that supports 256 -" colors and don't want to use the custom Solarized terminal colors, you will -" need to use the degraded 256 colorscheme. To do so, simply add the following -" line *before* the `colorschem solarized` line: -" -" let g:solarized_termcolors=256 -" -" Again, I recommend just changing your terminal colors to Solarized values -" either manually or via one of the many terminal schemes available for import. -" -" --------------------------------------------------------------------- -" TOGGLE BACKGROUND FUNCTION: -" --------------------------------------------------------------------- -" -" Solarized comes with a Toggle Background plugin that by default will map to -" if that mapping is available. If it is not available you will need to -" either map the function manually or change your current mapping to -" something else. If you wish to map the function manually, enter the following -" lines in your .vimrc: -" -" nmap ToggleBackground -" imap ToggleBackground -" vmap ToggleBackground -" -" Note that it is important to *not* use the noremap map variants. The plugin -" uses noremap internally. You may run `:help togglebg` for more information. -" -" --------------------------------------------------------------------- -" OPTIONS -" --------------------------------------------------------------------- -" -" Set these in your vimrc file prior to calling the colorscheme. -" -" option name default optional -" ------------------------------------------------ -" g:solarized_termcolors= 16 | 256 -" g:solarized_termtrans = 0 | 1 -" g:solarized_degrade = 0 | 1 -" g:solarized_bold = 1 | 0 -" g:solarized_underline = 1 | 0 -" g:solarized_italic = 1 | 0 -" g:solarized_contrast = "normal"| "high" or "low" -" g:solarized_visibility= "normal"| "high" or "low" -" ------------------------------------------------ -" -" OPTION DETAILS -" -" ------------------------------------------------ -" g:solarized_termcolors= 256 | 16 -" ------------------------------------------------ -" The most important option if you are using vim in terminal (non gui) mode! -" This tells Solarized to use the 256 degraded color mode if running in a 256 -" color capable terminal. Otherwise, if set to `16` it will use the terminal -" emulators colorscheme (best option as long as you've set the emulators colors -" to the Solarized palette). -" -" If you are going to use Solarized in Terminal mode (i.e. not in a GUI -" version like gvim or macvim), **please please please** consider setting your -" terminal emulator's colorscheme to used the Solarized palette. I've included -" palettes for some popular terminal emulator as well as Xdefaults in the -" official Solarized download available from: -" http://ethanschoonover.com/solarized . If you use Solarized without these -" colors, Solarized will by default use an approximate set of 256 colors. It -" isn't bad looking and has been extensively tweaked, but it's still not quite -" the real thing. -" -" ------------------------------------------------ -" g:solarized_termtrans = 0 | 1 -" ------------------------------------------------ -" If you use a terminal emulator with a transparent background and Solarized -" isn't displaying the background color transparently, set this to 1 and -" Solarized will use the default (transparent) background of the terminal -" emulator. *urxvt* required this in my testing; iTerm2 did not. -" -" Note that on Mac OS X Terminal.app, solarized_termtrans is set to 1 by -" default as this is almost always the best option. The only exception to this -" is if the working terminfo file supports 256 colors (xterm-256color). -" -" ------------------------------------------------ -" g:solarized_degrade = 0 | 1 -" ------------------------------------------------ -" For test purposes only; forces Solarized to use the 256 degraded color mode -" to test the approximate color values for accuracy. -" -" ------------------------------------------------ -" g:solarized_bold = 1 | 0 -" ------------------------------------------------ -" ------------------------------------------------ -" g:solarized_underline = 1 | 0 -" ------------------------------------------------ -" ------------------------------------------------ -" g:solarized_italic = 1 | 0 -" ------------------------------------------------ -" If you wish to stop Solarized from displaying bold, underlined or -" italicized typefaces, simply assign a zero value to the appropriate -" variable, for example: `let g:solarized_italic=0` -" -" ------------------------------------------------ -" g:solarized_contrast = "normal"| "high" or "low" -" ------------------------------------------------ -" Stick with normal! It's been carefully tested. Setting this option to high -" or low does use the same Solarized palette but simply shifts some values up -" or down in order to expand or compress the tonal range displayed. -" -" ------------------------------------------------ -" g:solarized_visibility = "normal"| "high" or "low" -" ------------------------------------------------ -" Special characters such as trailing whitespace, tabs, newlines, when -" displayed using ":set list" can be set to one of three levels depending on -" your needs. -" -" --------------------------------------------------------------------- -" COLOR VALUES -" --------------------------------------------------------------------- -" Download palettes and files from: http://ethanschoonover.com/solarized -" -" L\*a\*b values are canonical (White D65, Reference D50), other values are -" matched in sRGB space. -" -" SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB -" --------- ------- ---- ------- ----------- ---------- ----------- ----------- -" base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 -" base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 -" base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46 -" base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51 -" base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 -" base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 -" base2 #eee8d5 7/7 white 254 #d7d7af 92 -00 10 238 232 213 44 11 93 -" base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 -" yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 -" orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 -" red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 -" magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 -" violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 -" blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 -" cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 -" green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 -" -" --------------------------------------------------------------------- -" COLORSCHEME HACKING -" --------------------------------------------------------------------- -" -" Useful commands for testing colorschemes: -" :source $VIMRUNTIME/syntax/hitest.vim -" :help highlight-groups -" :help cterm-colors -" :help group-name -" -" Useful links for developing colorschemes: -" http://www.vim.org/scripts/script.php?script_id=2937 -" http://vimcasts.org/episodes/creating-colorschemes-for-vim/ -" http://www.frexx.de/xterm-256-notes/" -" -" -" }}} -" Default option values"{{{ -" --------------------------------------------------------------------- -if !exists("g:solarized_termtrans") - if ($TERM_PROGRAM ==? "apple_terminal" && &t_Co < 256) - let g:solarized_termtrans = 1 - else - let g:solarized_termtrans = 0 - endif -endif -if !exists("g:solarized_degrade") - let g:solarized_degrade = 0 -endif -if !exists("g:solarized_bold") - let g:solarized_bold = 1 -endif -if !exists("g:solarized_underline") - let g:solarized_underline = 1 -endif -if !exists("g:solarized_italic") - let g:solarized_italic = 1 -endif -if !exists("g:solarized_termcolors") - let g:solarized_termcolors = 16 -endif -if !exists("g:solarized_contrast") - let g:solarized_contrast = "normal" -endif -if !exists("g:solarized_visibility") - let g:solarized_visibility = "normal" -endif -"}}} -" Colorscheme initialization "{{{ -" --------------------------------------------------------------------- -hi clear -if exists("syntax_on") - syntax reset -endif -let colors_name = "solarized" - -"}}} -" GUI & CSApprox hexadecimal palettes"{{{ -" --------------------------------------------------------------------- -" -" Set both gui and terminal color values in separate conditional statements -" Due to possibility that CSApprox is running (though I suppose we could just -" leave the hex values out entirely in that case and include only cterm colors) -" We also check to see if user has set solarized (force use of the -" neutral gray monotone palette component) -if (has("gui_running") && g:solarized_degrade == 0) - let s:vmode = "gui" - let s:base03 = "#002b36" - let s:base02 = "#073642" - let s:base01 = "#586e75" - let s:base00 = "#657b83" - let s:base0 = "#839496" - let s:base1 = "#93a1a1" - let s:base2 = "#eee8d5" - let s:base3 = "#fdf6e3" - let s:yellow = "#b58900" - let s:orange = "#cb4b16" - let s:red = "#dc322f" - let s:magenta = "#d33682" - let s:violet = "#6c71c4" - let s:blue = "#268bd2" - let s:cyan = "#2aa198" - let s:green = "#859900" -elseif (has("gui_running") && g:solarized_degrade == 1) - " These colors are identical to the 256 color mode. They may be viewed - " while in gui mode via "let g:solarized_degrade=1", though this is not - " recommened and is for testing only. - let s:vmode = "gui" - let s:base03 = "#1c1c1c" - let s:base02 = "#262626" - let s:base01 = "#4e4e4e" - let s:base00 = "#585858" - let s:base0 = "#808080" - let s:base1 = "#8a8a8a" - let s:base2 = "#d7d7af" - let s:base3 = "#ffffd7" - let s:yellow = "#af8700" - let s:orange = "#d75f00" - let s:red = "#af0000" - let s:magenta = "#af005f" - let s:violet = "#5f5faf" - let s:blue = "#0087ff" - let s:cyan = "#00afaf" - let s:green = "#5f8700" -elseif g:solarized_termcolors != 256 && &t_Co >= 16 - let s:vmode = "cterm" - let s:base03 = "8" - let s:base02 = "0" - let s:base01 = "10" - let s:base00 = "11" - let s:base0 = "12" - let s:base1 = "14" - let s:base2 = "7" - let s:base3 = "15" - let s:yellow = "3" - let s:orange = "9" - let s:red = "1" - let s:magenta = "5" - let s:violet = "13" - let s:blue = "4" - let s:cyan = "6" - let s:green = "2" -elseif g:solarized_termcolors == 256 - let s:vmode = "cterm" - let s:base03 = "234" - let s:base02 = "235" - let s:base01 = "239" - let s:base00 = "240" - let s:base0 = "244" - let s:base1 = "245" - let s:base2 = "187" - let s:base3 = "230" - let s:yellow = "136" - let s:orange = "166" - let s:red = "124" - let s:magenta = "125" - let s:violet = "61" - let s:blue = "33" - let s:cyan = "37" - let s:green = "64" -else - let s:vmode = "cterm" - let s:bright = "* term=bold cterm=bold" - let s:base03 = "0".s:bright - let s:base02 = "0" - let s:base01 = "2".s:bright - let s:base00 = "3".s:bright - let s:base0 = "4".s:bright - let s:base1 = "6".s:bright - let s:base2 = "7" - let s:base3 = "7".s:bright - let s:yellow = "3" - let s:orange = "1".s:bright - let s:red = "1" - let s:magenta = "5" - let s:violet = "13" - let s:blue = "4" - let s:cyan = "6" - let s:green = "2" -endif -"}}} -" Formatting options and null values for passthrough effect "{{{ -" --------------------------------------------------------------------- - let s:none = "NONE" - let s:none = "NONE" - let s:t_none = "NONE" - let s:n = "NONE" - let s:c = ",undercurl" - let s:r = ",reverse" - let s:s = ",standout" - let s:ou = "" - let s:ob = "" -"}}} -" Background value based on termtrans setting "{{{ -" --------------------------------------------------------------------- -if (has("gui_running") || g:solarized_termtrans == 0) - let s:back = s:base03 -else - let s:back = "NONE" -endif -"}}} -" Alternate light scheme "{{{ -" --------------------------------------------------------------------- -if &background == "light" - let s:temp03 = s:base03 - let s:temp02 = s:base02 - let s:temp01 = s:base01 - let s:temp00 = s:base00 - let s:base03 = s:base3 - let s:base02 = s:base2 - let s:base01 = s:base1 - let s:base00 = s:base0 - let s:base0 = s:temp00 - let s:base1 = s:temp01 - let s:base2 = s:temp02 - let s:base3 = s:temp03 - if (s:back != "NONE") - let s:back = s:base03 - endif -endif -"}}} -" Optional contrast schemes "{{{ -" --------------------------------------------------------------------- -if g:solarized_contrast == "high" - let s:base01 = s:base00 - let s:base00 = s:base0 - let s:base0 = s:base1 - let s:base1 = s:base2 - let s:base2 = s:base3 - let s:back = s:back -endif -if g:solarized_contrast == "low" - let s:back = s:base02 - let s:ou = ",underline" -endif -"}}} -" Overrides dependent on user specified values"{{{ -" --------------------------------------------------------------------- -if g:solarized_bold == 1 - let s:b = ",bold" -else - let s:b = "" -endif - -if g:solarized_underline == 1 - let s:u = ",underline" -else - let s:u = "" -endif - -if g:solarized_italic == 1 - let s:i = ",italic" -else - let s:i = "" -endif -"}}} -" Highlighting primitives"{{{ -" --------------------------------------------------------------------- - -exe "let s:bg_none = ' ".s:vmode."bg=".s:none ."'" -exe "let s:bg_back = ' ".s:vmode."bg=".s:back ."'" -exe "let s:bg_base03 = ' ".s:vmode."bg=".s:base03 ."'" -exe "let s:bg_base02 = ' ".s:vmode."bg=".s:base02 ."'" -exe "let s:bg_base01 = ' ".s:vmode."bg=".s:base01 ."'" -exe "let s:bg_base00 = ' ".s:vmode."bg=".s:base00 ."'" -exe "let s:bg_base0 = ' ".s:vmode."bg=".s:base0 ."'" -exe "let s:bg_base1 = ' ".s:vmode."bg=".s:base1 ."'" -exe "let s:bg_base2 = ' ".s:vmode."bg=".s:base2 ."'" -exe "let s:bg_base3 = ' ".s:vmode."bg=".s:base3 ."'" -exe "let s:bg_green = ' ".s:vmode."bg=".s:green ."'" -exe "let s:bg_yellow = ' ".s:vmode."bg=".s:yellow ."'" -exe "let s:bg_orange = ' ".s:vmode."bg=".s:orange ."'" -exe "let s:bg_red = ' ".s:vmode."bg=".s:red ."'" -exe "let s:bg_magenta = ' ".s:vmode."bg=".s:magenta."'" -exe "let s:bg_violet = ' ".s:vmode."bg=".s:violet ."'" -exe "let s:bg_blue = ' ".s:vmode."bg=".s:blue ."'" -exe "let s:bg_cyan = ' ".s:vmode."bg=".s:cyan ."'" - -exe "let s:fg_none = ' ".s:vmode."fg=".s:none ."'" -exe "let s:fg_back = ' ".s:vmode."fg=".s:back ."'" -exe "let s:fg_base03 = ' ".s:vmode."fg=".s:base03 ."'" -exe "let s:fg_base02 = ' ".s:vmode."fg=".s:base02 ."'" -exe "let s:fg_base01 = ' ".s:vmode."fg=".s:base01 ."'" -exe "let s:fg_base00 = ' ".s:vmode."fg=".s:base00 ."'" -exe "let s:fg_base0 = ' ".s:vmode."fg=".s:base0 ."'" -exe "let s:fg_base1 = ' ".s:vmode."fg=".s:base1 ."'" -exe "let s:fg_base2 = ' ".s:vmode."fg=".s:base2 ."'" -exe "let s:fg_base3 = ' ".s:vmode."fg=".s:base3 ."'" -exe "let s:fg_green = ' ".s:vmode."fg=".s:green ."'" -exe "let s:fg_yellow = ' ".s:vmode."fg=".s:yellow ."'" -exe "let s:fg_orange = ' ".s:vmode."fg=".s:orange ."'" -exe "let s:fg_red = ' ".s:vmode."fg=".s:red ."'" -exe "let s:fg_magenta = ' ".s:vmode."fg=".s:magenta."'" -exe "let s:fg_violet = ' ".s:vmode."fg=".s:violet ."'" -exe "let s:fg_blue = ' ".s:vmode."fg=".s:blue ."'" -exe "let s:fg_cyan = ' ".s:vmode."fg=".s:cyan ."'" - -exe "let s:fmt_none = ' ".s:vmode."=NONE". " term=NONE". "'" -exe "let s:fmt_bold = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'" -exe "let s:fmt_bldi = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'" -exe "let s:fmt_undr = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'" -exe "let s:fmt_undb = ' ".s:vmode."=NONE".s:u.s:b. " term=NONE".s:u.s:b."'" -exe "let s:fmt_undi = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'" -exe "let s:fmt_uopt = ' ".s:vmode."=NONE".s:ou. " term=NONE".s:ou."'" -exe "let s:fmt_curl = ' ".s:vmode."=NONE".s:c. " term=NONE".s:c."'" -exe "let s:fmt_ital = ' ".s:vmode."=NONE". " term=NONE". "'" -exe "let s:fmt_revr = ' ".s:vmode."=NONE".s:r. " term=NONE".s:r."'" -exe "let s:fmt_stnd = ' ".s:vmode."=NONE".s:s. " term=NONE".s:s."'" - -if has("gui_running") - exe "let s:sp_none = ' guisp=".s:none ."'" - exe "let s:sp_back = ' guisp=".s:back ."'" - exe "let s:sp_base03 = ' guisp=".s:base03 ."'" - exe "let s:sp_base02 = ' guisp=".s:base02 ."'" - exe "let s:sp_base01 = ' guisp=".s:base01 ."'" - exe "let s:sp_base00 = ' guisp=".s:base00 ."'" - exe "let s:sp_base0 = ' guisp=".s:base0 ."'" - exe "let s:sp_base1 = ' guisp=".s:base1 ."'" - exe "let s:sp_base2 = ' guisp=".s:base2 ."'" - exe "let s:sp_base3 = ' guisp=".s:base3 ."'" - exe "let s:sp_green = ' guisp=".s:green ."'" - exe "let s:sp_yellow = ' guisp=".s:yellow ."'" - exe "let s:sp_orange = ' guisp=".s:orange ."'" - exe "let s:sp_red = ' guisp=".s:red ."'" - exe "let s:sp_magenta = ' guisp=".s:magenta."'" - exe "let s:sp_violet = ' guisp=".s:violet ."'" - exe "let s:sp_blue = ' guisp=".s:blue ."'" - exe "let s:sp_cyan = ' guisp=".s:cyan ."'" -else - let s:sp_none = "" - let s:sp_back = "" - let s:sp_base03 = "" - let s:sp_base02 = "" - let s:sp_base01 = "" - let s:sp_base00 = "" - let s:sp_base0 = "" - let s:sp_base1 = "" - let s:sp_base2 = "" - let s:sp_base3 = "" - let s:sp_green = "" - let s:sp_yellow = "" - let s:sp_orange = "" - let s:sp_red = "" - let s:sp_magenta = "" - let s:sp_violet = "" - let s:sp_blue = "" - let s:sp_cyan = "" -endif - -"}}} -" Basic highlighting"{{{ -" --------------------------------------------------------------------- -" note that link syntax to avoid duplicate configuration doesn't work with the -" exe compiled formats - -exe "hi! Normal" .s:fmt_none .s:fg_base0 .s:bg_back - -exe "hi! Comment" .s:fmt_ital .s:fg_base01 .s:bg_none -" *Comment any comment - -exe "hi! Constant" .s:fmt_none .s:fg_cyan .s:bg_none -" *Constant any constant -" String a string constant: "this is a string" -" Character a character constant: 'c', '\n' -" Number a number constant: 234, 0xff -" Boolean a boolean constant: TRUE, false -" Float a floating point constant: 2.3e10 - -exe "hi! Identifier" .s:fmt_none .s:fg_blue .s:bg_none -" *Identifier any variable name -" Function function name (also: methods for classes) -" -exe "hi! Statement" .s:fmt_none .s:fg_green .s:bg_none -" *Statement any statement -" Conditional if, then, else, endif, switch, etc. -" Repeat for, do, while, etc. -" Label case, default, etc. -" Operator "sizeof", "+", "*", etc. -" Keyword any other keyword -" Exception try, catch, throw - -exe "hi! PreProc" .s:fmt_none .s:fg_orange .s:bg_none -" *PreProc generic Preprocessor -" Include preprocessor #include -" Define preprocessor #define -" Macro same as Define -" PreCondit preprocessor #if, #else, #endif, etc. - -exe "hi! Type" .s:fmt_none .s:fg_yellow .s:bg_none -" *Type int, long, char, etc. -" StorageClass static, register, volatile, etc. -" Structure struct, union, enum, etc. -" Typedef A typedef - -exe "hi! Special" .s:fmt_none .s:fg_red .s:bg_none -" *Special any special symbol -" SpecialChar special character in a constant -" Tag you can use CTRL-] on this -" Delimiter character that needs attention -" SpecialComment special things inside a comment -" Debug debugging statements - -exe "hi! Underlined" .s:fmt_none .s:fg_violet .s:bg_none -" *Underlined text that stands out, HTML links - -exe "hi! Ignore" .s:fmt_none .s:fg_none .s:bg_none -" *Ignore left blank, hidden |hl-Ignore| - -exe "hi! Error" .s:fmt_bold .s:fg_red .s:bg_none -" *Error any erroneous construct - -exe "hi! Todo" .s:fmt_bold .s:fg_magenta.s:bg_none -" *Todo anything that needs extra attention; mostly the -" keywords TODO FIXME and XXX -" -"}}} -" Extended highlighting "{{{ -" --------------------------------------------------------------------- -if (g:solarized_visibility=="high") - exe "hi! SpecialKey" .s:fmt_revr .s:fg_red .s:bg_none - exe "hi! NonText" .s:fmt_bold .s:fg_base1 .s:bg_none -elseif (g:solarized_visibility=="low") - exe "hi! SpecialKey" .s:fmt_bold .s:fg_base02 .s:bg_none - exe "hi! NonText" .s:fmt_bold .s:fg_base02 .s:bg_none -else - exe "hi! SpecialKey" .s:fmt_bold .s:fg_red .s:bg_none - exe "hi! NonText" .s:fmt_bold .s:fg_base01 .s:bg_none -endif -if (has("gui_running")) || &t_Co > 8 - exe "hi! StatusLine" .s:fmt_none .s:fg_base02 .s:bg_base1 - exe "hi! StatusLineNC" .s:fmt_none .s:fg_base02 .s:bg_base00 - "exe "hi! Visual" .s:fmt_stnd .s:fg_none .s:bg_base02 - exe "hi! Visual" .s:fmt_none .s:fg_base03 .s:bg_base01 -else - exe "hi! StatusLine" .s:fmt_none .s:fg_base02 .s:bg_base2 - exe "hi! StatusLineNC" .s:fmt_none .s:fg_base02 .s:bg_base2 - exe "hi! Visual" .s:fmt_none .s:fg_none .s:bg_base2 -endif -exe "hi! Directory" .s:fmt_none .s:fg_blue .s:bg_none -exe "hi! ErrorMsg" .s:fmt_revr .s:fg_red .s:bg_none -exe "hi! IncSearch" .s:fmt_stnd .s:fg_orange .s:bg_none -exe "hi! Search" .s:fmt_revr .s:fg_yellow .s:bg_none -exe "hi! MoreMsg" .s:fmt_none .s:fg_blue .s:bg_none -exe "hi! ModeMsg" .s:fmt_none .s:fg_blue .s:bg_none -exe "hi! LineNr" .s:fmt_none .s:fg_base01 .s:bg_base02 -exe "hi! Question" .s:fmt_bold .s:fg_cyan .s:bg_none -exe "hi! VertSplit" .s:fmt_bold .s:fg_base00 .s:bg_base00 -exe "hi! Title" .s:fmt_bold .s:fg_orange .s:bg_none -exe "hi! VisualNOS" .s:fmt_stnd .s:fg_none .s:bg_base02 -exe "hi! WarningMsg" .s:fmt_bold .s:fg_red .s:bg_none -exe "hi! WildMenu" .s:fmt_none .s:fg_base2 .s:bg_base02 -exe "hi! Folded" .s:fmt_undb .s:fg_base0 .s:bg_base02 .s:sp_base03 -exe "hi! FoldColumn" .s:fmt_bold .s:fg_base0 .s:bg_base02 -exe "hi! DiffAdd" .s:fmt_revr .s:fg_green .s:bg_none -exe "hi! DiffChange" .s:fmt_revr .s:fg_yellow .s:bg_none -exe "hi! DiffDelete" .s:fmt_revr .s:fg_red .s:bg_none -exe "hi! DiffText" .s:fmt_revr .s:fg_blue .s:bg_none -exe "hi! SignColumn" .s:fmt_none .s:fg_base0 .s:bg_base02 -exe "hi! Conceal" .s:fmt_none .s:fg_blue .s:bg_none -exe "hi! SpellBad" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_red -exe "hi! SpellCap" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_violet -exe "hi! SpellRare" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_cyan -exe "hi! SpellLocal" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_yellow -exe "hi! Pmenu" .s:fmt_none .s:fg_base0 .s:bg_base02 -exe "hi! PmenuSel" .s:fmt_none .s:fg_base2 .s:bg_base01 -exe "hi! PmenuSbar" .s:fmt_none .s:fg_base0 .s:bg_base2 -exe "hi! PmenuThumb" .s:fmt_none .s:fg_base03 .s:bg_base0 -exe "hi! TabLine" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0 -exe "hi! TabLineSel" .s:fmt_undr .s:fg_base2 .s:bg_base01 .s:sp_base0 -exe "hi! TabLineFill" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0 -exe "hi! CursorColumn" .s:fmt_none .s:fg_none .s:bg_base02 -exe "hi! CursorLine" .s:fmt_uopt .s:fg_none .s:bg_base02 .s:sp_base1 -exe "hi! ColorColumn" .s:fmt_none .s:fg_none .s:bg_base02 -exe "hi! Cursor" .s:fmt_none .s:fg_base03 .s:bg_base0 -hi! link lCursor Cursor -exe "hi! MatchParen" .s:fmt_bold .s:fg_red .s:bg_base01 - -"}}} -" vim syntax highlighting "{{{ -" --------------------------------------------------------------------- -exe "hi! vimLineComment" . s:fg_base01 .s:bg_none .s:fmt_ital -exe "hi! vimCommentString".s:fg_violet .s:bg_none .s:fmt_none -hi! link vimVar Identifier -hi! link vimFunc Function -hi! link vimUserFunc Function -exe "hi! vimCommand" . s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! vimCmdSep" . s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! helpExample" . s:fg_base1 .s:bg_none .s:fmt_none -hi! link helpSpecial Special -exe "hi! helpOption" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! helpNote" . s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! helpVim" . s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! helpHyperTextJump" .s:fg_blue .s:bg_none .s:fmt_undr -exe "hi! helpHyperTextEntry".s:fg_green .s:bg_none .s:fmt_none -exe "hi! vimIsCommand" . s:fg_base00 .s:bg_none .s:fmt_none -exe "hi! vimSynMtchOpt" . s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! vimSynType" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! vimHiLink" . s:fg_blue .s:bg_none .s:fmt_none -exe "hi! vimHiGroup" . s:fg_blue .s:bg_none .s:fmt_none -exe "hi! vimGroup" . s:fg_blue .s:bg_none .s:fmt_undb -"}}} -" html highlighting "{{{ -" --------------------------------------------------------------------- -exe "hi! htmlTag" . s:fg_base01 .s:bg_none .s:fmt_none -exe "hi! htmlEndTag" . s:fg_base01 .s:bg_none .s:fmt_none -exe "hi! htmlTagN" . s:fg_base1 .s:bg_none .s:fmt_bold -exe "hi! htmlTagName" . s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! htmlSpecialTagName". s:fg_blue .s:bg_none .s:fmt_ital -exe "hi! htmlArg" . s:fg_base00 .s:bg_none .s:fmt_none -exe "hi! javaScript" . s:fg_yellow .s:bg_none .s:fmt_none -"}}} -" perl highlighting "{{{ -" --------------------------------------------------------------------- -exe "hi! perlHereDoc" . s:fg_base1 .s:bg_back .s:fmt_none -exe "hi! perlVarPlain" . s:fg_yellow .s:bg_back .s:fmt_none -exe "hi! perlStatementFileDesc". s:fg_cyan.s:bg_back.s:fmt_none - -"}}} -" tex highlighting "{{{ -" --------------------------------------------------------------------- -exe "hi! texStatement" . s:fg_cyan .s:bg_back .s:fmt_none -exe "hi! texMathZoneX" . s:fg_yellow .s:bg_back .s:fmt_none -exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none -exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none -exe "hi! texRefLabel" . s:fg_yellow .s:bg_back .s:fmt_none -"}}} -" ruby highlighting "{{{ -" --------------------------------------------------------------------- -exe "hi! rubyDefine" . s:fg_base1 .s:bg_back .s:fmt_bold -"rubyInclude -"rubySharpBang -"rubyAccess -"rubyPredefinedVariable -"rubyBoolean -"rubyClassVariable -"rubyBeginEnd -"rubyRepeatModifier -"hi! link rubyArrayDelimiter Special " [ , , ] -"rubyCurlyBlock { , , } - -"hi! link rubyClass Keyword -"hi! link rubyModule Keyword -"hi! link rubyKeyword Keyword -"hi! link rubyOperator Operator -"hi! link rubyIdentifier Identifier -"hi! link rubyInstanceVariable Identifier -"hi! link rubyGlobalVariable Identifier -"hi! link rubyClassVariable Identifier -"hi! link rubyConstant Type -"}}} -" haskell syntax highlighting"{{{ -" --------------------------------------------------------------------- -" For use with syntax/haskell.vim : Haskell Syntax File -" http://www.vim.org/scripts/script.php?script_id=3034 -" See also Steffen Siering's github repository: -" http://github.com/urso/dotrc/blob/master/vim/syntax/haskell.vim -" --------------------------------------------------------------------- -" -" Treat True and False specially, see the plugin referenced above -let hs_highlight_boolean=1 -" highlight delims, see the plugin referenced above -let hs_highlight_delimiters=1 - -exe "hi! cPreCondit". s:fg_orange.s:bg_none .s:fmt_none - -exe "hi! VarId" . s:fg_blue .s:bg_none .s:fmt_none -exe "hi! ConId" . s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! hsImport" . s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! hsString" . s:fg_base00 .s:bg_none .s:fmt_none - -exe "hi! hsStructure" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hs_hlFunctionName" . s:fg_blue .s:bg_none -exe "hi! hsStatement" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hsImportLabel" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hs_OpFunctionName" . s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! hs_DeclareFunction" . s:fg_orange .s:bg_none .s:fmt_none -exe "hi! hsVarSym" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hsType" . s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! hsTypedef" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hsModuleName" . s:fg_green .s:bg_none .s:fmt_undr -exe "hi! hsModuleStartLabel" . s:fg_magenta.s:bg_none .s:fmt_none -hi! link hsImportParams Delimiter -hi! link hsDelimTypeExport Delimiter -hi! link hsModuleStartLabel hsStructure -hi! link hsModuleWhereLabel hsModuleStartLabel - -" following is for the haskell-conceal plugin -" the first two items don't have an impact, but better safe -exe "hi! hsNiceOperator" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hsniceoperator" . s:fg_cyan .s:bg_none .s:fmt_none - -"}}} -" pandoc markdown syntax highlighting "{{{ -" --------------------------------------------------------------------- - -"PandocHiLink pandocNormalBlock -exe "hi! pandocTitleBlock" .s:fg_blue .s:bg_none .s:fmt_none -exe "hi! pandocTitleBlockTitle" .s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! pandocTitleComment" .s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! pandocComment" .s:fg_base01 .s:bg_none .s:fmt_ital -exe "hi! pandocVerbatimBlock" .s:fg_yellow .s:bg_none .s:fmt_none -hi! link pandocVerbatimBlockDeep pandocVerbatimBlock -hi! link pandocCodeBlock pandocVerbatimBlock -hi! link pandocCodeBlockDelim pandocVerbatimBlock -exe "hi! pandocBlockQuote" .s:fg_blue .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader1" .s:fg_blue .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader2" .s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader3" .s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader4" .s:fg_red .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader5" .s:fg_base0 .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader6" .s:fg_base01 .s:bg_none .s:fmt_none -exe "hi! pandocListMarker" .s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! pandocListReference" .s:fg_magenta.s:bg_none .s:fmt_undr - -" Definitions -" --------------------------------------------------------------------- -let s:fg_pdef = s:fg_violet -exe "hi! pandocDefinitionBlock" .s:fg_pdef .s:bg_none .s:fmt_none -exe "hi! pandocDefinitionTerm" .s:fg_pdef .s:bg_none .s:fmt_stnd -exe "hi! pandocDefinitionIndctr" .s:fg_pdef .s:bg_none .s:fmt_bold -exe "hi! pandocEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_ital -exe "hi! pandocEmphasisNestedDefinition" .s:fg_pdef .s:bg_none .s:fmt_bldi -exe "hi! pandocStrongEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_bold -exe "hi! pandocStrongEmphasisNestedDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi -exe "hi! pandocStrongEmphasisEmphasisDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi -exe "hi! pandocStrikeoutDefinition" .s:fg_pdef .s:bg_none .s:fmt_revr -exe "hi! pandocVerbatimInlineDefinition" .s:fg_pdef .s:bg_none .s:fmt_none -exe "hi! pandocSuperscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none -exe "hi! pandocSubscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none - -" Tables -" --------------------------------------------------------------------- -let s:fg_ptable = s:fg_blue -exe "hi! pandocTable" .s:fg_ptable.s:bg_none .s:fmt_none -exe "hi! pandocTableStructure" .s:fg_ptable.s:bg_none .s:fmt_none -hi! link pandocTableStructureTop pandocTableStructre -hi! link pandocTableStructureEnd pandocTableStructre -exe "hi! pandocTableZebraLight" .s:fg_ptable.s:bg_base03.s:fmt_none -exe "hi! pandocTableZebraDark" .s:fg_ptable.s:bg_base02.s:fmt_none -exe "hi! pandocEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_ital -exe "hi! pandocEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi -exe "hi! pandocStrongEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bold -exe "hi! pandocStrongEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi -exe "hi! pandocStrongEmphasisEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bldi -exe "hi! pandocStrikeoutTable" .s:fg_ptable.s:bg_none .s:fmt_revr -exe "hi! pandocVerbatimInlineTable" .s:fg_ptable.s:bg_none .s:fmt_none -exe "hi! pandocSuperscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none -exe "hi! pandocSubscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none - -" Headings -" --------------------------------------------------------------------- -let s:fg_phead = s:fg_orange -exe "hi! pandocHeading" .s:fg_phead .s:bg_none.s:fmt_bold -exe "hi! pandocHeadingMarker" .s:fg_yellow.s:bg_none.s:fmt_bold -exe "hi! pandocEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bldi -exe "hi! pandocEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi -exe "hi! pandocStrongEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bold -exe "hi! pandocStrongEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi -exe "hi! pandocStrongEmphasisEmphasisHeading".s:fg_phead .s:bg_none.s:fmt_bldi -exe "hi! pandocStrikeoutHeading" .s:fg_phead .s:bg_none.s:fmt_revr -exe "hi! pandocVerbatimInlineHeading" .s:fg_phead .s:bg_none.s:fmt_bold -exe "hi! pandocSuperscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold -exe "hi! pandocSubscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold - -" Links -" --------------------------------------------------------------------- -exe "hi! pandocLinkDelim" .s:fg_base01 .s:bg_none .s:fmt_none -exe "hi! pandocLinkLabel" .s:fg_blue .s:bg_none .s:fmt_undr -exe "hi! pandocLinkText" .s:fg_blue .s:bg_none .s:fmt_undb -exe "hi! pandocLinkURL" .s:fg_base00 .s:bg_none .s:fmt_undr -exe "hi! pandocLinkTitle" .s:fg_base00 .s:bg_none .s:fmt_undi -exe "hi! pandocLinkTitleDelim" .s:fg_base01 .s:bg_none .s:fmt_undi .s:sp_base00 -exe "hi! pandocLinkDefinition" .s:fg_cyan .s:bg_none .s:fmt_undr .s:sp_base00 -exe "hi! pandocLinkDefinitionID" .s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! pandocImageCaption" .s:fg_violet .s:bg_none .s:fmt_undb -exe "hi! pandocFootnoteLink" .s:fg_green .s:bg_none .s:fmt_undr -exe "hi! pandocFootnoteDefLink" .s:fg_green .s:bg_none .s:fmt_bold -exe "hi! pandocFootnoteInline" .s:fg_green .s:bg_none .s:fmt_undb -exe "hi! pandocFootnote" .s:fg_green .s:bg_none .s:fmt_none -exe "hi! pandocCitationDelim" .s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! pandocCitation" .s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! pandocCitationID" .s:fg_magenta.s:bg_none .s:fmt_undr -exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none - -" Main Styles -" --------------------------------------------------------------------- -exe "hi! pandocStyleDelim" .s:fg_base01 .s:bg_none .s:fmt_none -exe "hi! pandocEmphasis" .s:fg_base0 .s:bg_none .s:fmt_ital -exe "hi! pandocEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi -exe "hi! pandocStrongEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bold -exe "hi! pandocStrongEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi -exe "hi! pandocStrongEmphasisEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bldi -exe "hi! pandocStrikeout" .s:fg_base01 .s:bg_none .s:fmt_revr -exe "hi! pandocVerbatimInline" .s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! pandocSuperscript" .s:fg_violet .s:bg_none .s:fmt_none -exe "hi! pandocSubscript" .s:fg_violet .s:bg_none .s:fmt_none - -exe "hi! pandocRule" .s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! pandocRuleLine" .s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! pandocEscapePair" .s:fg_red .s:bg_none .s:fmt_bold -exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! pandocNonBreakingSpace" . s:fg_red .s:bg_none .s:fmt_revr -hi! link pandocEscapedCharacter pandocEscapePair -hi! link pandocLineBreak pandocEscapePair - -" Embedded Code -" --------------------------------------------------------------------- -exe "hi! pandocMetadataDelim" .s:fg_base01 .s:bg_none .s:fmt_none -exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_none -exe "hi! pandocMetadataKey" .s:fg_blue .s:bg_none .s:fmt_none -exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_bold -hi! link pandocMetadataTitle pandocMetadata - -"}}} -" Utility autocommand "{{{ -" --------------------------------------------------------------------- -" In cases where Solarized is initialized inside a terminal vim session and -" then transferred to a gui session via the command `:gui`, the gui vim process -" does not re-read the colorscheme (or .vimrc for that matter) so any `has_gui` -" related code that sets gui specific values isn't executed. -" -" Currently, Solarized sets only the cterm or gui values for the colorscheme -" depending on gui or terminal mode. It's possible that, if the following -" autocommand method is deemed excessively poor form, that approach will be -" used again and the autocommand below will be dropped. -" -" However it seems relatively benign in this case to include the autocommand -" here. It fires only in cases where vim is transferring from terminal to gui -" mode (detected with the script scope s:vmode variable). It also allows for -" other potential terminal customizations that might make gui mode suboptimal. -" -autocmd GUIEnter * if (s:vmode != "gui") | exe "colorscheme " . g:colors_name | endif -"}}} -" License "{{{ -" --------------------------------------------------------------------- -" -" Copyright (c) 2011 Ethan Schoonover -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to deal -" in the Software without restriction, including without limitation the rights -" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -" copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -" THE SOFTWARE. -" -" vim:foldmethod=marker:foldlevel=0 -"}}} diff --git a/.vim/swaps/.gitignore b/.vim/swaps/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/.vim/syntax/json.vim b/.vim/syntax/json.vim deleted file mode 100644 index 1e7761a7976..00000000000 --- a/.vim/syntax/json.vim +++ /dev/null @@ -1,74 +0,0 @@ -" Vim syntax file -" Language: JSON -" Maintainer: Jeroen Ruigrok van der Werven -" Last Change: 2009-06-16 -" Version: 0.4 -" {{{1 - -" Syntax setup {{{2 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded - -if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish - endif - let main_syntax = 'json' -endif - -" Syntax: Strings {{{2 -syn region jsonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=jsonEscape -" Syntax: JSON does not allow strings with single quotes, unlike JavaScript. -syn region jsonStringSQ start=+'+ skip=+\\\\\|\\"+ end=+'+ - -" Syntax: Escape sequences {{{3 -syn match jsonEscape "\\["\\/bfnrt]" contained -syn match jsonEscape "\\u\x\{4}" contained - -" Syntax: Strings should always be enclosed with quotes. -syn match jsonNoQuotes "\<\a\+\>" - -" Syntax: Numbers {{{2 -syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" - -" Syntax: An integer part of 0 followed by other digits is not allowed. -syn match jsonNumError "-\=\<0\d\.\d*\>" - -" Syntax: Boolean {{{2 -syn keyword jsonBoolean true false - -" Syntax: Null {{{2 -syn keyword jsonNull null - -" Syntax: Braces {{{2 -syn match jsonBraces "[{}\[\]]" - -" Define the default highlighting. {{{1 -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_json_syn_inits") - if version < 508 - let did_json_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - HiLink jsonString String - HiLink jsonEscape Special - HiLink jsonNumber Number - HiLink jsonBraces Operator - HiLink jsonNull Function - HiLink jsonBoolean Boolean - - HiLink jsonNumError Error - HiLink jsonStringSQ Error - HiLink jsonNoQuotes Error - delcommand HiLink -endif - -let b:current_syntax = "json" -if main_syntax == 'json' - unlet main_syntax -endif diff --git a/.vim/undo/.gitignore b/.vim/undo/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/.vimrc b/.vimrc index 25cf0d5264b..27460085368 100644 --- a/.vimrc +++ b/.vimrc @@ -1,106 +1,424 @@ -" Use the Solarized Dark theme -set background=dark -colorscheme solarized -let g:solarized_termtrans=1 - -" Make Vim more useful -set nocompatible -" Use the OS clipboard by default (on versions compiled with `+clipboard`) -set clipboard=unnamed -" Enhance command-line completion +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Maintainer: +" Amir Salihefendic +" http://amix.dk - amix@amix.dk +" +" Version: +" 5.0 - 29/05/12 15:43:36 +" +" Blog_post: +" http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github +" +" Awesome_version: +" Get this config, nice color schemes and lots of plugins! +" +" Install the awesome version from: +" +" https://github.com/amix/vimrc +" +" Syntax_highlighted: +" http://amix.dk/vim/vimrc.html +" +" Raw_version: +" http://amix.dk/vim/vimrc.txt +" +" Sections: +" -> General +" -> VIM user interface +" -> Colors and Fonts +" -> Files and backups +" -> Text, tab and indent related +" -> Visual mode related +" -> Moving around, tabs and buffers +" -> Status line +" -> Editing mappings +" -> vimgrep searching and cope displaying +" -> Spell checking +" -> Misc +" -> Helper functions +" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => General +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Sets how many lines of history VIM has to remember +set history=500 + +" Enable filetype plugins +filetype plugin on +filetype indent on + +" Set to auto read when a file is changed from the outside +set autoread + +" With a map leader it's possible to do extra key combinations +" like w saves the current file +let mapleader = "," +let g:mapleader = "," + +" Fast saving +nmap w :w! + +" :W sudo saves the file +" (useful for handling the permission-denied error) +command W w !sudo tee % > /dev/null + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => VIM user interface +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Set 7 lines to the cursor - when moving vertically using j/k +set so=7 + +" Avoid garbled characters in Chinese language windows OS +let $LANG='en' +set langmenu=en +source $VIMRUNTIME/delmenu.vim +source $VIMRUNTIME/menu.vim + +" Turn on the WiLd menu set wildmenu -" Allow cursor keys in insert mode -set esckeys -" Allow backspace in insert mode -set backspace=indent,eol,start -" Optimize for fast terminal connections -set ttyfast -" Add the g flag to search/replace by default -set gdefault -" Use UTF-8 without BOM -set encoding=utf-8 nobomb -" Change mapleader -let mapleader="," -" Don’t add empty newlines at the end of files -set binary -set noeol -" Centralize backups, swapfiles and undo history -set backupdir=~/.vim/backups -set directory=~/.vim/swaps -if exists("&undodir") - set undodir=~/.vim/undo + +" Ignore compiled files +set wildignore=*.o,*~,*.pyc +if has("win16") || has("win32") + set wildignore+=.git\*,.hg\*,.svn\* +else + set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store endif -" Don’t create backups when editing files in certain directories -set backupskip=/tmp/*,/private/tmp/* - -" Respect modeline in files -set modeline -set modelines=4 -" Enable per-directory .vimrc files and disable unsafe commands in them -set exrc -set secure -" Enable line numbers -set number -" Enable syntax highlighting -syntax on -" Highlight current line -set cursorline -" Make tabs as wide as two spaces -set tabstop=2 -" Show “invisible” characters -set lcs=tab:▸\ ,trail:·,eol:¬,nbsp:_ -set list -" Highlight searches -set hlsearch -" Ignore case of searches +"Always show current position +set ruler + +" Height of the command bar +set cmdheight=2 + +" A buffer becomes hidden when it is abandoned +set hid + +" Configure backspace so it acts as it should act +set backspace=eol,start,indent +set whichwrap+=<,>,h,l + +" Ignore case when searching set ignorecase -" Highlight dynamically as pattern is typed + +" When searching try to be smart about cases +set smartcase + +" Highlight search results +set hlsearch + +" Makes search act like search in modern browsers set incsearch -" Always show status line -set laststatus=2 -" Enable mouse in all modes -set mouse=a -" Disable error bells + +" Don't redraw while executing macros (good performance config) +set lazyredraw + +" For regular expressions turn magic on +set magic + +" Show matching brackets when text indicator is over them +set showmatch +" How many tenths of a second to blink when matching brackets +set mat=2 + +" No annoying sound on errors set noerrorbells -" Don’t reset cursor to start of line when moving around. -set nostartofline -" Show the cursor position -set ruler -" Don’t show the intro message when starting Vim -set shortmess=atI -" Show the current mode -set showmode -" Show the filename in the window titlebar -set title -" Show the (partial) command as it’s being typed -set showcmd -" Use relative line numbers -if exists("&relativenumber") - set relativenumber - au BufReadPost * set relativenumber +set novisualbell +set t_vb= +set tm=500 + +" Add a bit extra margin to the left +set foldcolumn=1 + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Colors and Fonts +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Enable syntax highlighting +syntax enable + +try + colorscheme desert +catch +endtry + +set background=dark + +" Set extra options when running in GUI mode +if has("gui_running") + set guioptions-=T + set guioptions-=e + set t_Co=256 + set guitablabel=%M\ %t endif -" Start scrolling three lines before the horizontal window border -set scrolloff=3 - -" Strip trailing whitespace (,ss) -function! StripWhitespace() - let save_cursor = getpos(".") - let old_query = getreg('/') - :%s/\s\+$//e - call setpos('.', save_cursor) - call setreg('/', old_query) -endfunction -noremap ss :call StripWhitespace() -" Save a file as root (,W) -noremap W :w !sudo tee % > /dev/null - -" Automatic commands -if has("autocmd") - " Enable file type detection - filetype on - " Treat .json files as .js - autocmd BufNewFile,BufRead *.json setfiletype json syntax=javascript - " Treat .md files as Markdown - autocmd BufNewFile,BufRead *.md setlocal filetype=markdown + +" Set utf8 as standard encoding and en_US as the standard language +set encoding=utf8 + +" Use Unix as the standard file type +set ffs=unix,dos,mac + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Files, backups and undo +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Turn backup off, since most stuff is in SVN, git et.c anyway... +set nobackup +set nowb +set noswapfile + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Text, tab and indent related +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Use spaces instead of tabs +set expandtab + +" Be smart when using tabs ;) +set smarttab + +" 1 tab == 4 spaces +set shiftwidth=4 +set tabstop=4 + +" Linebreak on 500 characters +set lbr +set tw=500 + +set ai "Auto indent +set si "Smart indent +set wrap "Wrap lines + + +"""""""""""""""""""""""""""""" +" => Visual mode related +"""""""""""""""""""""""""""""" +" Visual mode pressing * or # searches for the current selection +" Super useful! From an idea by Michael Naumann +vnoremap * :call VisualSelection('', '')/=@/ +vnoremap # :call VisualSelection('', '')?=@/ + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Moving around, tabs, windows and buffers +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Map to / (search) and Ctrl- to ? (backwards search) +map / +map ? + +" Disable highlight when is pressed +map :noh + +" Smart way to move between windows +map j +map k +map h +map l + +" Close the current buffer +map bd :Bclose:tabclosegT + +" Close all the buffers +map ba :bufdo bd + +map l :bnext +map h :bprevious + +" Useful mappings for managing tabs +map tn :tabnew +map to :tabonly +map tc :tabclose +map tm :tabmove +map t :tabnext + +" Let 'tl' toggle between this and the last accessed tab +let g:lasttab = 1 +nmap tl :exe "tabn ".g:lasttab +au TabLeave * let g:lasttab = tabpagenr() + + +" Opens a new tab with the current buffer's path +" Super useful when editing files in the same directory +map te :tabedit =expand("%:p:h")/ + +" Switch CWD to the directory of the open buffer +map cd :cd %:p:h:pwd + +" Specify the behavior when switching between buffers +try + set switchbuf=useopen,usetab,newtab + set stal=2 +catch +endtry + +" Return to last edit position when opening files (You want this!) +au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif + + +"""""""""""""""""""""""""""""" +" => Status line +"""""""""""""""""""""""""""""" +" Always show the status line +set laststatus=2 + +" Format the status line +set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Editing mappings +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Remap VIM 0 to first non-blank character +map 0 ^ + +" Move a line of text using ALT+[jk] or Command+[jk] on mac +nmap mz:m+`z +nmap mz:m-2`z +vmap :m'>+`mzgv`yo`z +vmap :m'<-2`>my` + nmap + vmap + vmap endif + +" Delete trailing white space on save, useful for Python and CoffeeScript ;) +func! DeleteTrailingWS() + exe "normal mz" + %s/\s\+$//ge + exe "normal `z" +endfunc +autocmd BufWrite *.py :call DeleteTrailingWS() +autocmd BufWrite *.coffee :call DeleteTrailingWS() + +" Git commit recommended settings. +autocmd Filetype gitcommit setlocal spell textwidth=72 + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Ag searching and cope displaying +" requires ag.vim - it's much better than vimgrep/grep +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" When you press gv you Ag after the selected text +vnoremap gv :call VisualSelection('gv', '') + +" Open Ag and put the cursor in the right position +map g :Ag + +" When you press r you can search and replace the selected text +vnoremap r :call VisualSelection('replace', '') + +" Do :help cope if you are unsure what cope is. It's super useful! +" +" When you search with Ag, display your results in cope by doing: +" cc +" +" To go to the next search result do: +" n +" +" To go to the previous search results do: +" p +" +map cc :botright cope +map co ggVGy:tabnew:set syntax=qfpgg +map n :cn +map p :cp + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Spell checking +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Pressing ,ss will toggle and untoggle spell checking +map ss :setlocal spell! + +" Shortcuts using +map sn ]s +map sp [s +map sa zg +map s? z= + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Misc +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Remove the Windows ^M - when the encodings gets messed up +noremap m mmHmt:%s///ge'tzt'm + +" Quickly open a buffer for scribble +map q :e ~/buffer + +" Quickly open a markdown buffer for scribble +map x :e ~/buffer.md + +" Toggle paste mode on and off +map pp :setlocal paste! + + + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Helper functions +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +function! CmdLine(str) + exe "menu Foo.Bar :" . a:str + emenu Foo.Bar + unmenu Foo +endfunction + +function! VisualSelection(direction, extra_filter) range + let l:saved_reg = @" + execute "normal! vgvy" + + let l:pattern = escape(@", '\\/.*$^~[]') + let l:pattern = substitute(l:pattern, "\n$", "", "") + + if a:direction == 'gv' + call CmdLine("Ag \"" . l:pattern . "\" " ) + elseif a:direction == 'replace' + call CmdLine("%s" . '/'. l:pattern . '/') + endif + + let @/ = l:pattern + let @" = l:saved_reg +endfunction + + +" Returns true if paste mode is enabled +function! HasPaste() + if &paste + return 'PASTE MODE ' + endif + return '' +endfunction + +" Don't close window, when deleting a buffer +command! Bclose call BufcloseCloseIt() +function! BufcloseCloseIt() + let l:currentBufNum = bufnr("%") + let l:alternateBufNum = bufnr("#") + + if buflisted(l:alternateBufNum) + buffer # + else + bnext + endif + + if bufnr("%") == l:currentBufNum + new + endif + + if buflisted(l:currentBufNum) + execute("bdelete! ".l:currentBufNum) + endif +endfunction + +" Make VIM remember position in file after reopen +" if has("autocmd") +" au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif +"endif diff --git a/.wgetrc b/.wgetrc deleted file mode 100644 index eb531a17211..00000000000 --- a/.wgetrc +++ /dev/null @@ -1,38 +0,0 @@ -# Use the server-provided last modification date, if available -timestamping = on - -# Do not go up in the directory structure when downloading recursively -no_parent = on - -# Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect and read. (The default read timeout is 15 minutes!) -timeout = 60 - -# Retry a few times when a download fails, but don’t overdo it. (The default is 20!) -tries = 3 - -# Retry even when the connection was refused -retry_connrefused = on - -# Use the last component of a redirection URL for the local file name -trust_server_names = on - -# Follow FTP links from HTML documents by default -follow_ftp = on - -# 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 -adjust_extension = on - -# Use UTF-8 as the default system encoding -# Disabled as it makes `wget` builds that don’t support this feature unusable. -# Does anyone know how to conditionally configure a wget setting? -# http://unix.stackexchange.com/q/34730/6040 -#local_encoding = UTF-8 - -# Ignore `robots.txt` and `` -robots = off - -# Print the HTTP and FTP server responses -server_response = on - -# Disguise as IE 9 on Windows 7 -user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) diff --git a/LICENSE-MIT.txt b/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7ef97..00000000000 --- a/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 2ea5597dfd8..f542be3067d 100644 --- a/README.md +++ b/README.md @@ -1,110 +1,5 @@ -# Mathias’s dotfiles +# Igor's dotfiles -![Screenshot of my shell prompt](https://i.imgur.com/EkEtphC.png) +Forked from Mathias Bynens' excellent repo! -## Installation - -**Warning:** If you want to give these dotfiles a try, you should first fork this repository, review the code, and remove things you don’t want or need. Don’t blindly use my settings unless you know what that entails. Use at your own risk! - -### Using Git and the bootstrap script - -You can clone the repository wherever you want. (I like to keep it in `~/Projects/dotfiles`, with `~/dotfiles` as a symlink.) The bootstrapper script will pull in the latest version and copy the files to your home folder. - -```bash -git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && source bootstrap.sh -``` - -To update, `cd` into your local `dotfiles` repository and then: - -```bash -source bootstrap.sh -``` - -Alternatively, to update while avoiding the confirmation prompt: - -```bash -set -- -f; source bootstrap.sh -``` - -### Git-free install - -To install these dotfiles without Git: - -```bash -cd; curl -#L https://github.com/mathiasbynens/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh,.osx,LICENSE-MIT.txt} -``` - -To update later on, just run that command again. - -### Specify the `$PATH` - -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/mathiasbynens/dotfiles/blob/aff769fd75225d8f2e481185a71d5e05b76002dc/.aliases#L21-26)) takes place. - -Here’s an example `~/.path` file that adds `/usr/local/bin` to the `$PATH`: - -```bash -export PATH="/usr/local/bin:$PATH" -``` - -### Add custom commands without creating a new fork - -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. - -My `~/.extra` looks something like this: - -```bash -# Git credentials -# Not in the repository, to prevent people from accidentally committing under my name -GIT_AUTHOR_NAME="Mathias Bynens" -GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" -git config --global user.name "$GIT_AUTHOR_NAME" -GIT_AUTHOR_EMAIL="mathias@mailinator.com" -GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" -git config --global user.email "$GIT_AUTHOR_EMAIL" -``` - -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/mathiasbynens/dotfiles/fork) instead, though. - -### Sensible macOS defaults - -When setting up a new Mac, you may want to set some sensible macOS defaults: - -```bash -./.macos -``` - -### Install Homebrew formulae - -When setting up a new Mac, you may want to install some common [Homebrew](http://brew.sh/) formulae (after installing Homebrew, of course): - -```bash -./brew.sh -``` - -## Feedback - -Suggestions/improvements -[welcome](https://github.com/mathiasbynens/dotfiles/issues)! - -## Author - -| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## Thanks to… - -* @ptb and [his _OS X Lion Setup_ repository](https://github.com/ptb/Mac-OS-X-Lion-Setup) -* [Ben Alman](http://benalman.com/) and his [dotfiles repository](https://github.com/cowboy/dotfiles) -* [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) -* [Cătălin Mariș](https://github.com/alrra) and his [dotfiles repository](https://github.com/alrra/dotfiles) -* [Gianni Chiappetta](http://gf3.ca/) for sharing his [amazing collection of dotfiles](https://github.com/gf3/dotfiles) -* [Jan Moesen](http://jan.moesen.nu/) and his [ancient `.bash_profile`](https://gist.github.com/1156154) + [shiny _tilde_ repository](https://github.com/janmoesen/tilde) -* [Lauri ‘Lri’ Ranta](http://lri.me/) for sharing [loads of hidden preferences](http://osxnotes.net/defaults.html) -* [Matijs Brinkhuis](http://hotfusion.nl/) and his [dotfiles repository](https://github.com/matijs/dotfiles) -* [Nicolas Gallagher](http://nicolasgallagher.com/) and his [dotfiles repository](https://github.com/necolas/dotfiles) -* [Sindre Sorhus](http://sindresorhus.com/) -* [Tom Ryder](http://blog.sanctum.geek.nz/) and his [dotfiles repository](https://github.com/tejr/dotfiles) -* [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 [`~/.macos`](https://mths.be/macos) -* [Haralan Dobrev](http://hkdobrev.com/) -* anyone who [contributed a patch](https://github.com/mathiasbynens/dotfiles/contributors) or [made a helpful suggestion](https://github.com/mathiasbynens/dotfiles/issues) +https://github.com/mathiasbynens/dotfiles.git diff --git a/bin/subl b/bin/subl deleted file mode 120000 index 0170a200254..00000000000 --- a/bin/subl +++ /dev/null @@ -1 +0,0 @@ -/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl \ No newline at end of file diff --git a/brew.sh b/brew.sh deleted file mode 100755 index 358bb8c2ad4..00000000000 --- a/brew.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env bash - -# Install command-line tools using Homebrew. - -# Make sure we’re using the latest Homebrew. -brew update - -# Upgrade any already-installed formulae. -brew upgrade --all - -# Install GNU core utilities (those that come with macOS are outdated). -# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`. -brew install coreutils -ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum - -# Install some other useful utilities like `sponge`. -brew install moreutils -# Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed. -brew install findutils -# Install GNU `sed`, overwriting the built-in `sed`. -brew install gnu-sed --with-default-names -# Install Bash 4. -# Note: don’t forget to add `/usr/local/bin/bash` to `/etc/shells` before -# running `chsh`. -brew install bash -brew tap homebrew/versions -brew install bash-completion2 - -# Switch to using brew-installed bash as default shell -if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then - echo '/usr/local/bin/bash' | sudo tee -a /etc/shells; - chsh -s /usr/local/bin/bash; -fi; - -# Install `wget` with IRI support. -brew install wget --with-iri - -# Install RingoJS and Narwhal. -# Note that the order in which these are installed is important; -# see http://git.io/brew-narwhal-ringo. -brew install ringojs -brew install narwhal - -# Install more recent versions of some macOS tools. -brew install vim --override-system-vi -brew install homebrew/dupes/grep -brew install homebrew/dupes/openssh -brew install homebrew/dupes/screen -brew install homebrew/php/php56 --with-gmp - -# Install font tools. -brew tap bramstein/webfonttools -brew install sfnt2woff -brew install sfnt2woff-zopfli -brew install woff2 - -# Install some CTF tools; see https://github.com/ctfs/write-ups. -brew install aircrack-ng -brew install bfg -brew install binutils -brew install binwalk -brew install cifer -brew install dex2jar -brew install dns2tcp -brew install fcrackzip -brew install foremost -brew install hashpump -brew install hydra -brew install john -brew install knock -brew install netpbm -brew install nmap -brew install pngcheck -brew install socat -brew install sqlmap -brew install tcpflow -brew install tcpreplay -brew install tcptrace -brew install ucspi-tcp # `tcpserver` etc. -brew install xpdf -brew install xz - -# Install other useful binaries. -brew install ack -brew install dark-mode -#brew install exiv2 -brew install git -brew install git-lfs -brew install imagemagick --with-webp -brew install lua -brew install lynx -brew install p7zip -brew install pigz -brew install pv -brew install rename -brew install rhino -brew install speedtest_cli -brew install ssh-copy-id -brew install testssl -brew install tree -brew install vbindiff -brew install webkit2png -brew install zopfli - -# Remove outdated versions from the cellar. -brew cleanup diff --git a/init/Preferences.sublime-settings b/init/Preferences.sublime-settings deleted file mode 100644 index 1d190f97d93..00000000000 --- a/init/Preferences.sublime-settings +++ /dev/null @@ -1,41 +0,0 @@ -{ - "color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme", - "default_encoding": "UTF-8", - "default_line_ending": "unix", - "detect_indentation": false, - "draw_white_space": "all", - "ensure_newline_at_eof_on_save": false, - "file_exclude_patterns": - [ - ".DS_Store", - "Desktop.ini", - "*.pyc", - "._*", - "Thumbs.db", - ".Spotlight-V100", - ".Trashes" - ], - "folder_exclude_patterns": - [ - ".git", - "node_modules" - ], - "font_face": "Monaco", - "font_size": 13, - "highlight_modified_tabs": true, - "hot_exit": false, - "line_padding_bottom": 5, - "match_brackets": true, - "match_brackets_angle": true, - "remember_open_files": false, - "rulers": - [ - 80 - ], - "show_encoding": true, - "show_line_endings": true, - "tab_size": 2, - "translate_tabs_to_spaces": false, - "trim_trailing_white_space_on_save": true, - "word_wrap": true -} diff --git a/init/Solarized Dark xterm-256color.terminal b/init/Solarized Dark xterm-256color.terminal deleted file mode 100644 index 46f179d6cd4..00000000000 --- a/init/Solarized Dark xterm-256color.terminal +++ /dev/null @@ -1,160 +0,0 @@ - - - - - BackgroundColor - - YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECgw - LjAxNTkyNDQwNTMxIDAuMTI2NTIwOTE2OCAwLjE1OTY5NjAxMjcAEAGAAtIQERITWiRj - bGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVjdF8QD05TS2V5ZWRBcmNo - aXZlctEXGFRyb290gAEIERojLTI3O0FITltijY+RlqGqsrW+0NPYAAAAAAAAAQEAAAAA - AAAAGQAAAAAAAAAAAAAAAAAAANo= - - BlinkText - - CursorColor - - YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw - LjQ0MDU4MDI0ODggMC41MDk2MjkzMDkyIDAuNTE2ODU3OTgxNwAQAYAC0hAREhNaJGNs - YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp - dmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAA - AAAZAAAAAAAAAAAAAAAAAAAA2Q== - - Font - - YnBsaXN0MDDUAQIDBAUGGBlYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QVk5TU2l6ZVhOU2ZGbGFnc1ZOU05hbWVWJGNs - YXNzI0AqAAAAAAAAEBCAAoADXU1lbmxvLVJlZ3VsYXLSExQVFlokY2xhc3NuYW1lWCRj - bGFzc2VzVk5TRm9udKIVF1hOU09iamVjdF8QD05TS2V5ZWRBcmNoaXZlctEaG1Ryb290 - gAEIERojLTI3PEJLUltiaXJ0dniGi5afpqmyxMfMAAAAAAAAAQEAAAAAAAAAHAAAAAAA - AAAAAAAAAAAAAM4= - - FontAntialias - - FontHeightSpacing - 1.1000000000000001 - FontWidthSpacing - 1 - ProfileCurrentVersion - 2.02 - SelectionColor - - YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECgw - LjAzOTM4MDczNjY1IDAuMTYwMTE2NDYzOSAwLjE5ODMzMjc1NjgAEAGAAtIQERITWiRj - bGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVjdF8QD05TS2V5ZWRBcmNo - aXZlctEXGFRyb290gAEIERojLTI3O0FITltijY+RlqGqsrW+0NPYAAAAAAAAAQEAAAAA - AAAAGQAAAAAAAAAAAAAAAAAAANo= - - ShowWindowSettingsNameInTitle - - TerminalType - xterm-256color - TextBoldColor - - YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECYw - LjUwNTk5MTkzNTcgMC41NjQ4NTgzNzcgMC41NjM2MzY1NDE0ABABgALSEBESE1okY2xh - c3NuYW1lWCRjbGFzc2VzV05TQ29sb3KiEhRYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2 - ZXLRFxhUcm9vdIABCBEaIy0yNztBSE5bYouNj5SfqLCzvM7R1gAAAAAAAAEBAAAAAAAA - ABkAAAAAAAAAAAAAAAAAAADY - - TextColor - - YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw - LjQ0MDU4MDI0ODggMC41MDk2MjkzMDkyIDAuNTE2ODU3OTgxNwAQAYAC0hAREhNaJGNs - YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp - dmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAA - AAAZAAAAAAAAAAAAAAAAAAAA2Q== - - UseBrightBold - - blackColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmg7JNIT2DkvUjPoO+F0s+AYY= - - blueColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmgyqcAj6DtOHsPoO+RUg/AYY= - - brightBlackColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmg+ZzgjyDs44BPoNahyM+AYY= - - brightBlueColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmg7yT4T6DEXcCP4POUAQ/AYY= - - brightCyanColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmg7CIAT+Dj5oQP4N8ShA/AYY= - - brightGreenColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmgzyujT6DFZy2PoOYFsQ+AYY= - - brightMagentaColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmgxMjsj6D+uazPoNkyTc/AYY= - - brightRedColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmgyfkPT+D/15aPoMgl5Y9AYY= - - brightWhiteColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmg49LfT+D0Dt1P4MGM10/AYY= - - brightYellowColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmg1MTpj6DeHnQPoPQg+A+AYY= - - cyanColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmg4VRFj6DfyESP4PkZwY/AYY= - - greenColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmg9lI5j6DIYkKP4PVjKU8AYY= - - magentaColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmg/4CRz+DBTzdPYMgzt4+AYY= - - name - Solarized Dark xterm-256color - redColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmg6i7UT+DUATePYMl2hA+AYY= - - type - Window Settings - whiteColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmgzqGaj+D2tdjP4NYPUw/AYY= - - yellowColour - - BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmg0DAJT+DB17vPoM4Y8A8AYY= - - - diff --git a/init/Solarized Dark.itermcolors b/init/Solarized Dark.itermcolors deleted file mode 100644 index d630a40539f..00000000000 --- a/init/Solarized Dark.itermcolors +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - Ansi 0 Color - - Blue Component - 0.19370138645172119 - Green Component - 0.15575926005840302 - Red Component - 0.0 - - Ansi 1 Color - - Blue Component - 0.14145714044570923 - Green Component - 0.10840655118227005 - Red Component - 0.81926977634429932 - - Ansi 10 Color - - Blue Component - 0.38298487663269043 - Green Component - 0.35665956139564514 - Red Component - 0.27671992778778076 - - Ansi 11 Color - - Blue Component - 0.43850564956665039 - Green Component - 0.40717673301696777 - Red Component - 0.32436618208885193 - - Ansi 12 Color - - Blue Component - 0.51685798168182373 - Green Component - 0.50962930917739868 - Red Component - 0.44058024883270264 - - Ansi 13 Color - - Blue Component - 0.72908437252044678 - Green Component - 0.33896297216415405 - Red Component - 0.34798634052276611 - - Ansi 14 Color - - Blue Component - 0.56363654136657715 - Green Component - 0.56485837697982788 - Red Component - 0.50599193572998047 - - Ansi 15 Color - - Blue Component - 0.86405980587005615 - Green Component - 0.95794391632080078 - Red Component - 0.98943418264389038 - - Ansi 2 Color - - Blue Component - 0.020208755508065224 - Green Component - 0.54115492105484009 - Red Component - 0.44977453351020813 - - Ansi 3 Color - - Blue Component - 0.023484811186790466 - Green Component - 0.46751424670219421 - Red Component - 0.64746475219726562 - - Ansi 4 Color - - Blue Component - 0.78231418132781982 - Green Component - 0.46265947818756104 - Red Component - 0.12754884362220764 - - Ansi 5 Color - - Blue Component - 0.43516635894775391 - Green Component - 0.10802463442087173 - Red Component - 0.77738940715789795 - - Ansi 6 Color - - Blue Component - 0.52502274513244629 - Green Component - 0.57082360982894897 - Red Component - 0.14679534733295441 - - Ansi 7 Color - - Blue Component - 0.79781103134155273 - Green Component - 0.89001238346099854 - Red Component - 0.91611063480377197 - - Ansi 8 Color - - Blue Component - 0.15170273184776306 - Green Component - 0.11783610284328461 - Red Component - 0.0 - - Ansi 9 Color - - Blue Component - 0.073530435562133789 - Green Component - 0.21325300633907318 - Red Component - 0.74176257848739624 - - Background Color - - Blue Component - 0.15170273184776306 - Green Component - 0.11783610284328461 - Red Component - 0.0 - - Bold Color - - Blue Component - 0.56363654136657715 - Green Component - 0.56485837697982788 - Red Component - 0.50599193572998047 - - Cursor Color - - Blue Component - 0.51685798168182373 - Green Component - 0.50962930917739868 - Red Component - 0.44058024883270264 - - Cursor Text Color - - Blue Component - 0.19370138645172119 - Green Component - 0.15575926005840302 - Red Component - 0.0 - - Foreground Color - - Blue Component - 0.51685798168182373 - Green Component - 0.50962930917739868 - Red Component - 0.44058024883270264 - - Selected Text Color - - Blue Component - 0.56363654136657715 - Green Component - 0.56485837697982788 - Red Component - 0.50599193572998047 - - Selection Color - - Blue Component - 0.19370138645172119 - Green Component - 0.15575926005840302 - Red Component - 0.0 - - - From 42c147b9420b4a4c7eb6c8298986c75af45eda1b Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 15 Aug 2016 22:58:25 -0400 Subject: [PATCH 002/141] - Reworked bootstrapper code, needs more work. --- .bash_profile | 4 ---- .bashrc | 1 + bootstrap.sh | 41 ++++++++++++++++++++++++----------------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/.bash_profile b/.bash_profile index bada47616d7..139a0c65b39 100644 --- a/.bash_profile +++ b/.bash_profile @@ -46,7 +46,3 @@ complete -W "NSGlobalDomain" defaults; # Add `killall` tab completion for common apps complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall; - -# OLD - -[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* diff --git a/.bashrc b/.bashrc index 20a05ed2f16..75d6187d884 100644 --- a/.bashrc +++ b/.bashrc @@ -3,3 +3,4 @@ # OLD export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting +[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* \ No newline at end of file diff --git a/bootstrap.sh b/bootstrap.sh index 6844b84a624..7f0c50329a7 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,27 +1,34 @@ #!/usr/bin/env bash -cd "$(dirname "${BASH_SOURCE}")"; - -git pull origin master; +git pull; +# Remove all files that exist in current directory from root and create symlinks to replace them. function doIt() { - rsync --exclude ".git/" \ - --exclude ".DS_Store" \ - --exclude ".osx" \ - --exclude "bootstrap.sh" \ - --exclude "README.md" \ - --exclude "LICENSE-MIT.txt" \ - -avh --no-perms . ~; - source ~/.bash_profile; + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + + cd ~ + + # WARNING: Not ready, needs more work. + # find $DIR -mindepth 1 -maxdepth 2 -type f \( -iname "*" ! -iname ".DS_Store" ! -iname "README.md" ! -iname "bootstrap.sh" \) -not -path "./.git/*" | tail -n +2 | cut -c 3- | while read file; do + # echo "Removing $file from $HOME." + # rm "$file" + # echo "Linking $file from $DIR to $HOME." + # # TODO: Does not create directory for link if it is missing. + # ln -s "$DIR/$file" . + # done + + cd $DIR + + source ~/.bash_profile; } if [ "$1" == "--force" -o "$1" == "-f" ]; then - doIt; + doIt; else - read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1; - echo ""; - if [[ $REPLY =~ ^[Yy]$ ]]; then - doIt; - fi; + read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1; + echo ""; + if [[ $REPLY =~ ^[Yy]$ ]]; then + doIt; + fi; fi; unset doIt; From 3b4d41c65457dc89a1d90d958b29f28d77d262fd Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 19 Aug 2016 15:58:48 -0400 Subject: [PATCH 003/141] - Fixed bootstrap.sh, but currently only links one level deep :( --- bootstrap.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 7f0c50329a7..93940b0d4f7 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -6,18 +6,15 @@ git pull; function doIt() { DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - cd ~ + # Currently only links one level deep :( + find . -mindepth 1 -maxdepth 1 -type f \( -iname "*" ! -iname ".DS_Store" ! -iname "README.md" ! -iname "bootstrap.sh" \) -not -path "./.git/*" | sed 's#.*/##' | while read file; do + echo "Removing $file from $HOME." + rm "$HOME/$file" - # WARNING: Not ready, needs more work. - # find $DIR -mindepth 1 -maxdepth 2 -type f \( -iname "*" ! -iname ".DS_Store" ! -iname "README.md" ! -iname "bootstrap.sh" \) -not -path "./.git/*" | tail -n +2 | cut -c 3- | while read file; do - # echo "Removing $file from $HOME." - # rm "$file" - # echo "Linking $file from $DIR to $HOME." - # # TODO: Does not create directory for link if it is missing. - # ln -s "$DIR/$file" . - # done - - cd $DIR + # TODO: Does not create directory for link if it is missing. + echo "Linking $file from $DIR to $HOME." + ln -s "$DIR/$file" $HOME/. + done source ~/.bash_profile; } From 2ecf7be57aae0bca6d2ef7fb82ea6e86a147d56f Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 19 Aug 2016 20:57:30 -0400 Subject: [PATCH 004/141] - Removed some functions I know I wont use. - Deleted .editorconfig, been causing problems overriding some text editor settings I like. --- .aliases | 3 +-- .editorconfig | 8 -------- .functions | 38 +------------------------------------- 3 files changed, 2 insertions(+), 47 deletions(-) delete mode 100644 .editorconfig diff --git a/.aliases b/.aliases index 63a4cc5580d..4986f18296b 100644 --- a/.aliases +++ b/.aliases @@ -9,8 +9,7 @@ alias ~="cd ~" # `cd` is probably faster to type though alias -- -="cd -" # Shortcuts -alias cddl="cd ~/Downloads" -alias cddt="cd ~/Desktop" +alias cdd="cd ~/Desktop" alias cdp="cd ~/Projects" alias g="git" alias h="history" diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index bec7553240a..00000000000 --- a/.editorconfig +++ /dev/null @@ -1,8 +0,0 @@ -root = true - -[*] -charset = utf-8 -indent_style = tab -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/.functions b/.functions index 249f77cd366..60ad955d2a2 100644 --- a/.functions +++ b/.functions @@ -100,15 +100,6 @@ function dataurl() { echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')"; } -# Create a git.io short URL -function gitio() { - if [ -z "${1}" -o -z "${2}" ]; then - echo "Usage: \`gitio slug url\`"; - return 1; - fi; - curl -i https://git.io/ -F "url=${2}" -F "code=${1}"; -} - # Start an HTTP server from a directory, optionally specifying the port function server() { local port="${1:-8000}"; @@ -142,33 +133,6 @@ function digga() { dig +nocmd "$1" any +multiline +noall +answer; } -# UTF-8-encode a string of Unicode symbols -function escape() { - printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u); - # print a newline unless we’re piping the output to another program - if [ -t 1 ]; then - echo ""; # newline - fi; -} - -# Decode \x{ABCD}-style Unicode escape sequences -function unidecode() { - perl -e "binmode(STDOUT, ':utf8'); print \"$@\""; - # print a newline unless we’re piping the output to another program - if [ -t 1 ]; then - echo ""; # newline - fi; -} - -# Get a character’s Unicode code point -function codepoint() { - perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))"; - # print a newline unless we’re piping the output to another program - if [ -t 1 ]; then - echo ""; # newline - fi; -} - # Show all the names (CNs and SANs) listed in the SSL certificate # for a given domain function getcertnames() { @@ -209,4 +173,4 @@ function getcertnames() { # small enough for one screen. function tre() { tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX; -} \ No newline at end of file +} From abfac2fd55e1a1c8333a5c590548664aafbe5d6a Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 22 Aug 2016 22:53:41 -0400 Subject: [PATCH 005/141] - Added configuration files for all linters. --- .eslintignore | 5 ++ .eslintrc | 215 ++++++++++++++++++++++++++++++++++++++++++++++++++ .htmlhintrc | 22 ++++++ .jshintignore | 5 ++ .jshintrc | 79 +++++++++++++++++++ .stylelintrc | 5 ++ 6 files changed, 331 insertions(+) create mode 100644 .eslintignore create mode 100644 .eslintrc create mode 100644 .htmlhintrc create mode 100644 .jshintignore create mode 100644 .jshintrc create mode 100644 .stylelintrc diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000000..ab0e40f1cf8 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +**/.git/**/* +**/node_modules/**/* +**/components/**/* +**/vendor/**/* +**/dist/**/* \ No newline at end of file diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000000..581e8f24409 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,215 @@ +{ + "env": { + "browser": true, // browser global variables. + "node": true, // Node.js global variables and Node.js-specific rules. + "amd": true, // defines require() and define() as global variables as per the amd spec. + "mocha": true, // adds all of the Mocha testing global variables. + "jasmine": true, // adds all of the Jasmine testing global variables for version 1.3 and 0.0. + "jquery": true // jquery global variables. + }, + + "globals": { + "_": true, + "Backbone": true + }, + + "plugins": [ + + ], + + // Uncomment for ES6 validation. + + // "ecmaFeatures": { + // "binaryLiterals": true, // enable binary literals + // "blockBindings": true, // enable let and const (aka block bindings) + // "defaultParams": true, // enable default function parameters + // "forOf": true, // enable for-of loops + // "generators": true, // enable generators + // "objectLiteralComputedProperties": true, // enable computed object literal property names + // "objectLiteralDuplicateProperties": true, // enable duplicate object literal properties in strict mode + // "objectLiteralShorthandMethods": true, // enable object literal shorthand methods + // "objectLiteralShorthandProperties": true, // enable object literal shorthand properties + // "octalLiterals": true, // enable octal literals + // "regexUFlag": true, // enable the regular expression u flag + // "regexYFlag": true, // enable the regular expression y flag + // "templateStrings": true, // enable template strings + // "unicodeCodePointEscapes": true, // enable code point escapes + // "jsx": true // enable JSX + // }, + + "rules": { + ////////// Possible Errors ////////// + + "no-comma-dangle": 0, // disallow trailing commas in object literals + "no-cond-assign": 0, // disallow assignment in conditional expressions + "no-console": 0, // disallow use of console (off by default in the node environment) + "no-constant-condition": 0, // disallow use of constant expressions in conditions + "no-control-regex": 0, // disallow control characters in regular expressions + "no-debugger": 0, // disallow use of debugger + "no-dupe-keys": 0, // disallow duplicate keys when creating object literals + "no-empty": 0, // disallow empty statements + "no-empty-class": 0, // disallow the use of empty character classes in regular expressions + "no-ex-assign": 0, // disallow assigning to the exception in a catch block + "no-extra-boolean-cast": 0, // disallow double-negation boolean casts in a boolean context + "no-extra-parens": 0, // disallow unnecessary parentheses (off by default) + "no-extra-semi": 0, // disallow unnecessary semicolons + "no-func-assign": 0, // disallow overwriting functions written as function declarations + "no-inner-declarations": 0, // disallow function or variable declarations in nested blocks + "no-invalid-regexp": 0, // disallow invalid regular expression strings in the RegExp constructor + "no-irregular-whitespace": 0, // disallow irregular whitespace outside of strings and comments + "no-negated-in-lhs": 0, // disallow negation of the left operand of an in expression + "no-obj-calls": 0, // disallow the use of object properties of the global object (Math and JSON) as functions + "no-regex-spaces": 0, // disallow multiple spaces in a regular expression literal + "no-reserved-keys": 0, // disallow reserved words being used as object literal keys (off by default) + "no-sparse-arrays": 0, // disallow sparse arrays + "no-unreachable": 0, // disallow unreachable statements after a return, throw, continue, or break statement + "use-isnan": 0, // disallow comparisons with the value NaN + "valid-jsdoc": 0, // Ensure JSDoc comments are valid (off by default) + "valid-typeof": 0, // Ensure that the results of typeof are compared against a valid string + + + ////////// Best Practices ////////// + + "block-scoped-var": 0, // treat var statements as if they were block scoped (off by default) + "complexity": 0, // specify the maximum cyclomatic complexity allowed in a program (off by default) + "consistent-return": 0, // require return statements to either always or never specify values + "curly": 0, // specify curly brace conventions for all control statements + "default-case": 0, // require default case in switch statements (off by default) + "dot-notation": 0, // encourages use of dot notation whenever possible + "eqeqeq": 0, // require the use of === and !== + "guard-for-in": 0, // make sure for-in loops have an if statement (off by default) + "no-alert": 0, // disallow the use of alert, confirm, and prompt + "no-caller": 0, // disallow use of arguments.caller or arguments.callee + "no-div-regex": 0, // disallow division operators explicitly at beginning of regular expression (off by default) + "no-else-return": 0, // disallow else after a return in an if (off by default) + "no-empty-label": 0, // disallow use of labels for anything other then loops and switches + "no-eq-null": 0, // disallow comparisons to null without a type-checking operator (off by default) + "no-eval": 0, // disallow use of eval() + "no-extend-native": 0, // disallow adding to native types + "no-extra-bind": 0, // disallow unnecessary function binding + "no-fallthrough": 0, // disallow fallthrough of case statements + "no-floating-decimal": 0, // disallow the use of leading or trailing decimal points in numeric literals (off by default) + "no-implied-eval": 0, // disallow use of eval()-like methods + "no-iterator": 0, // disallow usage of __iterator__ property + "no-labels": 0, // disallow use of labeled statements + "no-lone-blocks": 0, // disallow unnecessary nested blocks + "no-loop-func": 0, // disallow creation of functions within loops + "no-multi-spaces": 0, // disallow use of multiple spaces + "no-multi-str": 0, // disallow use of multiline strings + "no-native-reassign": 0, // disallow reassignments of native objects + "no-new": 0, // disallow use of new operator when not part of the assignment or comparison + "no-new-func": 0, // disallow use of new operator for Function object + "no-new-wrappers": 0, // disallows creating new instances of String, Number, and Boolean + "no-octal": 0, // disallow use of octal literals + "no-octal-escape": 0, // disallow use of octal escape sequences in string literals, such as var foo = "Copyright \051"; + "no-process-env": 0, // disallow use of process.env (off by default) + "no-proto": 0, // disallow usage of __proto__ property + "no-redeclare": 0, // disallow declaring the same variable more then once + "no-return-assign": 0, // disallow use of assignment in return statement + "no-script-url": 0, // disallow use of javascript: urls. + "no-self-compare": 0, // disallow comparisons where both sides are exactly the same (off by default) + "no-sequences": 0, // disallow use of comma operator + "no-unused-expressions": 0, // disallow usage of expressions in statement position + "no-void": 0, // disallow use of void operator (off by default) + "no-warning-comments": 0, // disallow usage of configurable warning terms in comments, e.g. TODO or FIXME (off by default) + "no-with": 0, // disallow use of the with statement + "radix": 0, // require use of the second argument for parseInt() (off by default) + "vars-on-top": 0, // requires to declare all vars on top of their containing scope (off by default) + "wrap-iife": 0, // require immediate function invocation to be wrapped in parentheses (off by default) + "yoda": 0, // require or disallow Yoda conditions + + + ////////// Strict Mode ////////// + + "global-strict": 0, // (deprecated) require or disallow the "use strict" pragma in the global scope (off by default in the node environment) + "no-extra-strict": 0, // (deprecated) disallow unnecessary use of "use strict"; when already in strict mode + "strict": 0, // controls location of Use Strict Directives + + + ////////// Variables ////////// + + "no-catch-shadow": 0, // disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment) + "no-delete-var": 0, // disallow deletion of variables + "no-label-var": 0, // disallow labels that share a name with a variable + "no-shadow": 0, // disallow declaration of variables already declared in the outer scope + "no-shadow-restricted-names": 0, // disallow shadowing of names such as arguments + "no-undef": 0, // disallow use of undeclared variables unless mentioned in a /*global */ block + "no-undef-init": 0, // disallow use of undefined when initializing variables + "no-undefined": 0, // disallow use of undefined variable (off by default) + "no-unused-vars": 0, // disallow declaration of variables that are not used in the code + "no-use-before-define": 0, // disallow use of variables before they are defined + + + ////////// Node.js ////////// + + "handle-callback-err": 0, // enforces error handling in callbacks (off by default) (on by default in the node environment) + "no-mixed-requires": 0, // disallow mixing regular variable and require declarations (off by default) (on by default in the node environment) + "no-new-require": 0, // disallow use of new operator with the require function (off by default) (on by default in the node environment) + "no-path-concat": 0, // disallow string concatenation with __dirname and __filename (off by default) (on by default in the node environment) + "no-process-exit": 0, // disallow process.exit() (on by default in the node environment) + "no-restricted-modules": 0, // restrict usage of specified node modules (off by default) + "no-sync": 0, // disallow use of synchronous methods (off by default) + + + ////////// Stylistic Issues ////////// + + "brace-style": 0, // enforce one true brace style (off by default) + "camelcase": 0, // require camel case names + "comma-spacing": 0, // enforce spacing before and after comma + "comma-style": 0, // enforce one true comma style (off by default) + "consistent-this": 0, // enforces consistent naming when capturing the current execution context (off by default) + "eol-last": 0, // enforce newline at the end of file, with no multiple empty lines + "func-names": 0, // require function expressions to have a name (off by default) + "func-style": 0, // enforces use of function declarations or expressions (off by default) + "key-spacing": 0, // enforces spacing between keys and values in object literal properties + "max-nested-callbacks": 0, // specify the maximum depth callbacks can be nested (off by default) + "new-cap": 0, // require a capital letter for constructors + "new-parens": 0, // disallow the omission of parentheses when invoking a constructor with no arguments + "no-array-constructor": 0, // disallow use of the Array constructor + "no-inline-comments": 0, // disallow comments inline after code (off by default) + "no-lonely-if": 0, // disallow if as the only statement in an else block (off by default) + "no-mixed-spaces-and-tabs": 0, // disallow mixed spaces and tabs for indentation + "no-multiple-empty-lines": 0, // disallow multiple empty lines (off by default) + "no-nested-ternary": 0, // disallow nested ternary expressions (off by default) + "no-new-object": 0, // disallow use of the Object constructor + "no-space-before-semi": 0, // disallow space before semicolon + "no-spaced-func": 0, // disallow space between function identifier and application + "no-ternary": 0, // disallow the use of ternary operators (off by default) + "no-trailing-spaces": 0, // disallow trailing whitespace at the end of lines + "no-underscore-dangle": 0, // disallow dangling underscores in identifiers + "no-wrap-func": 0, // disallow wrapping of non-IIFE statements in parens + "one-var": 0, // allow just one var statement per function (off by default) + "operator-assignment": 0, // require assignment operator shorthand where possible or prohibit it entirely (off by default) + "padded-blocks": 0, // enforce padding within blocks (off by default) + "quote-props": 0, // require quotes around object literal property names (off by default) + "quotes": 0, // specify whether double or single quotes should be used + "semi": 0, // require or disallow use of semicolons instead of ASI + "sort-vars": 0, // sort variables within the same declaration block (off by default) + "space-after-function-name": 0, // require a space after function names (off by default) + "space-after-keywords": 0, // require a space after certain keywords (off by default) + "space-before-blocks": 0, // require or disallow space before blocks (off by default) + "space-in-brackets": 0, // require or disallow spaces inside brackets (off by default) + "space-in-parens": 0, // require or disallow spaces inside parentheses (off by default) + "space-infix-ops": 0, // require spaces around operators + "space-return-throw-case": 0, // require a space after return, throw, and case + "space-unary-ops": 0, // Require or disallow spaces before/after unary operators (words on by default, nonwords off by default) + "spaced-line-comment": 0, // require or disallow a space immediately following the // in a line comment (off by default) + "wrap-regex": 0, // require regex literals to be wrapped in parentheses (off by default) + + + ////////// ECMAScript 6 ////////// + + "no-var": 0, // require let or const instead of var (off by default) + "generator-star": 0, // enforce the position of the * in generator functions (off by default) + + + ////////// Legacy ////////// + + "max-depth": 0, // specify the maximum depth that blocks can be nested (off by default) + "max-len": 0, // specify the maximum length of a line in your program (off by default) + "max-params": 0, // limits the number of parameters that can be used in the function declaration. (off by default) + "max-statements": 0, // specify the maximum number of statement allowed in a function (off by default) + "no-bitwise": 0, // disallow use of bitwise operators (off by default) + "no-plusplus": 0 // disallow use of unary operators, ++ and -- (off by default) + } +} \ No newline at end of file diff --git a/.htmlhintrc b/.htmlhintrc new file mode 100644 index 00000000000..a26fd777e92 --- /dev/null +++ b/.htmlhintrc @@ -0,0 +1,22 @@ +{ + "tagname-lowercase": true, + "attr-lowercase": true, + "attr-value-double-quotes": true, + "attr-value-not-empty": true, + "attr-no-duplication": true, + "doctype-first": true, + "tag-pair": true, + "tag-self-close": true, + "spec-char-escape": true, + "id-unique": true, + "src-not-empty": true, + "head-script-disabled": true, + "alt-require": true, + "doctype-html5": true, + "id-class-value": true, + "style-disabled": true, + "space-tab-mixed-disabled": true, + "id-class-ad-disabled": true, + "href-abs-or-rel": true, + "attr-unsafe-chars": true +} \ No newline at end of file diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 00000000000..ab0e40f1cf8 --- /dev/null +++ b/.jshintignore @@ -0,0 +1,5 @@ +**/.git/**/* +**/node_modules/**/* +**/components/**/* +**/vendor/**/* +**/dist/**/* \ No newline at end of file diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 00000000000..41d04b0c892 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,79 @@ +{ + // JSHint Default Configuration File (as on JSHint website) + // See http://jshint.com/docs/ for more details + + "maxerr" : 50, // {int} Maximum error before stopping + + // Enforcing + "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) + "camelcase" : false, // true: Identifiers must be in camelCase + "curly" : true, // true: Require {} for every new block or scope + "eqeqeq" : true, // true: Require triple equals (===) for comparison + "forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty() + "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc. + "immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` + "latedef" : false, // true: Require variables/functions to be defined before being used + "newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()` + "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` + "noempty" : true, // true: Prohibit use of empty blocks + "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters. + "nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment) + "plusplus" : false, // true: Prohibit use of `++` and `--` + "quotmark" : false, // Quotation mark consistency: + // false : do nothing (default) + // true : ensure whatever is used is consistent + // "single" : require single quotes + // "double" : require double quotes + "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) + "unused" : true, // Unused variables: + // true : all variables, last function parameter + // "vars" : all variables only + // "strict" : all variables, all function parameters + "strict" : true, // true: Requires all functions run in ES5 Strict Mode + "maxparams" : false, // {int} Max number of formal params allowed per function + "maxdepth" : false, // {int} Max depth of nested blocks (within functions) + "maxstatements" : false, // {int} Max number statements per function + "maxcomplexity" : false, // {int} Max cyclomatic complexity per function + "maxlen" : false, // {int} Max number of characters per line + "varstmt" : false, // true: Disallow any var statements. Only `let` and `const` are allowed. + + // Relaxing + "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons) + "boss" : false, // true: Tolerate assignments where comparisons would be expected + "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. + "eqnull" : false, // true: Tolerate use of `== null` + "esversion" : 5, // {int} Specify the ECMAScript version to which the code must adhere. + "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) + // (ex: `for each`, multiple try/catch, function expression…) + "evil" : false, // true: Tolerate use of `eval` and `new Function()` + "expr" : false, // true: Tolerate `ExpressionStatement` as Programs + "funcscope" : false, // true: Tolerate defining variables inside control statements + "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') + "iterator" : false, // true: Tolerate using the `__iterator__` property + "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block + "laxbreak" : false, // true: Tolerate possibly unsafe line breakings + "laxcomma" : false, // true: Tolerate comma-first style coding + "loopfunc" : false, // true: Tolerate functions being defined in loops + "multistr" : false, // true: Tolerate multi-line strings + "noyield" : false, // true: Tolerate generator functions with no yield statement in them. + "notypeof" : false, // true: Tolerate invalid typeof operator values + "proto" : false, // true: Tolerate using the `__proto__` property + "scripturl" : false, // true: Tolerate script-targeted URLs + "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` + "sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation + "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;` + "validthis" : false, // true: Tolerate using this in a non-constructor function + + // Environments + "browser" : true, // Web Browser (window, document, etc) + "browserify" : false, // Browserify (node.js code in the browser) + "devel" : true, // Development/debugging (alert, confirm, etc) + "jasmine" : false, // Jasmine + "jquery" : false, // jQuery + "mocha" : true, // Mocha + "node" : false, // Node.js + "worker" : false, // Web Workers + + // Custom Globals + "globals" : {} // additional predefined global variables +} \ No newline at end of file diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 00000000000..e7b556a35bc --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,5 @@ +{ + "rules": { + "block-no-single-line": true + } +} \ No newline at end of file From a31777d1f4d801102513a6210505514ee2d3c56d Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 23 Aug 2016 08:52:24 -0400 Subject: [PATCH 006/141] - Added all rules to .stylelintrc, currently commented out until correctly implemented. - Added additional logical .gitignore folders. - Updated README with TODOs. --- .gitignore | 5 ++ .stylelintrc | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++ 3 files changed, 164 insertions(+) diff --git a/.gitignore b/.gitignore index bf0573b9cdc..63101a7715b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ +# Git +**/.git + # Static files **/node_modules +**/components +**/dist # Python **/*.pyc diff --git a/.stylelintrc b/.stylelintrc index e7b556a35bc..badaf8a63f2 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,5 +1,160 @@ { "rules": { "block-no-single-line": true + // "at-rule-blacklist": string|[], + // "at-rule-empty-line-before": "always"|"never", + // "at-rule-name-case": "lower"|"upper", + // "at-rule-name-newline-after": "always"|"always-multi-line", + // "at-rule-name-space-after": "always"|"always-single-line", + // "at-rule-no-unknown": true, + // "at-rule-no-vendor-prefix": true, + // "at-rule-semicolon-newline-after": "always", + // "at-rule-whitelist": string|[], + // "block-closing-brace-newline-after": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", + // "block-closing-brace-newline-before": "always"|"always-multi-line"|"never-multi-line", + // "block-closing-brace-space-after": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", + // "block-closing-brace-space-before": "always"|"never"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", + // "block-no-empty": true, + // "block-no-single-line": true, + // "block-opening-brace-newline-after": "always"|"always-multi-line"|"never-multi-line", + // "block-opening-brace-newline-before": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", + // "block-opening-brace-space-after": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", + // "block-opening-brace-space-before": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", + // "color-hex-case": "lower"|"upper", + // "color-hex-length": "short"|"long", + // "color-named": "always-where-possible"|"never", + // "color-no-hex": true, + // "color-no-invalid-hex": true, + // "comment-empty-line-before": "always"|"never", + // "comment-whitespace-inside": "always"|"never", + // "comment-word-blacklist": string|[], + // "custom-media-pattern": string, + // "custom-property-no-outside-root": true, + // "custom-property-pattern": string, + // "declaration-bang-space-after": "always"|"never", + // "declaration-bang-space-before": "always"|"never", + // "declaration-block-no-duplicate-properties": true, + // "declaration-block-no-ignored-properties": true, + // "declaration-block-no-shorthand-property-overrides": true, + // "declaration-block-properties-order": "alphabetical"|[], + // "declaration-block-semicolon-newline-after": "always"|"always-multi-line"|"never-multi-line", + // "declaration-block-semicolon-newline-before": "always"|"always-multi-line"|"never-multi-line", + // "declaration-block-semicolon-space-after": "always"|"never"|"always-single-line"|"never-single-line", + // "declaration-block-semicolon-space-before": "always"|"never"|"always-single-line"|"never-single-line", + // "declaration-block-single-line-max-declarations": int, + // "declaration-block-trailing-semicolon": "always"|"never", + // "declaration-colon-newline-after": "always"|"always-multi-line", + // "declaration-colon-space-after": "always"|"never"|"always-single-line", + // "declaration-colon-space-before": "always"|"never", + // "declaration-no-important": true, + // "declaration-property-unit-blacklist": {}, + // "declaration-property-unit-whitelist": {}, + // "declaration-property-value-blacklist": {}, + // "declaration-property-value-whitelist": {}, + // "font-family-name-quotes": "always-where-required"|"always-where-recommended"|"always-unless-keyword", + // "font-weight-notation": "numeric"|"named", + // "function-blacklist": string|[], + // "function-calc-no-unspaced-operator": true, + // "function-comma-newline-after": "always"|"always-multi-line"|"never-multi-line", + // "function-comma-newline-before": "always"|"always-multi-line"|"never-multi-line", + // "function-comma-space-after": "always"|"never"|"always-single-line"|"never-single-line", + // "function-comma-space-before": "always"|"never"|"always-single-line"|"never-single-line", + // "function-linear-gradient-no-nonstandard-direction": true, + // "function-max-empty-lines": int, + // "function-name-case": "lower"|"upper", + // "function-parentheses-newline-inside": "always"|"always-multi-line"|"never-multi-line", + // "function-parentheses-space-inside": "always"|"never"|"always-single-line"|"never-single-line", + // "function-url-data-uris": "always"|"never", + // "function-url-no-scheme-relative": true, + // "function-url-quotes": "always"|"never", + // "function-whitelist": string|[], + // "function-whitespace-after": "always"|"never", + // "indentation": int|"tab", + // "keyframe-declaration-no-important": true, + // "length-zero-no-unit": true, + // "max-empty-lines": int, + // "max-line-length": int, + // "max-nesting-depth": int, + // "media-feature-colon-space-after": "always"|"never", + // "media-feature-colon-space-before": "always"|"never", + // "media-feature-name-no-vendor-prefix": true, + // "media-feature-no-missing-punctuation": true, + // "media-feature-parentheses-space-inside": "always"|"never", + // "media-feature-range-operator-space-after": "always"|"never", + // "media-feature-range-operator-space-before": "always"|"never", + // "media-query-list-comma-newline-after": "always"|"always-multi-line"|"never-multi-line", + // "media-query-list-comma-newline-before": "always"|"always-multi-line"|"never-multi-line", + // "media-query-list-comma-space-after": "always"|"never"|"always-single-line"|"never-single-line", + // "media-query-list-comma-space-before": "always"|"never"|"always-single-line"|"never-single-line", + // "no-browser-hacks": true, + // "no-descending-specificity": true, + // "no-duplicate-selectors": true, + // "no-empty-source": true, + // "no-eol-whitespace": true, + // "no-extra-semicolons": true, + // "no-indistinguishable-colors": true, + // "no-invalid-double-slash-comments": true, + // "no-missing-end-of-source-newline": true, + // "no-unknown-animations": true, + // "no-unsupported-browser-features": true, + // "number-leading-zero": "always"|"never", + // "number-max-precision": int, + // "number-no-trailing-zeros": true, + // "property-blacklist": string|[], + // "property-case": "lower"|"upper", + // "property-no-unknown": true, + // "property-no-vendor-prefix": true, + // "property-whitelist": string|[], + // "root-no-standard-properties": true, + // "rule-nested-empty-line-before": "always"|"never", + // "rule-non-nested-empty-line-before": "always"|"never", + // "selector-attribute-brackets-space-inside": "always"|"never", + // "selector-attribute-operator-blacklist": string|[], + // "selector-attribute-operator-space-after": "always"|"never", + // "selector-attribute-operator-space-before": "always"|"never", + // "selector-attribute-operator-whitelist": string|[], + // "selector-attribute-quotes": "always"|"never", + // "selector-class-pattern": string, + // "selector-combinator-space-after": "always"|"never", + // "selector-combinator-space-before": "always"|"never", + // "selector-id-pattern": string, + // "selector-list-comma-newline-after": "always"|"always-multi-line"|"never-multi-line", + // "selector-list-comma-newline-before": "always"|"always-multi-line"|"never-multi-line", + // "selector-list-comma-space-after": "always"|"never"|"always-single-line"|"never-single-line", + // "selector-list-comma-space-before": "always"|"never"|"always-single-line"|"never-single-line", + // "selector-max-empty-lines": int, + // "selector-max-compound-selectors": int, + // "selector-max-specificity": string, + // "selector-no-attribute": true, + // "selector-no-combinator": true, + // "selector-no-id": true, + // "selector-no-qualifying-type": true, + // "selector-no-type": true, + // "selector-no-universal": true, + // "selector-no-vendor-prefix": true, + // "selector-pseudo-class-case": "lower"|"upper", + // "selector-pseudo-class-no-unknown": true, + // "selector-pseudo-class-parentheses-space-inside": "always"|"never", + // "selector-pseudo-element-case": "lower"|"upper", + // "selector-pseudo-element-colon-notation": "single"|"double", + // "selector-pseudo-element-no-unknown": true, + // "selector-root-no-composition": true, + // "selector-type-case": "lower"|"upper", + // "selector-type-no-unknown": true, + // "shorthand-property-no-redundant-values": true, + // "string-no-newline": true, + // "string-quotes": "single"|"double", + // "stylelint-disable-reason": "always-before"|"always-after", + // "time-no-imperceptible": true, + // "unit-blacklist": string|[], + // "unit-case": "lower"|"upper", + // "unit-no-unknown": true, + // "unit-whitelist": string|[], + // "value-keyword-case": "lower"|"upper", + // "value-list-comma-newline-after": "always"|"always-multi-line"|"never-multi-line", + // "value-list-comma-newline-before": "always"|"always-multi-line"|"never-multi-line", + // "value-list-comma-space-after": "always"|"never"|"always-single-line"|"never-single-line", + // "value-list-comma-space-before": "always"|"never"|"always-single-line"|"never-single-line", + // "value-no-vendor-prefix": true } } \ No newline at end of file diff --git a/README.md b/README.md index f542be3067d..8369c06f086 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,7 @@ Forked from Mathias Bynens' excellent repo! https://github.com/mathiasbynens/dotfiles.git + +## TODOs + +* Bootstrap.sh - Implement symlink creation of files nested in folders (currently only creates links one level deep, in the root). From 949a571dc302f039390d0e1757eb4777753985c7 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 23 Aug 2016 22:03:12 -0400 Subject: [PATCH 007/141] - Fully configured ESLint rules, just need to be road tested. - Removed commented stlyelint rules, breaking extension. --- .eslintrc | 252 +++++++++++++++++++++++++++------------------------ .jshintrc | 17 ++-- .stylelintrc | 155 ------------------------------- 3 files changed, 144 insertions(+), 280 deletions(-) diff --git a/.eslintrc b/.eslintrc index 581e8f24409..0f0171855c6 100644 --- a/.eslintrc +++ b/.eslintrc @@ -40,49 +40,46 @@ "rules": { ////////// Possible Errors ////////// - "no-comma-dangle": 0, // disallow trailing commas in object literals - "no-cond-assign": 0, // disallow assignment in conditional expressions - "no-console": 0, // disallow use of console (off by default in the node environment) - "no-constant-condition": 0, // disallow use of constant expressions in conditions - "no-control-regex": 0, // disallow control characters in regular expressions - "no-debugger": 0, // disallow use of debugger - "no-dupe-keys": 0, // disallow duplicate keys when creating object literals - "no-empty": 0, // disallow empty statements - "no-empty-class": 0, // disallow the use of empty character classes in regular expressions - "no-ex-assign": 0, // disallow assigning to the exception in a catch block - "no-extra-boolean-cast": 0, // disallow double-negation boolean casts in a boolean context - "no-extra-parens": 0, // disallow unnecessary parentheses (off by default) - "no-extra-semi": 0, // disallow unnecessary semicolons - "no-func-assign": 0, // disallow overwriting functions written as function declarations - "no-inner-declarations": 0, // disallow function or variable declarations in nested blocks - "no-invalid-regexp": 0, // disallow invalid regular expression strings in the RegExp constructor - "no-irregular-whitespace": 0, // disallow irregular whitespace outside of strings and comments - "no-negated-in-lhs": 0, // disallow negation of the left operand of an in expression - "no-obj-calls": 0, // disallow the use of object properties of the global object (Math and JSON) as functions - "no-regex-spaces": 0, // disallow multiple spaces in a regular expression literal - "no-reserved-keys": 0, // disallow reserved words being used as object literal keys (off by default) - "no-sparse-arrays": 0, // disallow sparse arrays - "no-unreachable": 0, // disallow unreachable statements after a return, throw, continue, or break statement - "use-isnan": 0, // disallow comparisons with the value NaN - "valid-jsdoc": 0, // Ensure JSDoc comments are valid (off by default) - "valid-typeof": 0, // Ensure that the results of typeof are compared against a valid string + "no-cond-assign": 2, // disallow assignment in conditional expressions + "no-console": 0, // disallow use of console (off by default in the node environment) + "no-constant-condition": 2, // disallow use of constant expressions in conditions + "no-control-regex": 1, // disallow control characters in regular expressions + "no-debugger": 0, // disallow use of debugger + "no-dupe-keys": 2, // disallow duplicate keys when creating object literals + "no-empty": 2, // disallow empty statements + "no-ex-assign": 1, // disallow assigning to the exception in a catch block + "no-extra-boolean-cast": 2, // disallow double-negation boolean casts in a boolean context + "no-extra-parens": [1, "all"], // disallow unnecessary parentheses (off by default) + "no-extra-semi": 2, // disallow unnecessary semicolons + "no-func-assign": 2, // disallow overwriting functions written as function declarations + "no-inner-declarations": 2, // disallow function or variable declarations in nested blocks + "no-invalid-regexp": 2, // disallow invalid regular expression strings in the RegExp constructor + "no-irregular-whitespace": 2, // disallow irregular whitespace outside of strings and comments + "no-unsafe-negation": 2, // disallow negation of the left operand of an in expression + "no-obj-calls": 2, // disallow the use of object properties of the global object (Math and JSON) as functions + "no-regex-spaces": 1, // disallow multiple spaces in a regular expression literal + "quote-props": [1, "as-needed"],// disallow reserved words being used as object literal keys (off by default) + "no-sparse-arrays": 2, // disallow sparse arrays + "no-unreachable": 2, // disallow unreachable statements after a return, throw, continue, or break statement + "use-isnan": 2, // disallow comparisons with the value NaN + "valid-jsdoc": 1, // Ensure JSDoc comments are valid (off by default) + "valid-typeof": 2, // Ensure that the results of typeof are compared against a valid string ////////// Best Practices ////////// - "block-scoped-var": 0, // treat var statements as if they were block scoped (off by default) + "block-scoped-var": 1, // treat var statements as if they were block scoped (off by default) "complexity": 0, // specify the maximum cyclomatic complexity allowed in a program (off by default) - "consistent-return": 0, // require return statements to either always or never specify values - "curly": 0, // specify curly brace conventions for all control statements - "default-case": 0, // require default case in switch statements (off by default) - "dot-notation": 0, // encourages use of dot notation whenever possible - "eqeqeq": 0, // require the use of === and !== + "consistent-return": 2, // require return statements to either always or never specify values + "curly": [1, "all"], // specify curly brace conventions for all control statements + "default-case": 2, // require default case in switch statements (off by default) + "dot-notation": 1, // encourages use of dot notation whenever possible + "eqeqeq": 1, // require the use of === and !== "guard-for-in": 0, // make sure for-in loops have an if statement (off by default) "no-alert": 0, // disallow the use of alert, confirm, and prompt "no-caller": 0, // disallow use of arguments.caller or arguments.callee - "no-div-regex": 0, // disallow division operators explicitly at beginning of regular expression (off by default) - "no-else-return": 0, // disallow else after a return in an if (off by default) - "no-empty-label": 0, // disallow use of labels for anything other then loops and switches + "no-div-regex": 1, // disallow division operators explicitly at beginning of regular expression (off by default) + "no-else-return": 1, // disallow else after a return in an if (off by default) "no-eq-null": 0, // disallow comparisons to null without a type-checking operator (off by default) "no-eval": 0, // disallow use of eval() "no-extend-native": 0, // disallow adding to native types @@ -91,116 +88,135 @@ "no-floating-decimal": 0, // disallow the use of leading or trailing decimal points in numeric literals (off by default) "no-implied-eval": 0, // disallow use of eval()-like methods "no-iterator": 0, // disallow usage of __iterator__ property - "no-labels": 0, // disallow use of labeled statements - "no-lone-blocks": 0, // disallow unnecessary nested blocks - "no-loop-func": 0, // disallow creation of functions within loops - "no-multi-spaces": 0, // disallow use of multiple spaces - "no-multi-str": 0, // disallow use of multiline strings - "no-native-reassign": 0, // disallow reassignments of native objects - "no-new": 0, // disallow use of new operator when not part of the assignment or comparison - "no-new-func": 0, // disallow use of new operator for Function object - "no-new-wrappers": 0, // disallows creating new instances of String, Number, and Boolean - "no-octal": 0, // disallow use of octal literals - "no-octal-escape": 0, // disallow use of octal escape sequences in string literals, such as var foo = "Copyright \051"; - "no-process-env": 0, // disallow use of process.env (off by default) - "no-proto": 0, // disallow usage of __proto__ property - "no-redeclare": 0, // disallow declaring the same variable more then once - "no-return-assign": 0, // disallow use of assignment in return statement - "no-script-url": 0, // disallow use of javascript: urls. - "no-self-compare": 0, // disallow comparisons where both sides are exactly the same (off by default) - "no-sequences": 0, // disallow use of comma operator - "no-unused-expressions": 0, // disallow usage of expressions in statement position - "no-void": 0, // disallow use of void operator (off by default) + "no-labels": 2, // disallow use of labeled statements + "no-lone-blocks": 2, // disallow unnecessary nested blocks + "no-loop-func": 2, // disallow creation of functions within loops + "no-multi-spaces": 1, // disallow use of multiple spaces + "no-multi-str": 1, // disallow use of multiline strings + "no-native-reassign": 2, // disallow reassignments of native objects + "no-new": 1, // disallow use of new operator when not part of the assignment or comparison + "no-new-func": 1, // disallow use of new operator for Function object + "no-new-wrappers": 2, // disallows creating new instances of String, Number, and Boolean + "no-octal": 1, // disallow use of octal literals + "no-octal-escape": 1, // disallow use of octal escape sequences in string literals, such as var foo = "Copyright \051"; + "no-process-env": 2, // disallow use of process.env (off by default) + "no-proto": 2, // disallow usage of __proto__ property + "no-redeclare": 2, // disallow declaring the same variable more then once + "no-return-assign": 2, // disallow use of assignment in return statement + "no-script-url": 2, // disallow use of javascript: urls. + "no-self-compare": 2, // disallow comparisons where both sides are exactly the same (off by default) + "no-sequences": 2, // disallow use of comma operator + "no-unused-expressions": 2, // disallow usage of expressions in statement position + "no-void": 1, // disallow use of void operator (off by default) "no-warning-comments": 0, // disallow usage of configurable warning terms in comments, e.g. TODO or FIXME (off by default) - "no-with": 0, // disallow use of the with statement - "radix": 0, // require use of the second argument for parseInt() (off by default) + "no-with": 1, // disallow use of the with statement + "radix": 1, // require use of the second argument for parseInt() (off by default) "vars-on-top": 0, // requires to declare all vars on top of their containing scope (off by default) - "wrap-iife": 0, // require immediate function invocation to be wrapped in parentheses (off by default) - "yoda": 0, // require or disallow Yoda conditions + "wrap-iife": 1, // require immediate function invocation to be wrapped in parentheses (off by default) + "yoda": [1, "never"], // require or disallow Yoda conditions ////////// Strict Mode ////////// - "global-strict": 0, // (deprecated) require or disallow the "use strict" pragma in the global scope (off by default in the node environment) - "no-extra-strict": 0, // (deprecated) disallow unnecessary use of "use strict"; when already in strict mode - "strict": 0, // controls location of Use Strict Directives + "strict": [2, "function"], // controls location of Use Strict Directives ////////// Variables ////////// - "no-catch-shadow": 0, // disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment) - "no-delete-var": 0, // disallow deletion of variables - "no-label-var": 0, // disallow labels that share a name with a variable - "no-shadow": 0, // disallow declaration of variables already declared in the outer scope - "no-shadow-restricted-names": 0, // disallow shadowing of names such as arguments - "no-undef": 0, // disallow use of undeclared variables unless mentioned in a /*global */ block - "no-undef-init": 0, // disallow use of undefined when initializing variables - "no-undefined": 0, // disallow use of undefined variable (off by default) - "no-unused-vars": 0, // disallow declaration of variables that are not used in the code - "no-use-before-define": 0, // disallow use of variables before they are defined + "no-catch-shadow": 2, // disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment) + "no-delete-var": 2, // disallow deletion of variables + "no-label-var": 2, // disallow labels that share a name with a variable + "no-shadow": 2, // disallow declaration of variables already declared in the outer scope + "no-shadow-restricted-names": 2, // disallow shadowing of names such as arguments + "no-undef": 2, // disallow use of undeclared variables unless mentioned in a /*global */ block + "no-undef-init": 2, // disallow use of undefined when initializing variables + "no-undefined": 2, // disallow use of undefined variable (off by default) + "no-unused-vars": 2, // disallow declaration of variables that are not used in the code + "no-use-before-define": 2, // disallow use of variables before they are defined ////////// Node.js ////////// - "handle-callback-err": 0, // enforces error handling in callbacks (off by default) (on by default in the node environment) - "no-mixed-requires": 0, // disallow mixing regular variable and require declarations (off by default) (on by default in the node environment) - "no-new-require": 0, // disallow use of new operator with the require function (off by default) (on by default in the node environment) - "no-path-concat": 0, // disallow string concatenation with __dirname and __filename (off by default) (on by default in the node environment) - "no-process-exit": 0, // disallow process.exit() (on by default in the node environment) - "no-restricted-modules": 0, // restrict usage of specified node modules (off by default) - "no-sync": 0, // disallow use of synchronous methods (off by default) + // "handle-callback-err": 2, // enforces error handling in callbacks (off by default) (on by default in the node environment) + // "no-mixed-requires": 2, // disallow mixing regular variable and require declarations (off by default) (on by default in the node environment) + // "no-new-require": 2, // disallow use of new operator with the require function (off by default) (on by default in the node environment) + // "no-path-concat": 2, // disallow string concatenation with __dirname and __filename (off by default) (on by default in the node environment) + // "no-process-exit": 2, // disallow process.exit() (on by default in the node environment) + // "no-restricted-modules": 1, // restrict usage of specified node modules (off by default) + // "no-sync": 1, // disallow use of synchronous methods (off by default) ////////// Stylistic Issues ////////// - "brace-style": 0, // enforce one true brace style (off by default) + "brace-style": [ // enforce one true brace style (off by default) + 1, + "stroustrup", + { + "allowSingleLine": true + } + ], "camelcase": 0, // require camel case names - "comma-spacing": 0, // enforce spacing before and after comma - "comma-style": 0, // enforce one true comma style (off by default) - "consistent-this": 0, // enforces consistent naming when capturing the current execution context (off by default) - "eol-last": 0, // enforce newline at the end of file, with no multiple empty lines + "comma-spacing": [ // enforce spacing before and after comma + 1, + { + "before": false, + "after": true + } + ], + "comma-style": [1, "last"], // enforce one true comma style (off by default) + "comma-dangle": 2, // disallow trailing commas in object literals + "consistent-this": 1, // enforces consistent naming when capturing the current execution context (off by default) + "eol-last": 1, // enforce newline at the end of file, with no multiple empty lines "func-names": 0, // require function expressions to have a name (off by default) "func-style": 0, // enforces use of function declarations or expressions (off by default) - "key-spacing": 0, // enforces spacing between keys and values in object literal properties - "max-nested-callbacks": 0, // specify the maximum depth callbacks can be nested (off by default) - "new-cap": 0, // require a capital letter for constructors - "new-parens": 0, // disallow the omission of parentheses when invoking a constructor with no arguments - "no-array-constructor": 0, // disallow use of the Array constructor + "key-spacing": 1, // enforces spacing between keys and values in object literal properties + "max-nested-callbacks": [1, 3], // specify the maximum depth callbacks can be nested (off by default) + "new-cap": 1, // require a capital letter for constructors + "new-parens": 1, // disallow the omission of parentheses when invoking a constructor with no arguments + "no-array-constructor": 2, // disallow use of the Array constructor "no-inline-comments": 0, // disallow comments inline after code (off by default) - "no-lonely-if": 0, // disallow if as the only statement in an else block (off by default) - "no-mixed-spaces-and-tabs": 0, // disallow mixed spaces and tabs for indentation - "no-multiple-empty-lines": 0, // disallow multiple empty lines (off by default) + "no-lonely-if": 2, // disallow if as the only statement in an else block (off by default) + "no-mixed-spaces-and-tabs": 2, // disallow mixed spaces and tabs for indentation + "no-multiple-empty-lines": 1, // disallow multiple empty lines (off by default) "no-nested-ternary": 0, // disallow nested ternary expressions (off by default) - "no-new-object": 0, // disallow use of the Object constructor - "no-space-before-semi": 0, // disallow space before semicolon - "no-spaced-func": 0, // disallow space between function identifier and application - "no-ternary": 0, // disallow the use of ternary operators (off by default) - "no-trailing-spaces": 0, // disallow trailing whitespace at the end of lines - "no-underscore-dangle": 0, // disallow dangling underscores in identifiers - "no-wrap-func": 0, // disallow wrapping of non-IIFE statements in parens - "one-var": 0, // allow just one var statement per function (off by default) - "operator-assignment": 0, // require assignment operator shorthand where possible or prohibit it entirely (off by default) - "padded-blocks": 0, // enforce padding within blocks (off by default) - "quote-props": 0, // require quotes around object literal property names (off by default) - "quotes": 0, // specify whether double or single quotes should be used - "semi": 0, // require or disallow use of semicolons instead of ASI - "sort-vars": 0, // sort variables within the same declaration block (off by default) - "space-after-function-name": 0, // require a space after function names (off by default) - "space-after-keywords": 0, // require a space after certain keywords (off by default) - "space-before-blocks": 0, // require or disallow space before blocks (off by default) - "space-in-brackets": 0, // require or disallow spaces inside brackets (off by default) - "space-in-parens": 0, // require or disallow spaces inside parentheses (off by default) - "space-infix-ops": 0, // require spaces around operators - "space-return-throw-case": 0, // require a space after return, throw, and case - "space-unary-ops": 0, // Require or disallow spaces before/after unary operators (words on by default, nonwords off by default) - "spaced-line-comment": 0, // require or disallow a space immediately following the // in a line comment (off by default) - "wrap-regex": 0, // require regex literals to be wrapped in parentheses (off by default) + "no-new-object": 2, // disallow use of the Object constructor + "semi-spacing": [ // disallow space before semicolon + 1, + { + "before": false, + "after": true + }], + "no-spaced-func": 1, // disallow space between function identifier and application + "no-ternary": 0, // disallow the use of ternary operators (off by default) + "no-trailing-spaces": 1, // disallow trailing whitespace at the end of lines + "no-underscore-dangle": 0, // disallow dangling underscores in identifiers + "one-var": [1, "never"], // allow just one var statement per function (off by default) + "operator-assignment": 1, // require assignment operator shorthand where possible or prohibit it entirely (off by default) + "padded-blocks": 0, // enforce padding within blocks (off by default) + "quotes": [1, "single"], // specify whether double or single quotes should be used + "semi": 2, // require or disallow use of semicolons instead of ASI + "sort-vars": 0, // sort variables within the same declaration block (off by default) + "space-before-blocks": 1, // require or disallow space before blocks (off by default) + "object-curly-spacing": [1, "always"], // require or disallow spaces inside curly braces (off by default) + "array-bracket-spacing": [1, "always"], // require or disallow spaces inside array brackets (off by default) + "space-in-parens": 0, // require or disallow spaces inside parentheses (off by default) + "space-infix-ops": 0, // require spaces around operators + "keyword-spacing": 1, // require a space after keywords + "space-unary-ops": [ // Require or disallow spaces before/after unary operators (words on by default, nonwords off by default) + 1, + { + "words": true, + "nonwords": false + }], + "spaced-comment": [1, "always"], // require or disallow a space immediately following the // in a line comment (off by default) + "wrap-regex": 0, // require regex literals to be wrapped in parentheses (off by default) ////////// ECMAScript 6 ////////// - "no-var": 0, // require let or const instead of var (off by default) - "generator-star": 0, // enforce the position of the * in generator functions (off by default) + // "no-var": 0, // require let or const instead of var (off by default) + // "generator-star-spacing": 0, // enforce the position of the * in generator functions (off by default) + // "no-confusing-arrow": 0, // Disallow arrow functions where they could be confused with comparisons ////////// Legacy ////////// diff --git a/.jshintrc b/.jshintrc index 41d04b0c892..e03ed96e6ea 100644 --- a/.jshintrc +++ b/.jshintrc @@ -48,7 +48,7 @@ "evil" : false, // true: Tolerate use of `eval` and `new Function()` "expr" : false, // true: Tolerate `ExpressionStatement` as Programs "funcscope" : false, // true: Tolerate defining variables inside control statements - "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') + "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') "iterator" : false, // true: Tolerate using the `__iterator__` property "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block "laxbreak" : false, // true: Tolerate possibly unsafe line breakings @@ -66,14 +66,17 @@ // Environments "browser" : true, // Web Browser (window, document, etc) - "browserify" : false, // Browserify (node.js code in the browser) + "browserify" : true, // Browserify (node.js code in the browser) "devel" : true, // Development/debugging (alert, confirm, etc) - "jasmine" : false, // Jasmine - "jquery" : false, // jQuery + "jasmine" : true, // Jasmine + "jquery" : true, // jQuery "mocha" : true, // Mocha - "node" : false, // Node.js - "worker" : false, // Web Workers + "node" : true, // Node.js + "worker" : true, // Web Workers // Custom Globals - "globals" : {} // additional predefined global variables + "globals" : { + "_": true, + "Backbone": true + } } \ No newline at end of file diff --git a/.stylelintrc b/.stylelintrc index badaf8a63f2..e7b556a35bc 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,160 +1,5 @@ { "rules": { "block-no-single-line": true - // "at-rule-blacklist": string|[], - // "at-rule-empty-line-before": "always"|"never", - // "at-rule-name-case": "lower"|"upper", - // "at-rule-name-newline-after": "always"|"always-multi-line", - // "at-rule-name-space-after": "always"|"always-single-line", - // "at-rule-no-unknown": true, - // "at-rule-no-vendor-prefix": true, - // "at-rule-semicolon-newline-after": "always", - // "at-rule-whitelist": string|[], - // "block-closing-brace-newline-after": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", - // "block-closing-brace-newline-before": "always"|"always-multi-line"|"never-multi-line", - // "block-closing-brace-space-after": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", - // "block-closing-brace-space-before": "always"|"never"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", - // "block-no-empty": true, - // "block-no-single-line": true, - // "block-opening-brace-newline-after": "always"|"always-multi-line"|"never-multi-line", - // "block-opening-brace-newline-before": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", - // "block-opening-brace-space-after": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", - // "block-opening-brace-space-before": "always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line", - // "color-hex-case": "lower"|"upper", - // "color-hex-length": "short"|"long", - // "color-named": "always-where-possible"|"never", - // "color-no-hex": true, - // "color-no-invalid-hex": true, - // "comment-empty-line-before": "always"|"never", - // "comment-whitespace-inside": "always"|"never", - // "comment-word-blacklist": string|[], - // "custom-media-pattern": string, - // "custom-property-no-outside-root": true, - // "custom-property-pattern": string, - // "declaration-bang-space-after": "always"|"never", - // "declaration-bang-space-before": "always"|"never", - // "declaration-block-no-duplicate-properties": true, - // "declaration-block-no-ignored-properties": true, - // "declaration-block-no-shorthand-property-overrides": true, - // "declaration-block-properties-order": "alphabetical"|[], - // "declaration-block-semicolon-newline-after": "always"|"always-multi-line"|"never-multi-line", - // "declaration-block-semicolon-newline-before": "always"|"always-multi-line"|"never-multi-line", - // "declaration-block-semicolon-space-after": "always"|"never"|"always-single-line"|"never-single-line", - // "declaration-block-semicolon-space-before": "always"|"never"|"always-single-line"|"never-single-line", - // "declaration-block-single-line-max-declarations": int, - // "declaration-block-trailing-semicolon": "always"|"never", - // "declaration-colon-newline-after": "always"|"always-multi-line", - // "declaration-colon-space-after": "always"|"never"|"always-single-line", - // "declaration-colon-space-before": "always"|"never", - // "declaration-no-important": true, - // "declaration-property-unit-blacklist": {}, - // "declaration-property-unit-whitelist": {}, - // "declaration-property-value-blacklist": {}, - // "declaration-property-value-whitelist": {}, - // "font-family-name-quotes": "always-where-required"|"always-where-recommended"|"always-unless-keyword", - // "font-weight-notation": "numeric"|"named", - // "function-blacklist": string|[], - // "function-calc-no-unspaced-operator": true, - // "function-comma-newline-after": "always"|"always-multi-line"|"never-multi-line", - // "function-comma-newline-before": "always"|"always-multi-line"|"never-multi-line", - // "function-comma-space-after": "always"|"never"|"always-single-line"|"never-single-line", - // "function-comma-space-before": "always"|"never"|"always-single-line"|"never-single-line", - // "function-linear-gradient-no-nonstandard-direction": true, - // "function-max-empty-lines": int, - // "function-name-case": "lower"|"upper", - // "function-parentheses-newline-inside": "always"|"always-multi-line"|"never-multi-line", - // "function-parentheses-space-inside": "always"|"never"|"always-single-line"|"never-single-line", - // "function-url-data-uris": "always"|"never", - // "function-url-no-scheme-relative": true, - // "function-url-quotes": "always"|"never", - // "function-whitelist": string|[], - // "function-whitespace-after": "always"|"never", - // "indentation": int|"tab", - // "keyframe-declaration-no-important": true, - // "length-zero-no-unit": true, - // "max-empty-lines": int, - // "max-line-length": int, - // "max-nesting-depth": int, - // "media-feature-colon-space-after": "always"|"never", - // "media-feature-colon-space-before": "always"|"never", - // "media-feature-name-no-vendor-prefix": true, - // "media-feature-no-missing-punctuation": true, - // "media-feature-parentheses-space-inside": "always"|"never", - // "media-feature-range-operator-space-after": "always"|"never", - // "media-feature-range-operator-space-before": "always"|"never", - // "media-query-list-comma-newline-after": "always"|"always-multi-line"|"never-multi-line", - // "media-query-list-comma-newline-before": "always"|"always-multi-line"|"never-multi-line", - // "media-query-list-comma-space-after": "always"|"never"|"always-single-line"|"never-single-line", - // "media-query-list-comma-space-before": "always"|"never"|"always-single-line"|"never-single-line", - // "no-browser-hacks": true, - // "no-descending-specificity": true, - // "no-duplicate-selectors": true, - // "no-empty-source": true, - // "no-eol-whitespace": true, - // "no-extra-semicolons": true, - // "no-indistinguishable-colors": true, - // "no-invalid-double-slash-comments": true, - // "no-missing-end-of-source-newline": true, - // "no-unknown-animations": true, - // "no-unsupported-browser-features": true, - // "number-leading-zero": "always"|"never", - // "number-max-precision": int, - // "number-no-trailing-zeros": true, - // "property-blacklist": string|[], - // "property-case": "lower"|"upper", - // "property-no-unknown": true, - // "property-no-vendor-prefix": true, - // "property-whitelist": string|[], - // "root-no-standard-properties": true, - // "rule-nested-empty-line-before": "always"|"never", - // "rule-non-nested-empty-line-before": "always"|"never", - // "selector-attribute-brackets-space-inside": "always"|"never", - // "selector-attribute-operator-blacklist": string|[], - // "selector-attribute-operator-space-after": "always"|"never", - // "selector-attribute-operator-space-before": "always"|"never", - // "selector-attribute-operator-whitelist": string|[], - // "selector-attribute-quotes": "always"|"never", - // "selector-class-pattern": string, - // "selector-combinator-space-after": "always"|"never", - // "selector-combinator-space-before": "always"|"never", - // "selector-id-pattern": string, - // "selector-list-comma-newline-after": "always"|"always-multi-line"|"never-multi-line", - // "selector-list-comma-newline-before": "always"|"always-multi-line"|"never-multi-line", - // "selector-list-comma-space-after": "always"|"never"|"always-single-line"|"never-single-line", - // "selector-list-comma-space-before": "always"|"never"|"always-single-line"|"never-single-line", - // "selector-max-empty-lines": int, - // "selector-max-compound-selectors": int, - // "selector-max-specificity": string, - // "selector-no-attribute": true, - // "selector-no-combinator": true, - // "selector-no-id": true, - // "selector-no-qualifying-type": true, - // "selector-no-type": true, - // "selector-no-universal": true, - // "selector-no-vendor-prefix": true, - // "selector-pseudo-class-case": "lower"|"upper", - // "selector-pseudo-class-no-unknown": true, - // "selector-pseudo-class-parentheses-space-inside": "always"|"never", - // "selector-pseudo-element-case": "lower"|"upper", - // "selector-pseudo-element-colon-notation": "single"|"double", - // "selector-pseudo-element-no-unknown": true, - // "selector-root-no-composition": true, - // "selector-type-case": "lower"|"upper", - // "selector-type-no-unknown": true, - // "shorthand-property-no-redundant-values": true, - // "string-no-newline": true, - // "string-quotes": "single"|"double", - // "stylelint-disable-reason": "always-before"|"always-after", - // "time-no-imperceptible": true, - // "unit-blacklist": string|[], - // "unit-case": "lower"|"upper", - // "unit-no-unknown": true, - // "unit-whitelist": string|[], - // "value-keyword-case": "lower"|"upper", - // "value-list-comma-newline-after": "always"|"always-multi-line"|"never-multi-line", - // "value-list-comma-newline-before": "always"|"always-multi-line"|"never-multi-line", - // "value-list-comma-space-after": "always"|"never"|"always-single-line"|"never-single-line", - // "value-list-comma-space-before": "always"|"never"|"always-single-line"|"never-single-line", - // "value-no-vendor-prefix": true } } \ No newline at end of file From e077f348ba615a4eea8622d59963cf0bcb3a987f Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 24 Aug 2016 21:46:16 -0400 Subject: [PATCH 008/141] - Stylelint has been fully configured, still needs to be road tested. --- .eslintrc | 2 +- .stylelintrc | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 131 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 0f0171855c6..b132c698ba7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -112,7 +112,7 @@ "no-with": 1, // disallow use of the with statement "radix": 1, // require use of the second argument for parseInt() (off by default) "vars-on-top": 0, // requires to declare all vars on top of their containing scope (off by default) - "wrap-iife": 1, // require immediate function invocation to be wrapped in parentheses (off by default) + "wrap-iife": [1, "inside"], // require immediate function invocation to be wrapped in parentheses (off by default) "yoda": [1, "never"], // require or disallow Yoda conditions diff --git a/.stylelintrc b/.stylelintrc index e7b556a35bc..2bd1e275107 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,5 +1,134 @@ { "rules": { - "block-no-single-line": true + "at-rule-empty-line-before": ["always", { + "ignore": ["after-comment"], + }], + "at-rule-name-case": "lower", + "at-rule-name-newline-after": "always-multi-line", + "at-rule-name-space-after": "always", + "at-rule-no-unknown": true, + "block-closing-brace-empty-line-before": "never", + "at-rule-semicolon-newline-after": "always", + "block-closing-brace-newline-before": "always-multi-line", + "block-closing-brace-space-before": "always-single-line", + "block-no-empty": true, + "block-opening-brace-newline-after": "always-multi-line", + "block-opening-brace-space-after": "always-single-line", + "block-opening-brace-space-before": "always", + "color-hex-case": "upper", + "color-hex-length": "long", + "color-named": "never", + "color-no-invalid-hex": true, + "comment-empty-line-before": ["always", { + "ignore": ["between-comments"], + }], + "comment-whitespace-inside": "always", + "comment-no-empty": true, + "custom-property-empty-line-before": ["always", { + "except": ["after-comment", "after-custom-property"], + }], + "declaration-bang-space-after": "never", + "declaration-bang-space-before": "always", + "declaration-block-no-duplicate-properties": true, + "declaration-block-no-ignored-properties": true, + "declaration-block-no-shorthand-property-overrides": true, + "declaration-block-semicolon-newline-after": "always-multi-line", + "declaration-block-semicolon-newline-before": "never-multi-line", + "declaration-block-semicolon-space-after": "always-single-line", + "declaration-block-semicolon-space-before": "never", + "declaration-block-single-line-max-declarations": 1, + "declaration-block-trailing-semicolon": "always", + "declaration-colon-newline-after": "always-multi-line", + "declaration-colon-space-after": "always", + "declaration-colon-space-before": "never", + "font-family-name-quotes": "always-unless-keyword", + "font-weight-notation": "numeric", + "function-calc-no-unspaced-operator": true, + "function-comma-newline-after": "never-multi-line", + "function-comma-newline-before": "never-multi-line", + "function-comma-space-after": "always", + "function-comma-space-before": "never", + "function-linear-gradient-no-nonstandard-direction": true, + "function-max-empty-lines": 0, + "function-name-case": "lower", + "function-parentheses-newline-inside": "always-multi-line", + "function-parentheses-space-inside": "never", + "function-url-no-scheme-relative": true, + "function-url-quotes": "always", + "function-whitespace-after": "always", + "indentation": 4, + "length-zero-no-unit": true, + "max-empty-lines": 2, + "max-nesting-depth": 3, + "media-feature-colon-space-after": "always", + "media-feature-colon-space-before": "never", + "media-feature-no-missing-punctuation": true, + "media-feature-parentheses-space-inside": "never", + "media-feature-range-operator-space-after": "always", + "media-feature-range-operator-space-before": "always", + "media-query-list-comma-space-after": "always", + "media-query-list-comma-space-before": "never", + "no-descending-specificity": true, + "no-duplicate-selectors": true, + "no-empty-source": true, + "no-eol-whitespace": true, + "no-extra-semicolons": true, + "no-indistinguishable-colors": true, + "no-invalid-double-slash-comments": true, + "no-missing-end-of-source-newline": true, + "no-unknown-animations": true, + "number-leading-zero": "always", + "number-max-precision": 2, + "number-no-trailing-zeros": true, + "property-case": "lower", + "property-no-unknown": true, + "root-no-standard-properties": true, + "rule-nested-empty-line-before": ["always", { + "except": ["first-nested"], + "ignore": ["after-comment"], + }], + "rule-non-nested-empty-line-before": ["always", { + "except": ["after-single-line-comment"], + "ignore": ["after-comment"], + }], + "selector-attribute-brackets-space-inside": "never", + "selector-attribute-operator-space-after": "never", + "selector-attribute-operator-space-before": "never", + "selector-attribute-quotes": "always", + "selector-combinator-space-after": "always", + "selector-combinator-space-before": "always", + "selector-list-comma-newline-after": "always-multi-line", + "selector-list-comma-newline-before": "never-multi-line", + "selector-list-comma-space-after": "always", + "selector-list-comma-space-before": "never", + "selector-max-empty-lines": 0, + "selector-max-compound-selectors": 3, + "selector-max-specificity": "0,3,0", + "selector-no-id": true, + "selector-no-qualifying-type": [true, { + "ignore": ["attribute"], + }], + "selector-pseudo-class-case": "lower", + "selector-pseudo-class-no-unknown": true, + "selector-pseudo-class-parentheses-space-inside": "never", + "selector-pseudo-element-case": "lower", + "selector-pseudo-element-colon-notation": "single", + "selector-pseudo-element-no-unknown": true, + "selector-root-no-composition": true, + "selector-type-case": "lower", + "selector-type-no-unknown": true, + "shorthand-property-no-redundant-values": true, + "string-no-newline": true, + "string-quotes": "single", + "stylelint-disable-reason": "always-before", + "time-no-imperceptible": true, + "unit-blacklist": ["pt"], + "unit-case": "lower", + "unit-no-unknown": true, + "value-keyword-case": "lower", + "value-list-comma-newline-after": "always-multi-line", + "value-list-comma-newline-before": "never-multi-line", + "value-list-comma-space-after": "always", + "value-list-comma-space-before": "never", } } \ No newline at end of file From edb122cba0148d578057950e8608a448e8104407 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 24 Aug 2016 22:12:05 -0400 Subject: [PATCH 009/141] - Added undesireable stylelint rules, commented out (cannot set to false). --- .stylelintrc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.stylelintrc b/.stylelintrc index 2bd1e275107..73a9e32d9d4 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -7,23 +7,27 @@ "at-rule-name-newline-after": "always-multi-line", "at-rule-name-space-after": "always", "at-rule-no-unknown": true, + # "at-rule-no-vendor-prefix": true, "block-closing-brace-empty-line-before": "never", "at-rule-semicolon-newline-after": "always", "block-closing-brace-newline-before": "always-multi-line", "block-closing-brace-space-before": "always-single-line", "block-no-empty": true, + # "block-no-single-line": true, "block-opening-brace-newline-after": "always-multi-line", "block-opening-brace-space-after": "always-single-line", "block-opening-brace-space-before": "always", "color-hex-case": "upper", "color-hex-length": "long", "color-named": "never", + # "color-no-hex": true, "color-no-invalid-hex": true, "comment-empty-line-before": ["always", { "ignore": ["between-comments"], }], "comment-whitespace-inside": "always", "comment-no-empty": true, + "custom-property-no-outside-root": true, "custom-property-empty-line-before": ["always", { "except": ["after-comment", "after-custom-property"], }], @@ -53,6 +57,7 @@ "function-name-case": "lower", "function-parentheses-newline-inside": "always-multi-line", "function-parentheses-space-inside": "never", + # "function-url-data-uris": true, "function-url-no-scheme-relative": true, "function-url-quotes": "always", "function-whitespace-after": "always", @@ -66,8 +71,10 @@ "media-feature-parentheses-space-inside": "never", "media-feature-range-operator-space-after": "always", "media-feature-range-operator-space-before": "always", + # "media-feature-name-no-vendor-prefix:" true, "media-query-list-comma-space-after": "always", "media-query-list-comma-space-before": "never", + # "no-browser-hacks": true, "no-descending-specificity": true, "no-duplicate-selectors": true, "no-empty-source": true, @@ -82,6 +89,7 @@ "number-no-trailing-zeros": true, "property-case": "lower", "property-no-unknown": true, + # "property-no-vendor-prefix": true, "root-no-standard-properties": true, "rule-nested-empty-line-before": ["always", { "except": ["first-nested"], @@ -105,6 +113,11 @@ "selector-max-compound-selectors": 3, "selector-max-specificity": "0,3,0", "selector-no-id": true, + # "selector-no-attribute": true, + # "selector-no-combinator": true, + # "selector-no-type": true, + # "selector-no-universal": true, + # "selector-no-vendor-prefix": true, "selector-no-qualifying-type": [true, { "ignore": ["attribute"], }], @@ -126,6 +139,7 @@ "unit-case": "lower", "unit-no-unknown": true, "value-keyword-case": "lower", + # "value-no-vendor-prefix": true, "value-list-comma-newline-after": "always-multi-line", "value-list-comma-newline-before": "never-multi-line", "value-list-comma-space-after": "always", From a89df014bc54ecadd30fdbd51c6195f18ed07269 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 31 Aug 2016 20:38:18 -0400 Subject: [PATCH 010/141] - Added brew.sh file, commented out casks I did not know at the time. --- brew.sh | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 brew.sh diff --git a/brew.sh b/brew.sh new file mode 100644 index 00000000000..2addb2c3099 --- /dev/null +++ b/brew.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +# Install command-line tools using Homebrew. + +# Make sure we’re using the latest Homebrew. +brew update + +# Upgrade any already-installed formulae. +brew upgrade --all + +# Install GNU core utilities (those that come with macOS are outdated). +# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`. +brew install coreutils +ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum + +# Install some other useful utilities like `sponge`. +brew install moreutils + +# Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed. +brew install findutils + +# Install GNU `sed`, overwriting the built-in `sed`. +# brew install gnu-sed --with-default-names + +# Install Bash 4. +# Note: don’t forget to add `/usr/local/bin/bash` to `/etc/shells` before +# running `chsh`. +brew install bash +brew tap homebrew/versions +brew install bash-completion2 + +# Switch to using brew-installed bash as default shell +if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then + echo '/usr/local/bin/bash' | sudo tee -a /etc/shells; + chsh -s /usr/local/bin/bash; +fi; + +# Install `wget` with IRI support. +brew install wget --with-iri + +# Install more recent versions of some macOS tools. +brew install vim --with-override-system-vi +brew install homebrew/dupes/grep +brew install homebrew/dupes/openssh +# brew install homebrew/dupes/screen + +# Install other useful binaries. +# brew install ack +# brew install dark-mode +#brew install exiv2 +brew install git +# brew install git-lfs +# brew install imagemagick --with-webp +# brew install lua +# brew install lynx +# brew install p7zip +# brew install pigz +# brew install pv +# brew install rename +# brew install rhino +brew install speedtest_cli +# brew install ssh-copy-id +brew install testssl +brew install tree +# brew install vbindiff +# brew install webkit2png +# brew install zopfli + +# Remove outdated versions from the cellar. +brew cleanup \ No newline at end of file From a1c09549e13a5bfd642c95bd218215bece1e3e3c Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 6 Sep 2016 23:07:11 -0400 Subject: [PATCH 011/141] - Added a few more brews, with comments. Removed un-needed brews. - Added function for creating responsive screenshots. - Added Git LFS declarations to gitattributes. --- .functions | 10 ++++++++++ .gitattributes | 3 +++ .gitconfig | 8 +++++++- brew.sh | 38 ++++++++++++++++---------------------- 4 files changed, 36 insertions(+), 23 deletions(-) create mode 100644 .gitattributes diff --git a/.functions b/.functions index 60ad955d2a2..f451cf8053b 100644 --- a/.functions +++ b/.functions @@ -7,6 +7,16 @@ function touchgo() vim $1; } +# Take full responsive screenshots of a webpage +function screenshots() { + local array=(1600 768 320) + + for i in "${array[@]}" + do + webkit2png -Fs 1 -W $i --filename='screenshot-'$(date +%Y%m%d-%H%M%S) --delay=2 "$1" + done +} + # Simple calculator function calc() { local result=""; diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..dea12f1bc1e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# Add all zip files through Git LFS +$ git lfs track "*.zip" +$ git lfs track "*.psd" \ No newline at end of file diff --git a/.gitconfig b/.gitconfig index 233516320ef..0e5317f1f58 100644 --- a/.gitconfig +++ b/.gitconfig @@ -184,4 +184,10 @@ [url "git://gist.github.com/"] - insteadOf = "gist:" \ No newline at end of file + insteadOf = "gist:" + +[filter "lfs"] + + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + required = true diff --git a/brew.sh b/brew.sh index 2addb2c3099..cf3343c514f 100644 --- a/brew.sh +++ b/brew.sh @@ -31,8 +31,8 @@ brew install bash-completion2 # Switch to using brew-installed bash as default shell if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then - echo '/usr/local/bin/bash' | sudo tee -a /etc/shells; - chsh -s /usr/local/bin/bash; + echo '/usr/local/bin/bash' | sudo tee -a /etc/shells; + chsh -s /usr/local/bin/bash; fi; # Install `wget` with IRI support. @@ -45,26 +45,20 @@ brew install homebrew/dupes/openssh # brew install homebrew/dupes/screen # Install other useful binaries. -# brew install ack -# brew install dark-mode -#brew install exiv2 -brew install git -# brew install git-lfs -# brew install imagemagick --with-webp -# brew install lua -# brew install lynx -# brew install p7zip -# brew install pigz -# brew install pv -# brew install rename -# brew install rhino -brew install speedtest_cli -# brew install ssh-copy-id -brew install testssl -brew install tree -# brew install vbindiff -# brew install webkit2png -# brew install zopfli +brew install dark-mode # Toggle Mac dark mode +brew install exiv2 # Read/Write image metadata +brew install git # Source control +brew install git-lfs # System for managing large files in source control via Git LFS +brew install imagemagick --with-webp # Create, edit, compose or convert bitmap images +# brew install p7zip # 7zip for Mac +# brew install pigz # Parallel implementation of gzip +brew install speedtest_cli # Test your internet connection speed +# brew install ssh-copy-id # Add ssh identity to remote host for easy login +brew install testssl # Test ssl configuration strength +brew install tree # View tree list of folder/file structures +brew install webkit2png # Take full screenshots of a webpage +# brew install zopfli # Ability to use Zopfli compression +brew install gnupg gnupg2 # Encrypt and sign data/communication via GnuPG # Remove outdated versions from the cellar. brew cleanup \ No newline at end of file From 302d0001abc61f5eb3bf92975b039ba031c8f20a Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 6 Sep 2016 23:14:00 -0400 Subject: [PATCH 012/141] - Added more git attributes, fixed syntax error from last commit. --- .gitattributes | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index dea12f1bc1e..59332db6df5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,5 @@ # Add all zip files through Git LFS -$ git lfs track "*.zip" -$ git lfs track "*.psd" \ No newline at end of file +git lfs track "*.bin" +git lfs track "*.dll" +git lfs track "*.zip" +git lfs track "*.psd" \ No newline at end of file From 28c599af84ef5352ed8826af27b44f84c49b3c50 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 6 Sep 2016 23:15:24 -0400 Subject: [PATCH 013/141] - Fixed syntax errors in gitattributes one more time, didn't really know what I was doing :) --- .gitattributes | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index 59332db6df5..282b550db23 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ # Add all zip files through Git LFS -git lfs track "*.bin" -git lfs track "*.dll" -git lfs track "*.zip" -git lfs track "*.psd" \ No newline at end of file +*.bin filter=lfs diff=lfs merge=lfs -text +*.dll filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.psd filter=lfs diff=lfs merge=lfs -text \ No newline at end of file From 6790e60b3485ffa2bc6b5fd64c6522c91dffedf3 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 7 Sep 2016 14:09:31 -0400 Subject: [PATCH 014/141] - Added npm-ls function. --- .functions | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.functions b/.functions index f451cf8053b..dd646552d0c 100644 --- a/.functions +++ b/.functions @@ -7,6 +7,12 @@ function touchgo() vim $1; } +# List user installed npm packages +function npm-ls() +{ + npm list -g --depth=0 +} + # Take full responsive screenshots of a webpage function screenshots() { local array=(1600 768 320) From 57dcaf38c108e2b6e4c90fff7bcf66dbe8b08e1f Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 14 Sep 2016 22:22:23 -0400 Subject: [PATCH 015/141] - Enabled ES6 validation in linters. --- .eslintrc | 52 +++++++++++++++++++++++++++++----------------------- .jshintrc | 2 +- 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/.eslintrc b/.eslintrc index b132c698ba7..e57cc28987c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -5,7 +5,8 @@ "amd": true, // defines require() and define() as global variables as per the amd spec. "mocha": true, // adds all of the Mocha testing global variables. "jasmine": true, // adds all of the Jasmine testing global variables for version 1.3 and 0.0. - "jquery": true // jquery global variables. + "jquery": true, // jquery global variables. + "es6": true // enable es6 keywords, except module. }, "globals": { @@ -17,25 +18,29 @@ ], + "parserOptions": { + "sourceType": "module" + }, + // Uncomment for ES6 validation. - // "ecmaFeatures": { - // "binaryLiterals": true, // enable binary literals - // "blockBindings": true, // enable let and const (aka block bindings) - // "defaultParams": true, // enable default function parameters - // "forOf": true, // enable for-of loops - // "generators": true, // enable generators - // "objectLiteralComputedProperties": true, // enable computed object literal property names - // "objectLiteralDuplicateProperties": true, // enable duplicate object literal properties in strict mode - // "objectLiteralShorthandMethods": true, // enable object literal shorthand methods - // "objectLiteralShorthandProperties": true, // enable object literal shorthand properties - // "octalLiterals": true, // enable octal literals - // "regexUFlag": true, // enable the regular expression u flag - // "regexYFlag": true, // enable the regular expression y flag - // "templateStrings": true, // enable template strings - // "unicodeCodePointEscapes": true, // enable code point escapes - // "jsx": true // enable JSX - // }, + "ecmaFeatures": { + "binaryLiterals": true, // enable binary literals + "blockBindings": true, // enable let and const (aka block bindings) + "defaultParams": true, // enable default function parameters + "forOf": true, // enable for-of loops + "generators": true, // enable generators + "objectLiteralComputedProperties": true, // enable computed object literal property names + "objectLiteralDuplicateProperties": true, // enable duplicate object literal properties in strict mode + "objectLiteralShorthandMethods": true, // enable object literal shorthand methods + "objectLiteralShorthandProperties": true, // enable object literal shorthand properties + "octalLiterals": true, // enable octal literals + "regexUFlag": true, // enable the regular expression u flag + "regexYFlag": true, // enable the regular expression y flag + "templateStrings": true, // enable template strings + "unicodeCodePointEscapes": true, // enable code point escapes + "jsx": true // enable JSX + }, "rules": { ////////// Possible Errors ////////// @@ -118,7 +123,8 @@ ////////// Strict Mode ////////// - "strict": [2, "function"], // controls location of Use Strict Directives + // Needs to be disabled if ES6 modules are enabled... + // "strict": [2, "global"], // controls location of Use Strict Directives ////////// Variables ////////// @@ -198,7 +204,7 @@ "sort-vars": 0, // sort variables within the same declaration block (off by default) "space-before-blocks": 1, // require or disallow space before blocks (off by default) "object-curly-spacing": [1, "always"], // require or disallow spaces inside curly braces (off by default) - "array-bracket-spacing": [1, "always"], // require or disallow spaces inside array brackets (off by default) + "array-bracket-spacing": [1, "never"], // require or disallow spaces inside array brackets (off by default) "space-in-parens": 0, // require or disallow spaces inside parentheses (off by default) "space-infix-ops": 0, // require spaces around operators "keyword-spacing": 1, // require a space after keywords @@ -214,9 +220,9 @@ ////////// ECMAScript 6 ////////// - // "no-var": 0, // require let or const instead of var (off by default) - // "generator-star-spacing": 0, // enforce the position of the * in generator functions (off by default) - // "no-confusing-arrow": 0, // Disallow arrow functions where they could be confused with comparisons + "no-var": 0, // require let or const instead of var (off by default) + "generator-star-spacing": 0, // enforce the position of the * in generator functions (off by default) + "no-confusing-arrow": 0, // Disallow arrow functions where they could be confused with comparisons ////////// Legacy ////////// diff --git a/.jshintrc b/.jshintrc index e03ed96e6ea..1e5737cf941 100644 --- a/.jshintrc +++ b/.jshintrc @@ -42,7 +42,7 @@ "boss" : false, // true: Tolerate assignments where comparisons would be expected "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. "eqnull" : false, // true: Tolerate use of `== null` - "esversion" : 5, // {int} Specify the ECMAScript version to which the code must adhere. + "esversion" : 6, // {int} Specify the ECMAScript version to which the code must adhere. "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) // (ex: `for each`, multiple try/catch, function expression…) "evil" : false, // true: Tolerate use of `eval` and `new Function()` From c9d6f897875cceab2ffa7bf3c490fdf746eb04c2 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 15 Sep 2016 10:47:23 -0400 Subject: [PATCH 016/141] - Moved djp function from vagrant extras to here, useful on OSX too. --- .functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.functions b/.functions index dd646552d0c..e99e2a0d900 100644 --- a/.functions +++ b/.functions @@ -13,6 +13,11 @@ function npm-ls() npm list -g --depth=0 } + # Go to a django project's site root + function djp() { + cd ~/projects/$1/site/$1 + } + # Take full responsive screenshots of a webpage function screenshots() { local array=(1600 768 320) From b0afeb74947b3c3bfe63ae5e369943243329e74a Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 15 Sep 2016 10:49:20 -0400 Subject: [PATCH 017/141] - Added a couple useful directory shortcuts. --- .aliases | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.aliases b/.aliases index 4986f18296b..3e008601eb1 100644 --- a/.aliases +++ b/.aliases @@ -10,7 +10,9 @@ alias -- -="cd -" # Shortcuts alias cdd="cd ~/Desktop" +alias cdl="cd ~/Downloads" alias cdp="cd ~/Projects" +alias cdot="cd ~/Projects/dotfiles" alias g="git" alias h="history" alias j="jobs" From acb783e46315019a783dc00c3d9fb958db07af80 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 5 Oct 2016 10:58:20 -0400 Subject: [PATCH 018/141] - Integrated Flow support, added .flowconfig and .eslintrc rules. - Added progress bar to curlrc. - Modified .htmlhintrc with more sensible rules. - Added EOF extra lines. --- .curlrc | 2 ++ .eslintrc | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++-- .flowconfig | 5 ++++ .htmlhintrc | 12 +++++----- .stylelintrc | 4 ++-- 5 files changed, 78 insertions(+), 10 deletions(-) create mode 100644 .flowconfig diff --git a/.curlrc b/.curlrc index 481d94b899f..11d0350348a 100644 --- a/.curlrc +++ b/.curlrc @@ -6,3 +6,5 @@ referer = ";auto" # Wait 60 seconds before timing out. connect-timeout = 60 + +progress-bar diff --git a/.eslintrc b/.eslintrc index e57cc28987c..51f0b3aff55 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,4 +1,6 @@ { + "parser": "babel-eslint", + "env": { "browser": true, // browser global variables. "node": true, // Node.js global variables and Node.js-specific rules. @@ -15,7 +17,7 @@ }, "plugins": [ - + "flowtype" ], "parserOptions": { @@ -225,6 +227,59 @@ "no-confusing-arrow": 0, // Disallow arrow functions where they could be confused with comparisons + ////////// Flow ////////// + + "flowtype/boolean-style": [ + 2, + "boolean" + ], + "flowtype/define-flow-type": 1, + "flowtype/delimiter-dangle": [ + 2, + "never" + ], + "flowtype/generic-spacing": [ + 2, + "never" + ], + "flowtype/no-weak-types": 2, + "flowtype/require-parameter-type": 0, + "flowtype/require-return-type": [ + 2, + "never", + { + "annotateUndefined": "never" + } + ], + "flowtype/require-valid-file-annotation": 2, + "flowtype/semi": [ + 2, + "always" + ], + "flowtype/space-after-type-colon": [ + 2, + "always" + ], + "flowtype/space-before-generic-bracket": [ + 2, + "never" + ], + "flowtype/space-before-type-colon": [ + 2, + "never" + ], + "flowtype/type-id-match": [ + 2, + "^([A-Z][a-z0-9]+)+Type$" + ], + "flowtype/union-intersection-spacing": [ + 2, + "always" + ], + "flowtype/use-flow-type": 1, + "flowtype/valid-syntax": 1, + + ////////// Legacy ////////// "max-depth": 0, // specify the maximum depth that blocks can be nested (off by default) @@ -233,5 +288,11 @@ "max-statements": 0, // specify the maximum number of statement allowed in a function (off by default) "no-bitwise": 0, // disallow use of bitwise operators (off by default) "no-plusplus": 0 // disallow use of unary operators, ++ and -- (off by default) + }, + + "settings": { + "flowtype": { + "onlyFilesWithFlowAnnotation": true + } } -} \ No newline at end of file +} diff --git a/.flowconfig b/.flowconfig new file mode 100644 index 00000000000..5537e22dbec --- /dev/null +++ b/.flowconfig @@ -0,0 +1,5 @@ +[ignore] +.*/node_modules/.* +.*/bower_components/.* +.*/dist/.* +.*/build/.* \ No newline at end of file diff --git a/.htmlhintrc b/.htmlhintrc index a26fd777e92..031bbdd3ff5 100644 --- a/.htmlhintrc +++ b/.htmlhintrc @@ -2,21 +2,21 @@ "tagname-lowercase": true, "attr-lowercase": true, "attr-value-double-quotes": true, - "attr-value-not-empty": true, + "attr-value-not-empty": false, "attr-no-duplication": true, - "doctype-first": true, + "doctype-first": false, "tag-pair": true, "tag-self-close": true, "spec-char-escape": true, "id-unique": true, - "src-not-empty": true, - "head-script-disabled": true, + "src-not-empty": false, + "head-script-disabled": false, "alt-require": true, "doctype-html5": true, "id-class-value": true, "style-disabled": true, "space-tab-mixed-disabled": true, "id-class-ad-disabled": true, - "href-abs-or-rel": true, + "href-abs-or-rel": false, "attr-unsafe-chars": true -} \ No newline at end of file +} diff --git a/.stylelintrc b/.stylelintrc index 73a9e32d9d4..fa5ce7a026b 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -29,7 +29,7 @@ "comment-no-empty": true, "custom-property-no-outside-root": true, "custom-property-empty-line-before": ["always", { - "except": ["after-comment", "after-custom-property"], + "except": ["after-comment", "after-custom-property", "first-nested"], }], "declaration-bang-space-after": "never", "declaration-bang-space-before": "always", @@ -145,4 +145,4 @@ "value-list-comma-space-after": "always", "value-list-comma-space-before": "never", } -} \ No newline at end of file +} From c931465b30af9b4575cb8cd1de607e95bcc08f9d Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 10 Oct 2016 22:10:01 -0400 Subject: [PATCH 019/141] - Added VS Code config files. - Added React support to eslint. - Added function to ssh into vagrant from anywhere. - Added a couple dev tool brew installs commands. - Updated ignore files. - Updated README. --- .eslintignore | 5 +- .eslintrc | 5 +- .functions | 15 +- .gitignore | 1 + .vscode/extensions.json | 18 +++ .vscode/settings.json | 302 ++++++++++++++++++++++++++++++++++++++++ README.md | 2 + brew.sh | 6 +- 8 files changed, 346 insertions(+), 8 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.eslintignore b/.eslintignore index ab0e40f1cf8..4e38398a217 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,6 @@ **/.git/**/* **/node_modules/**/* **/components/**/* -**/vendor/**/* -**/dist/**/* \ No newline at end of file +**/bower_components/**/* +**/static/dist/**/* +**/static/build/**/* diff --git a/.eslintrc b/.eslintrc index 51f0b3aff55..d8b034454d5 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,9 +17,12 @@ }, "plugins": [ - "flowtype" + "flowtype", + "react" ], + "extends": ["eslint:recommended", "plugin:react/recommended"], + "parserOptions": { "sourceType": "module" }, diff --git a/.functions b/.functions index e99e2a0d900..17153f03d93 100644 --- a/.functions +++ b/.functions @@ -13,10 +13,17 @@ function npm-ls() npm list -g --depth=0 } - # Go to a django project's site root - function djp() { - cd ~/projects/$1/site/$1 - } +# Go to a django project's site root +function djp() +{ + cd ~/projects/$1/site/$1 +} + +function vagrant-ssh() +{ + cd ~/vagrant-ansible-devbox; + vagrant ssh; +} # Take full responsive screenshots of a webpage function screenshots() { diff --git a/.gitignore b/.gitignore index 63101a7715b..8d4b0e612a8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # Static files **/node_modules **/components +**/bower_components **/dist # Python diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000..2a7a52f7421 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,18 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + "abierbaum.vscode-file-peek", + "dbaeumer.jshint", + "dbaeumer.vscode-eslint", + "donjayamanne.python", + "flowtype.flow-for-vscode", + "minhthai.vscode-todo-parser", + "mkaufman.HTMLHint", + "ms-vscode.csharp", + "ms-vscode.typescript-javascript-grammar", + "robertohuertasm.vscode-icons", + "shinnn.stylelint" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..f3fac200a34 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,302 @@ +// Place your settings in this file to overwrite the default settings +{ + //-------- Editor configuration -------- + + "editor.tabSize": 4, + "editor.renderIndentGuides": true, + "editor.glyphMargin": true, + "editor.scrollBeyondLastLine": true, + "editor.mouseWheelZoom": false, + "editor.cursorStyle": "line", + "diffEditor.ignoreTrimWhitespace": false, + "editor.renderWhitespace": "boundary", + "editor.formatOnSave": false, + + "search.exclude": { + // GENERAL + "**/.git": true, + "**/node_modules": true, + "**/components": true, + "**/dist": true, + + // DJANGO + "**/migrations": true, + "**/south_migrations": true, + "**/lib": true, + + // JEKYLL + "**/_site": true + }, + + + //-------- Files configuration -------- + + "files.exclude": { + "**/*.pyc": true, + "**/*.sublime*": true + }, + + "files.trimTrailingWhitespace": true, + + + //-------- Icons -------- + + "vsicons.icons": "http://github.com/robertohuertasm/vscode-icons/blob/master/icons.zip?raw=true", + + // Greyscale + // "vsicons.icons": "https://github.com/jedmao/vscode-icons/blob/grayscale-icons/icons.zip?raw=true", + + + //-------- JSHint configuration -------- + + "jshint.enable": false, + + + //-------- ESLint configuration -------- + + "eslint.enable": true, + + + //-------- HTMLHint configuration -------- + + "htmlhint.enable": true, + + + //-------- StyleLint configuration -------- + + "stylelint.enable": true, + + + //-------- Python configuration -------- + + "python.linting.enabled": true, + "python.linting.pylintEnabled": false, + "python.linting.pep8Enabled": true, + + + //-------- Flow configuration -------- + + // Is flow enabled + "flow.enabled": true, + + + //-------- HTML configuration -------- + + // Maximum amount of characters per line (0 = disable). + "html.format.wrapLineLength": 120, + + // List of tags, comma separated, that shouldn't be reformatted. 'null' defaults to all tags listed at https://www.w3.org/TR/html5/dom.html#phrasing-content. + "html.format.unformatted": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, script, select, small, span, strong, sub, sup, textarea, tt, var", + + // Indent and sections. + "html.format.indentInnerHtml": false, + + // Whether existing line breaks before elements should be preserved. Only works before elements, not inside tags or for text. + "html.format.preserveNewLines": true, + + // Maximum number of line breaks to be preserved in one chunk. Use 'null' for unlimited. + "html.format.maxPreserveNewLines": null, + + // Format and indent {{#foo}} and {{/foo}}. + "html.format.indentHandlebars": false, + + // End with a newline. + "html.format.endWithNewline": false, + + // List of tags, comma separated, that should have an extra newline before them. 'null' defaults to "head, body, /html". + "html.format.extraLiners": "head, body, /html", + + + //-------- JavaScript configuration -------- + + // TODO: Noticed problems with these settings and eslint, consider removing. + "javascript.validate.enable": false, + "javascript.validate.semanticValidation": true, + "javascript.validate.syntaxValidation": true, + + // Always include all words from the current document. + "javascript.suggest.alwaysAllWords": false, + + // Complete functions with their parameter signature. + "javascript.suggest.useCodeSnippetsOnMethodSuggest": true, + + // Don't spare curly brackets. + "javascript.validate.lint.curlyBracketsMustNotBeOmitted": "error", + + // Empty block should have a comment. + "javascript.validate.lint.emptyBlocksWithoutComment": "error", + + // Use '!==' and '===' instead of '!=' and '=='. + "javascript.validate.lint.comparisonOperatorsNotStrict": "error", + + // Missing semicolon. + "javascript.validate.lint.missingSemicolon": "error", + + // Unexpected output of the 'typeof' operator. + "javascript.validate.lint.unknownTypeOfResults": "error", + + // Semicolon instead of block. + "javascript.validate.lint.semicolonsInsteadOfBlocks": "error", + + // Function inside loop. + "javascript.validate.lint.functionsInsideLoops": "error", + + // Function with lowercase name used as constructor. + "javascript.validate.lint.newOnLowercaseFunctions": "ignore", + + // Looks for mistyped triple-slash references. + "javascript.validate.lint.tripleSlashReferenceAlike": "error", + + // Unused local variable. + "javascript.validate.lint.unusedVariables": "error", + + // Unused local function. + "javascript.validate.lint.unusedFunctions": "error", + + // Parameters don't match a function signature + "javascript.validate.lint.parametersDontMatchSignature": "error", + + // Don't re-declare a variable and change its type. + "javascript.validate.lint.redeclaredVariables": "error", + + // Don't use an undeclared variable. + "javascript.validate.lint.undeclaredVariables": "error", + + // Don't use an unknown property. + "javascript.validate.lint.unknownProperty": "error", + + // Don't require an unknown module. + "javascript.validate.lint.unknownModule": "error", + + // Don't re-declare a variable type by an assignment. + "javascript.validate.lint.forcedTypeConversion": "error", + + // Only use numbers for arithmetic operations. + "javascript.validate.lint.mixedTypesArithmetics": "warning", + + // Don't use instanceof with primitive types. + "javascript.validate.lint.primitivesInInstanceOf": "error", + + // Function with return statement used as constructor. + "javascript.validate.lint.newOnReturningFunctions": "error", + + + //-------- CSS configuration -------- + + // TODO: Noticed problems with these settings and stylelint, consider removing. + "css.validate": false, + + // When using a vendor-specific prefix make sure to also include all other vendor-specific properties + "css.lint.compatibleVendorPrefixes": "warning", + + // When using a vendor-specific prefix also include the standard property + "css.lint.vendorPrefix": "warning", + + // Do not use duplicate style definitions + "css.lint.duplicateProperties": "error", + + // Do not use empty rulesets + "css.lint.emptyRules": "error", + + // Import statements do not load in parallel + "css.lint.importStatement": "warning", + + // Do not use width or height when using padding or border + "css.lint.boxModel": "ignore", + + // The universal selector (*) is known to be slow + "css.lint.universalSelector": "ignore", + + // No unit for zero needed + "css.lint.zeroUnits": "error", + + // @font-face rule must define 'src' and 'font-family' properties + "css.lint.fontFaceProperties": "warning", + + // Hex colors must consist of three or six hex numbers + "css.lint.hexColorLength": "error", + + // Invalid number of parameters + "css.lint.argumentsInColorFunction": "error", + + // Unknown property. + "css.lint.unknownProperties": "error", + + // IE hacks are only necessary when supporting IE7 and older + "css.lint.ieHack": "warning", + + // Unknown vendor specific property. + "css.lint.unknownVendorSpecificProperties": "error", + + // Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect + "css.lint.propertyIgnoredDueToDisplay": "error", + + // Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. + "css.lint.important": "warning", + + // Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. + "css.lint.float": "ignore", + + // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. + "css.lint.idSelector": "ignore", + + + //-------- LESS configuration -------- + + // TODO: Noticed problems with these settings and stylelint, consider removing. + "less.validate": false, + + // When using a vendor-specific prefix make sure to also include all other vendor-specific properties + "less.lint.compatibleVendorPrefixes": "warning", + + // When using a vendor-specific prefix also include the standard property + "less.lint.vendorPrefix": "warning", + + // Do not use duplicate style definitions + "less.lint.duplicateProperties": "error", + + // Do not use empty rulesets + "less.lint.emptyRules": "error", + + // Import statements do not load in parallel + "less.lint.importStatement": "warning", + + // Do not use width or height when using padding or border + "less.lint.boxModel": "ignore", + + // The universal selector (*) is known to be slow + "less.lint.universalSelector": "ignore", + + // No unit for zero needed + "less.lint.zeroUnits": "error", + + // @font-face rule must define 'src' and 'font-family' properties + "less.lint.fontFaceProperties": "warning", + + // Hex colors must consist of three or six hex numbers + "less.lint.hexColorLength": "error", + + // Invalid number of parameters + "less.lint.argumentsInColorFunction": "error", + + // Unknown property. + "less.lint.unknownProperties": "error", + + // IE hacks are only necessary when supporting IE7 and older + "less.lint.ieHack": "warning", + + // Unknown vendor specific property. + "less.lint.unknownVendorSpecificProperties": "warning", + + // Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect + "less.lint.propertyIgnoredDueToDisplay": "error", + + // Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. + "less.lint.important": "warning", + + // Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. + "less.lint.float": "ignore", + + // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. + "less.lint.idSelector": "ignore" +} \ No newline at end of file diff --git a/README.md b/README.md index 8369c06f086..1d7333022cf 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,5 @@ https://github.com/mathiasbynens/dotfiles.git ## TODOs * Bootstrap.sh - Implement symlink creation of files nested in folders (currently only creates links one level deep, in the root). +* .vscode/settings.json - This currently needs to be symlinked to VS Code's machine config location (`~/Library/Application\ Support/Code/User/`). +* .vscode/extensions.json - Would be nice to find a way to generate this automatically from currently installed extensions. diff --git a/brew.sh b/brew.sh index cf3343c514f..e12cbae6836 100644 --- a/brew.sh +++ b/brew.sh @@ -60,5 +60,9 @@ brew install webkit2png # Take full screenshots of a webpage # brew install zopfli # Ability to use Zopfli compression brew install gnupg gnupg2 # Encrypt and sign data/communication via GnuPG +# Development +brew install mongodb # Install MongoDB, a NoSQL database +brew install watchman # Instal Watchman, a file watching tool + # Remove outdated versions from the cellar. -brew cleanup \ No newline at end of file +brew cleanup From b70bbb23ce5a7a2a004becd974e85b580fd10d8d Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 12 Oct 2016 09:23:52 -0400 Subject: [PATCH 020/141] - Added brew casks for common applications I know I'll need. - Added some missing development brews. --- brew.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/brew.sh b/brew.sh index e12cbae6836..e53d6dfabe0 100644 --- a/brew.sh +++ b/brew.sh @@ -61,8 +61,24 @@ brew install webkit2png # Take full screenshots of a webpage brew install gnupg gnupg2 # Encrypt and sign data/communication via GnuPG # Development -brew install mongodb # Install MongoDB, a NoSQL database -brew install watchman # Instal Watchman, a file watching tool +brew install python # Python language +brew install nginx # High performance load balancer, web server and reverse proxy +brew install node # Server-side JavaScript +brew install mongodb # NoSQL database +brew install watchman # File watching tool + +# Applications +brew cask install iterm2 # Improved Mac Terminal +brew cask install opera # Opera browser +brew cask install google-chrome # Chrome browser +brew cask install firefox # Firefox browser +brew cask install visual-studio-code # VS Code text editor +brew cask install slack # IM team chat application +brew cask install spotify # Music subsciption service/player +brew cask install postman # API request compose/debugger +brew cask install virtual-box # Oracle VM +brew cask install vagrant # Development environment generator # Remove outdated versions from the cellar. brew cleanup +brew cask cleanup From e923a10509414ddc6b9061456bb385f7a75ce91b Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 12 Oct 2016 22:05:22 -0400 Subject: [PATCH 021/141] - Added npm-store, which saves global npm packages to text file in case they need to be reinstalled later (unfortunately, a manual task atm). - Removed brew.sh from bootstrap script. - Updated README. --- .functions | 8 +++++++- README.md | 1 + bootstrap.sh | 2 +- npm-ls.txt | 12 ++++++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 npm-ls.txt diff --git a/.functions b/.functions index 17153f03d93..b7b46084d86 100644 --- a/.functions +++ b/.functions @@ -7,12 +7,18 @@ function touchgo() vim $1; } -# List user installed npm packages +# List global npm packages function npm-ls() { npm list -g --depth=0 } +# Store global npm packages +function npm-store() +{ + npm-ls > ~/npm-ls.txt +} + # Go to a django project's site root function djp() { diff --git a/README.md b/README.md index 1d7333022cf..e5cff83b3d7 100644 --- a/README.md +++ b/README.md @@ -7,5 +7,6 @@ https://github.com/mathiasbynens/dotfiles.git ## TODOs * Bootstrap.sh - Implement symlink creation of files nested in folders (currently only creates links one level deep, in the root). +* node-ls.txt - Manually generated (`npm-store`) _and_ installed list of global npm packages. Would be awesome if this could all be automated. * .vscode/settings.json - This currently needs to be symlinked to VS Code's machine config location (`~/Library/Application\ Support/Code/User/`). * .vscode/extensions.json - Would be nice to find a way to generate this automatically from currently installed extensions. diff --git a/bootstrap.sh b/bootstrap.sh index 93940b0d4f7..49025d9fb77 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -7,7 +7,7 @@ function doIt() { DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" # Currently only links one level deep :( - find . -mindepth 1 -maxdepth 1 -type f \( -iname "*" ! -iname ".DS_Store" ! -iname "README.md" ! -iname "bootstrap.sh" \) -not -path "./.git/*" | sed 's#.*/##' | while read file; do + find . -mindepth 1 -maxdepth 1 -type f \( -iname "*" ! -iname ".DS_Store" ! -iname "README.md" ! -iname "bootstrap.sh" ! -iname "brew.sh" \) -not -path "./.git/*" | sed 's#.*/##' | while read file; do echo "Removing $file from $HOME." rm "$HOME/$file" diff --git a/npm-ls.txt b/npm-ls.txt new file mode 100644 index 00000000000..ad132fa9fec --- /dev/null +++ b/npm-ls.txt @@ -0,0 +1,12 @@ +/usr/local/lib +├── babel-eslint@7.0.0 +├── eslint@3.7.1 +├── eslint-plugin-flowtype@2.20.0 +├── eslint-plugin-react@6.4.1 +├── flow-bin@0.33.0 +├── htmlhint@0.9.13 +├── jshint@2.9.3 +├── npm@3.10.7 +├── react-native-cli@1.0.0 +└── stylelint@7.4.2 + From c9f126c8a50d0ece41e633cb60d49cf4682e81c4 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 12 Oct 2016 23:23:31 -0400 Subject: [PATCH 022/141] - Added pip.sh. - Updated README with setup instructions. - Removed un-needed brew installs. --- README.md | 15 ++++++++++++++- brew.sh | 4 +--- pip.sh | 8 ++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 pip.sh diff --git a/README.md b/README.md index e5cff83b3d7..e77ed53a2e5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,20 @@ Forked from Mathias Bynens' excellent repo! https://github.com/mathiasbynens/dotfiles.git -## TODOs +## Steps to Configure Environment +1. Install Xcode +2. Install Homebrew. +3. `source brew.sh` +3. `source pip.sh` +4. `source bootstrap.sh` +5. Manually symlink nested files to their appropriate locations (I'll add these steps to `bootstrap.sh` eventually). +6. Manually install global npm packages listed in `npm-ls.txt` (hopefully, this can be automated at some point). +7. `source .macos` +8. Restart. +9. ???? +10. PROFIT!!! + +### TODOs * Bootstrap.sh - Implement symlink creation of files nested in folders (currently only creates links one level deep, in the root). * node-ls.txt - Manually generated (`npm-store`) _and_ installed list of global npm packages. Would be awesome if this could all be automated. diff --git a/brew.sh b/brew.sh index e53d6dfabe0..faf19eed302 100644 --- a/brew.sh +++ b/brew.sh @@ -62,7 +62,7 @@ brew install gnupg gnupg2 # Encrypt and sign data/communication vi # Development brew install python # Python language -brew install nginx # High performance load balancer, web server and reverse proxy +brew install nginx # High performance load balancer, web server and reverse proxy brew install node # Server-side JavaScript brew install mongodb # NoSQL database brew install watchman # File watching tool @@ -76,8 +76,6 @@ brew cask install visual-studio-code # VS Code text editor brew cask install slack # IM team chat application brew cask install spotify # Music subsciption service/player brew cask install postman # API request compose/debugger -brew cask install virtual-box # Oracle VM -brew cask install vagrant # Development environment generator # Remove outdated versions from the cellar. brew cleanup diff --git a/pip.sh b/pip.sh new file mode 100644 index 00000000000..1e7f3e7b0db --- /dev/null +++ b/pip.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# Install pip packages. + +# Make sure we’re using the latest pip. +pip install --upgrade pip + +pip install pep8 From 9a4faa8ee7c21f77f177af0732e34d21f53dff21 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 12 Oct 2016 23:25:41 -0400 Subject: [PATCH 023/141] - Updated README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e77ed53a2e5..d708700c6af 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Forked from Mathias Bynens' excellent repo! https://github.com/mathiasbynens/dotfiles.git -## Steps to Configure Environment +## Steps to Configure (OSX) Environment 1. Install Xcode 2. Install Homebrew. 3. `source brew.sh` From f5775ea4db51a3054a235ba03cb7f872b5ff7ebf Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 13 Oct 2016 18:58:10 -0400 Subject: [PATCH 024/141] - Added git back command. --- .gitconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index 0e5317f1f58..62bd38bbd89 100644 --- a/.gitconfig +++ b/.gitconfig @@ -28,6 +28,9 @@ # Switch to a branch, creating it if necessary go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" + # Switch to last branch + back = !"git checkout -" + # Show verbose output about tags, branches or remotes tags = tag -l branches = branch -a @@ -62,7 +65,7 @@ dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" # List contributors with number of commits - contributors = shortlog --summary --numbered + contrib = shortlog --summary --numbered # Merge GitHub pull request on top of the current branch or, # if a branch name is specified, on top of the specified branch From edc07983c5410d4f20f72121a42111965364da09 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 17 Oct 2016 11:57:45 -0400 Subject: [PATCH 025/141] - Removing rule that requires capitalized functions to be "new-ed" (causing too many issues with vendor libraries). --- .eslintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index d8b034454d5..bc6e5efad5f 100644 --- a/.eslintrc +++ b/.eslintrc @@ -182,7 +182,7 @@ "func-style": 0, // enforces use of function declarations or expressions (off by default) "key-spacing": 1, // enforces spacing between keys and values in object literal properties "max-nested-callbacks": [1, 3], // specify the maximum depth callbacks can be nested (off by default) - "new-cap": 1, // require a capital letter for constructors + "new-cap": 0, // require a capital letter for constructors "new-parens": 1, // disallow the omission of parentheses when invoking a constructor with no arguments "no-array-constructor": 2, // disallow use of the Array constructor "no-inline-comments": 0, // disallow comments inline after code (off by default) From 3cb77aed0dae1d6835f7028e542aa1bc1526997c Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 17 Oct 2016 17:48:46 -0400 Subject: [PATCH 026/141] - Added `ding` command to alert when process finishes. - Added some useful dev tools to `brew.sh`. --- .functions | 7 +++++++ brew.sh | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.functions b/.functions index b7b46084d86..3eb66156519 100644 --- a/.functions +++ b/.functions @@ -25,12 +25,19 @@ function djp() cd ~/projects/$1/site/$1 } +# SSH into vagrant box function vagrant-ssh() { cd ~/vagrant-ansible-devbox; vagrant ssh; } +# Emit notification popup letting me know some terminal tasks just finished. +function ding() { + tput bel; + osascript -e 'display notification "Ding! Something just finished!" with title "iTerm"'; +} + # Take full responsive screenshots of a webpage function screenshots() { local array=(1600 768 320) diff --git a/brew.sh b/brew.sh index faf19eed302..ed136ddce49 100644 --- a/brew.sh +++ b/brew.sh @@ -50,10 +50,10 @@ brew install exiv2 # Read/Write image metadata brew install git # Source control brew install git-lfs # System for managing large files in source control via Git LFS brew install imagemagick --with-webp # Create, edit, compose or convert bitmap images -# brew install p7zip # 7zip for Mac +brew install p7zip # 7zip for Mac # brew install pigz # Parallel implementation of gzip brew install speedtest_cli # Test your internet connection speed -# brew install ssh-copy-id # Add ssh identity to remote host for easy login +brew install ssh-copy-id # Add ssh identity to remote host for easy login brew install testssl # Test ssl configuration strength brew install tree # View tree list of folder/file structures brew install webkit2png # Take full screenshots of a webpage @@ -73,6 +73,7 @@ brew cask install opera # Opera browser brew cask install google-chrome # Chrome browser brew cask install firefox # Firefox browser brew cask install visual-studio-code # VS Code text editor +brew cask install brackets # Brackets text editor brew cask install slack # IM team chat application brew cask install spotify # Music subsciption service/player brew cask install postman # API request compose/debugger From a166bc2b6de2d75be0b7ed3e8194006080953234 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 19 Oct 2016 10:02:03 -0400 Subject: [PATCH 027/141] - Updated `vagrant-ssh`, now connects into default vagrant box from anywhere (no need to `cd` you into the vagrant folder). --- .aliases | 2 +- .functions | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.aliases b/.aliases index 3e008601eb1..4b488632639 100644 --- a/.aliases +++ b/.aliases @@ -59,7 +59,7 @@ alias update='sudo softwareupdate -i -a; brew update; brew upgrade --all; sudo n # IP addresses alias ip="dig +short myip.opendns.com @resolver1.opendns.com" -alias localip="ipconfig getifaddr en0" +alias ipl="ipconfig getifaddr en0" alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" # Flush Directory Service cache diff --git a/.functions b/.functions index 3eb66156519..b502773d1f5 100644 --- a/.functions +++ b/.functions @@ -25,11 +25,12 @@ function djp() cd ~/projects/$1/site/$1 } -# SSH into vagrant box +# SSH into default vagrant box (first in global list, if you have multiple) function vagrant-ssh() { - cd ~/vagrant-ansible-devbox; - vagrant ssh; + id=$(vagrant global-status | sed -n '/id/{n;n;p;}' | cut -c 1-7) + + vagrant ssh $id } # Emit notification popup letting me know some terminal tasks just finished. From 594709d3e7c24d20aeb5978c806727228f9a53f2 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 19 Oct 2016 17:37:52 -0400 Subject: [PATCH 028/141] - Turned off git `autocrlf`. --- .eslintrc | 2 +- .gitconfig | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index bc6e5efad5f..5f56497cb44 100644 --- a/.eslintrc +++ b/.eslintrc @@ -120,7 +120,7 @@ "no-void": 1, // disallow use of void operator (off by default) "no-warning-comments": 0, // disallow usage of configurable warning terms in comments, e.g. TODO or FIXME (off by default) "no-with": 1, // disallow use of the with statement - "radix": 1, // require use of the second argument for parseInt() (off by default) + "radix": 0, // require use of the second argument for parseInt() (off by default) "vars-on-top": 0, // requires to declare all vars on top of their containing scope (off by default) "wrap-iife": [1, "inside"], // require immediate function invocation to be wrapped in parentheses (off by default) "yoda": [1, "never"], // require or disallow Yoda conditions diff --git a/.gitconfig b/.gitconfig index 62bd38bbd89..76dbf5a698e 100644 --- a/.gitconfig +++ b/.gitconfig @@ -107,6 +107,8 @@ # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html precomposeunicode = false + autocrlf = false + [color] # Use colors in Git commands that are capable of colored output when From bc8c15fffd06fd588a1790ece0bf860f40a10d94 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 22 Oct 2016 14:19:52 -0400 Subject: [PATCH 029/141] - Marked some larger file formats as binary (git will ignore line endings). - Ignore npm-log files. --- .gitattributes | 17 ++++++++++++----- .gitignore | 3 +++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitattributes b/.gitattributes index 282b550db23..a31c71852b9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,12 @@ -# Add all zip files through Git LFS -*.bin filter=lfs diff=lfs merge=lfs -text -*.dll filter=lfs diff=lfs merge=lfs -text -*.zip filter=lfs diff=lfs merge=lfs -text -*.psd filter=lfs diff=lfs merge=lfs -text \ No newline at end of file +# Binaries +*.bin binary +*.dll binary +*.zip binary +*.psd binary + +# Git LFS +# Temporarily disabled because it messes with older repos at work. +# *.bin filter=lfs diff=lfs merge=lfs -text +# *.dll filter=lfs diff=lfs merge=lfs -text +# *.zip filter=lfs diff=lfs merge=lfs -text +# *.psd filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index 8d4b0e612a8..91f172fcbe6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,9 @@ **/*.pyc **/*.sqlite3 +# Node +**/npm-debug.log + # Folder view configuration files **/.DS_Store **/Desktop.ini From b0585381326fb68aec0c970d7c657e6e7eb26005 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 25 Oct 2016 22:17:03 -0400 Subject: [PATCH 030/141] - Added RDM to brew casks. - ESLint favour undefined > null. - Added pygments to `pip.sh` (needed for `json` function). --- .bashrc | 4 +++- .eslintrc | 4 ++-- brew.sh | 1 + pip.sh | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.bashrc b/.bashrc index 75d6187d884..a3b7a203f31 100644 --- a/.bashrc +++ b/.bashrc @@ -3,4 +3,6 @@ # OLD export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting -[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* \ No newline at end of file +[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* + +export PATH="/usr/local/sbin:$PATH" # Add Homebrew's sbin to PATH (`brew doctor` suggestion) diff --git a/.eslintrc b/.eslintrc index 5f56497cb44..485759f66a0 100644 --- a/.eslintrc +++ b/.eslintrc @@ -90,7 +90,7 @@ "no-caller": 0, // disallow use of arguments.caller or arguments.callee "no-div-regex": 1, // disallow division operators explicitly at beginning of regular expression (off by default) "no-else-return": 1, // disallow else after a return in an if (off by default) - "no-eq-null": 0, // disallow comparisons to null without a type-checking operator (off by default) + "no-eq-null": 2, // disallow comparisons to null without a type-checking operator (off by default) "no-eval": 0, // disallow use of eval() "no-extend-native": 0, // disallow adding to native types "no-extra-bind": 0, // disallow unnecessary function binding @@ -141,7 +141,7 @@ "no-shadow-restricted-names": 2, // disallow shadowing of names such as arguments "no-undef": 2, // disallow use of undeclared variables unless mentioned in a /*global */ block "no-undef-init": 2, // disallow use of undefined when initializing variables - "no-undefined": 2, // disallow use of undefined variable (off by default) + "no-undefined": 0, // disallow use of undefined variable (off by default) "no-unused-vars": 2, // disallow declaration of variables that are not used in the code "no-use-before-define": 2, // disallow use of variables before they are defined diff --git a/brew.sh b/brew.sh index ed136ddce49..a9591659d31 100644 --- a/brew.sh +++ b/brew.sh @@ -77,6 +77,7 @@ brew cask install brackets # Brackets text editor brew cask install slack # IM team chat application brew cask install spotify # Music subsciption service/player brew cask install postman # API request compose/debugger +brew cask install avibrazil-rdm # Screen display client that lets you set insanely high resolutions # Remove outdated versions from the cellar. brew cleanup diff --git a/pip.sh b/pip.sh index 1e7f3e7b0db..a0b55fc539b 100644 --- a/pip.sh +++ b/pip.sh @@ -5,4 +5,5 @@ # Make sure we’re using the latest pip. pip install --upgrade pip -pip install pep8 +pip install pep8 # Python Linter +pip install pygments # Syntax highlighter From 5cdc78acba77be00d74ca55bc7cf692a5784ca1e Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 2 Nov 2016 10:05:38 -0400 Subject: [PATCH 031/141] - Updated `git l`, shows more data on commits + nice colours. --- .gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index 76dbf5a698e..c3e3eaf3aa9 100644 --- a/.gitconfig +++ b/.gitconfig @@ -5,7 +5,7 @@ [alias] # View abbreviated SHA, description, and history graph of the latest 20 commits - l = log --pretty=oneline -n 20 --graph --abbrev-commit + l = log --pretty=format:'%C(yellow)%h %Cblue%ad %Cgreen%aN %Creset%s %C(auto,cyan)% %d' -n 20 --graph --abbrev-commit --date=relative # View the current working tree status using the short format s = status -s From bc9ef96d7cc02d826992aeb92479746580d3673f Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 2 Nov 2016 11:52:34 -0400 Subject: [PATCH 032/141] - Unified colour defs in `git l`. --- .gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index c3e3eaf3aa9..3dfed2c5dd4 100644 --- a/.gitconfig +++ b/.gitconfig @@ -5,7 +5,7 @@ [alias] # View abbreviated SHA, description, and history graph of the latest 20 commits - l = log --pretty=format:'%C(yellow)%h %Cblue%ad %Cgreen%aN %Creset%s %C(auto,cyan)% %d' -n 20 --graph --abbrev-commit --date=relative + l = log --pretty=format:'%C(auto,yellow)%h %C(auto,blue)%ad %C(auto,green)%aN %Creset%s %C(auto,cyan)% %d' -n 20 --graph --abbrev-commit --date=relative # View the current working tree status using the short format s = status -s From 1dd87d184d3018c8353c13db2d5238814309cddc Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 6 Nov 2016 15:25:55 -0500 Subject: [PATCH 033/141] - Updated .gitignore. - Updated settings.json. --- .gitignore | 7 +++++++ .vscode/settings.json | 1 + 2 files changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 91f172fcbe6..2c01eff350d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,13 @@ # Node **/npm-debug.log +# ESLint +.eslintcache + +# Istanbul +/coverage +/.nyc_output + # Folder view configuration files **/.DS_Store **/Desktop.ini diff --git a/.vscode/settings.json b/.vscode/settings.json index f3fac200a34..592a29f3d32 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -55,6 +55,7 @@ //-------- ESLint configuration -------- "eslint.enable": true, + "eslint.autoFixOnSave": false, //-------- HTMLHint configuration -------- From e633c7d929766e7400f6dd895f485b9b3e4fa27b Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 11 Nov 2016 11:04:05 -0500 Subject: [PATCH 034/141] - Removed `ding`, going to use existing `badge` instead. - Added `fix-time` method for when comp gets out of sync with Apple server time. - Updated global npm list, vs extensions. --- .aliases | 3 --- .bashrc | 5 +++++ .functions | 7 +++---- .vscode/extensions.json | 3 ++- .vscode/settings.json | 1 + npm-ls.txt | 13 ++++++++++--- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.aliases b/.aliases index 4b488632639..715c2f2d78a 100644 --- a/.aliases +++ b/.aliases @@ -86,9 +86,6 @@ jscbin="/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources [ -e "${jscbin}" ] && alias jsc="${jscbin}"; unset jscbin; -# Trim new lines and copy to clipboard -alias c="tr -d '\n' | pbcopy" - # Recursively delete `.DS_Store` files alias cleanup="find . -type f -name '*.DS_Store' -ls -delete" diff --git a/.bashrc b/.bashrc index a3b7a203f31..640ad608512 100644 --- a/.bashrc +++ b/.bashrc @@ -6,3 +6,8 @@ export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* export PATH="/usr/local/sbin:$PATH" # Add Homebrew's sbin to PATH (`brew doctor` suggestion) + +# NOTE: This was added automatically, not sure how just yet... Going to leave commented, in case I find out its actually needed. +# export PYTHONPATH=.:..:../lib +# if [ -f ~/.git-completion.sh ]; then . ~/.git-completion.sh; fi +# export PS1='\T-\u \w$(__git_ps1 "(%s)")\$ ' diff --git a/.functions b/.functions index b502773d1f5..dc8859c0e51 100644 --- a/.functions +++ b/.functions @@ -33,10 +33,9 @@ function vagrant-ssh() vagrant ssh $id } -# Emit notification popup letting me know some terminal tasks just finished. -function ding() { - tput bel; - osascript -e 'display notification "Ding! Something just finished!" with title "iTerm"'; +# Fix system time, match with Apple server time. +function fix-time() { + sudo ntpdate -u time.apple.com } # Take full responsive screenshots of a webpage diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 2a7a52f7421..f7a360b8717 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -13,6 +13,7 @@ "ms-vscode.csharp", "ms-vscode.typescript-javascript-grammar", "robertohuertasm.vscode-icons", - "shinnn.stylelint" + "shinnn.stylelint", + "PeterJausovec.vscode-docker" ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 592a29f3d32..479cb714c67 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,6 +11,7 @@ "diffEditor.ignoreTrimWhitespace": false, "editor.renderWhitespace": "boundary", "editor.formatOnSave": false, + "extensions.autoUpdate": true, "search.exclude": { // GENERAL diff --git a/npm-ls.txt b/npm-ls.txt index ad132fa9fec..a2ac8a76e4e 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -1,12 +1,19 @@ /usr/local/lib ├── babel-eslint@7.0.0 -├── eslint@3.7.1 +├── bower@1.7.9 +├── caniuse-cmd@1.3.1 +├── eslint@3.9.1 ├── eslint-plugin-flowtype@2.20.0 -├── eslint-plugin-react@6.4.1 +├── eslint-plugin-react@6.5.0 ├── flow-bin@0.33.0 +├── generator-aspnet@0.2.4 +├── grunt@1.0.1 +├── grunt-cli@1.2.0 ├── htmlhint@0.9.13 ├── jshint@2.9.3 ├── npm@3.10.7 ├── react-native-cli@1.0.0 -└── stylelint@7.4.2 +├── stylelint@7.4.2 +├── webpack@1.13.3 +└── yo@1.8.5 From 2fd13621bbc153936db8ea89e4146669691436c7 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 11 Nov 2016 11:22:54 -0500 Subject: [PATCH 035/141] Updated `brew.sh` and `pip.sh` permissions, marked them as executable. --- brew.sh | 0 pip.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 brew.sh mode change 100644 => 100755 pip.sh diff --git a/brew.sh b/brew.sh old mode 100644 new mode 100755 diff --git a/pip.sh b/pip.sh old mode 100644 new mode 100755 From ffb5382878bf659da76923189156ed6919eb5efc Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 22 Nov 2016 15:31:25 -0500 Subject: [PATCH 036/141] - Marked *.sh files as executable. - Removed extensions and brew installs. --- .vscode/extensions.json | 3 +-- brew.sh | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index f7a360b8717..2a7a52f7421 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -13,7 +13,6 @@ "ms-vscode.csharp", "ms-vscode.typescript-javascript-grammar", "robertohuertasm.vscode-icons", - "shinnn.stylelint", - "PeterJausovec.vscode-docker" + "shinnn.stylelint" ] } \ No newline at end of file diff --git a/brew.sh b/brew.sh index a9591659d31..ed136ddce49 100755 --- a/brew.sh +++ b/brew.sh @@ -77,7 +77,6 @@ brew cask install brackets # Brackets text editor brew cask install slack # IM team chat application brew cask install spotify # Music subsciption service/player brew cask install postman # API request compose/debugger -brew cask install avibrazil-rdm # Screen display client that lets you set insanely high resolutions # Remove outdated versions from the cellar. brew cleanup From 00360f33e03761b38028adf4a30a47ef6d53f546 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 29 Nov 2016 13:17:38 -0500 Subject: [PATCH 037/141] - Replaced folder "components" with "build" in gitignore. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2c01eff350d..c9d91a4cf66 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,9 @@ # Static files **/node_modules -**/components **/bower_components **/dist +**/build # Python **/*.pyc From 6deb45173b36b247d9fc8f278cef98903578c88b Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 2 Dec 2016 18:32:20 -0500 Subject: [PATCH 038/141] - Added wttr and cowsay. --- .vscode/settings.json | 3 ++- npm-ls.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 479cb714c67..2702d76b6c8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -300,5 +300,6 @@ "less.lint.float": "ignore", // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. - "less.lint.idSelector": "ignore" + "less.lint.idSelector": "ignore", + "vsicons.dontShowNewVersionMessage": true } \ No newline at end of file diff --git a/npm-ls.txt b/npm-ls.txt index a2ac8a76e4e..44ef98b5fc1 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -2,6 +2,7 @@ ├── babel-eslint@7.0.0 ├── bower@1.7.9 ├── caniuse-cmd@1.3.1 +├── cowsay@1.1.8 ├── eslint@3.9.1 ├── eslint-plugin-flowtype@2.20.0 ├── eslint-plugin-react@6.5.0 @@ -15,5 +16,6 @@ ├── react-native-cli@1.0.0 ├── stylelint@7.4.2 ├── webpack@1.13.3 +├── wttr@0.0.4 └── yo@1.8.5 From 27e90b00a146b78f32713d038475c8ff35b1fa6f Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 8 Dec 2016 17:05:55 -0500 Subject: [PATCH 039/141] - Updated `extensions.json`. --- .vscode/extensions.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 2a7a52f7421..62f772ae94b 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -13,6 +13,8 @@ "ms-vscode.csharp", "ms-vscode.typescript-javascript-grammar", "robertohuertasm.vscode-icons", - "shinnn.stylelint" + "shinnn.stylelint", + "vsmobile.vscode-react-native", + "waderyan.gitblame" ] -} \ No newline at end of file +} From 1c562bf7b09c040eea3591375d5106ad031451b6 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 15 Dec 2016 09:37:02 -0500 Subject: [PATCH 040/141] - Updated `.bash_profile`, now adds all relevant ssh keys on terminal load. - Removed jshint, don't really need it with eslint. --- .bash_profile | 7 +++++++ .vscode/extensions.json | 1 - npm-ls.txt | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.bash_profile b/.bash_profile index 139a0c65b39..14b76a46d4a 100644 --- a/.bash_profile +++ b/.bash_profile @@ -46,3 +46,10 @@ complete -W "NSGlobalDomain" defaults; # Add `killall` tab completion for common apps complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall; + +# Start ssh agent and add all keys. +if [ $SSH_AUTH_SOCK ]; then + eval `ssh-agent -s` + ssh-add + ssh-add "$HOME/.ssh/id_rsa_union" +fi diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 62f772ae94b..5664fddb97b 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -4,7 +4,6 @@ "recommendations": [ // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp "abierbaum.vscode-file-peek", - "dbaeumer.jshint", "dbaeumer.vscode-eslint", "donjayamanne.python", "flowtype.flow-for-vscode", diff --git a/npm-ls.txt b/npm-ls.txt index 44ef98b5fc1..3da4ba28352 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -11,7 +11,6 @@ ├── grunt@1.0.1 ├── grunt-cli@1.2.0 ├── htmlhint@0.9.13 -├── jshint@2.9.3 ├── npm@3.10.7 ├── react-native-cli@1.0.0 ├── stylelint@7.4.2 From 8ed36514d995774b520adaf48cf83db08b11a702 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 15 Dec 2016 09:58:10 -0500 Subject: [PATCH 041/141] - Modified ssh-add script form last commit, now only adds keys if there are none. --- .bash_profile | 4 ++-- .functions | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bash_profile b/.bash_profile index 14b76a46d4a..7fe860b42b9 100644 --- a/.bash_profile +++ b/.bash_profile @@ -47,8 +47,8 @@ complete -W "NSGlobalDomain" defaults; # Add `killall` tab completion for common apps complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall; -# Start ssh agent and add all keys. -if [ $SSH_AUTH_SOCK ]; then +# Start ssh agent and add all relevant keys if no keys are currently available. +if [[ $SSH_AUTH_SOCK && $(ssh-add -l | grep "The agent has no identities") ]]; then eval `ssh-agent -s` ssh-add ssh-add "$HOME/.ssh/id_rsa_union" diff --git a/.functions b/.functions index dc8859c0e51..6df5aa5a07f 100644 --- a/.functions +++ b/.functions @@ -20,7 +20,7 @@ function npm-store() } # Go to a django project's site root -function djp() +function djp() { cd ~/projects/$1/site/$1 } From 4af220cb67214bc6aa988a2274a8ef0e01f5e0cd Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 24 Dec 2016 14:31:44 -0500 Subject: [PATCH 042/141] - Removed custom flow linting in favour of recommended settings. --- .eslintrc | 69 ++++++++----------------------------------------------- 1 file changed, 9 insertions(+), 60 deletions(-) diff --git a/.eslintrc b/.eslintrc index 485759f66a0..b1deb9138cc 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,7 +7,7 @@ "amd": true, // defines require() and define() as global variables as per the amd spec. "mocha": true, // adds all of the Mocha testing global variables. "jasmine": true, // adds all of the Jasmine testing global variables for version 1.3 and 0.0. - "jquery": true, // jquery global variables. + "jquery": true, // jquery global variables. "es6": true // enable es6 keywords, except module. }, @@ -21,14 +21,16 @@ "react" ], - "extends": ["eslint:recommended", "plugin:react/recommended"], + "extends": [ + "eslint:recommended", + "plugin:react/recommended", + "plugin:flowtype/recommended" + ], "parserOptions": { "sourceType": "module" }, - // Uncomment for ES6 validation. - "ecmaFeatures": { "binaryLiterals": true, // enable binary literals "blockBindings": true, // enable let and const (aka block bindings) @@ -143,7 +145,7 @@ "no-undef-init": 2, // disallow use of undefined when initializing variables "no-undefined": 0, // disallow use of undefined variable (off by default) "no-unused-vars": 2, // disallow declaration of variables that are not used in the code - "no-use-before-define": 2, // disallow use of variables before they are defined + "no-use-before-define": 0, // disallow use of variables before they are defined ////////// Node.js ////////// @@ -209,7 +211,7 @@ "sort-vars": 0, // sort variables within the same declaration block (off by default) "space-before-blocks": 1, // require or disallow space before blocks (off by default) "object-curly-spacing": [1, "always"], // require or disallow spaces inside curly braces (off by default) - "array-bracket-spacing": [1, "never"], // require or disallow spaces inside array brackets (off by default) + "array-bracket-spacing": [1, "always"], // require or disallow spaces inside array brackets (off by default) "space-in-parens": 0, // require or disallow spaces inside parentheses (off by default) "space-infix-ops": 0, // require spaces around operators "keyword-spacing": 1, // require a space after keywords @@ -230,59 +232,6 @@ "no-confusing-arrow": 0, // Disallow arrow functions where they could be confused with comparisons - ////////// Flow ////////// - - "flowtype/boolean-style": [ - 2, - "boolean" - ], - "flowtype/define-flow-type": 1, - "flowtype/delimiter-dangle": [ - 2, - "never" - ], - "flowtype/generic-spacing": [ - 2, - "never" - ], - "flowtype/no-weak-types": 2, - "flowtype/require-parameter-type": 0, - "flowtype/require-return-type": [ - 2, - "never", - { - "annotateUndefined": "never" - } - ], - "flowtype/require-valid-file-annotation": 2, - "flowtype/semi": [ - 2, - "always" - ], - "flowtype/space-after-type-colon": [ - 2, - "always" - ], - "flowtype/space-before-generic-bracket": [ - 2, - "never" - ], - "flowtype/space-before-type-colon": [ - 2, - "never" - ], - "flowtype/type-id-match": [ - 2, - "^([A-Z][a-z0-9]+)+Type$" - ], - "flowtype/union-intersection-spacing": [ - 2, - "always" - ], - "flowtype/use-flow-type": 1, - "flowtype/valid-syntax": 1, - - ////////// Legacy ////////// "max-depth": 0, // specify the maximum depth that blocks can be nested (off by default) @@ -295,7 +244,7 @@ "settings": { "flowtype": { - "onlyFilesWithFlowAnnotation": true + "onlyFilesWithFlowAnnotation": false } } } From 29758e9e3c7bec8fb9cc031d249592e3535799ba Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 30 Dec 2016 13:18:17 -0500 Subject: [PATCH 043/141] - Added virtualenv and helper function to setup scripts. --- .functions | 6 ++++++ .vscode/settings.json | 3 ++- brew.sh | 1 - pip.sh | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.functions b/.functions index 6df5aa5a07f..9d77f2351fb 100644 --- a/.functions +++ b/.functions @@ -25,6 +25,12 @@ function djp() cd ~/projects/$1/site/$1 } +# Activate local virtualenv +function venv() +{ + source ${PWD##*/}/bin/activate +} + # SSH into default vagrant box (first in global list, if you have multiple) function vagrant-ssh() { diff --git a/.vscode/settings.json b/.vscode/settings.json index 2702d76b6c8..ea4b6bcd653 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -301,5 +301,6 @@ // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. "less.lint.idSelector": "ignore", - "vsicons.dontShowNewVersionMessage": true + "vsicons.dontShowNewVersionMessage": true, + "window.zoomLevel": 0 } \ No newline at end of file diff --git a/brew.sh b/brew.sh index ed136ddce49..41ac986d589 100755 --- a/brew.sh +++ b/brew.sh @@ -49,7 +49,6 @@ brew install dark-mode # Toggle Mac dark mode brew install exiv2 # Read/Write image metadata brew install git # Source control brew install git-lfs # System for managing large files in source control via Git LFS -brew install imagemagick --with-webp # Create, edit, compose or convert bitmap images brew install p7zip # 7zip for Mac # brew install pigz # Parallel implementation of gzip brew install speedtest_cli # Test your internet connection speed diff --git a/pip.sh b/pip.sh index a0b55fc539b..0f3bc79f960 100755 --- a/pip.sh +++ b/pip.sh @@ -5,5 +5,6 @@ # Make sure we’re using the latest pip. pip install --upgrade pip +pip install virtualenv # Python virtual environments pip install pep8 # Python Linter pip install pygments # Syntax highlighter From c8f6bd2330804121b954e3d4d5352dbb8e4901e5 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 4 Jan 2017 09:39:03 -0500 Subject: [PATCH 044/141] - Added bowser support to eslint. --- .eslintignore | 6 +++--- .eslintrc | 14 ++++++++++++-- npm-ls.txt | 3 ++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.eslintignore b/.eslintignore index 4e38398a217..6f77fc271d4 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,6 @@ **/.git/**/* **/node_modules/**/* -**/components/**/* **/bower_components/**/* -**/static/dist/**/* -**/static/build/**/* +**/coverage/**/* +**/dist/**/* +**/build/**/* diff --git a/.eslintrc b/.eslintrc index b1deb9138cc..66f509bde17 100644 --- a/.eslintrc +++ b/.eslintrc @@ -18,7 +18,8 @@ "plugins": [ "flowtype", - "react" + "react", + "compat" ], "extends": [ @@ -50,6 +51,11 @@ }, "rules": { + + ////////// Campatability Errors ////////// + + "compat/compat": 2, + ////////// Possible Errors ////////// "no-cond-assign": 2, // disallow assignment in conditional expressions @@ -245,6 +251,10 @@ "settings": { "flowtype": { "onlyFilesWithFlowAnnotation": false - } + }, + "targets": ["chrome", "firefox", "ie", "edge", "safari"], + "polyfills": [], + "coverage": true, + "compiler": "babel" } } diff --git a/npm-ls.txt b/npm-ls.txt index 3da4ba28352..72898d66bb7 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -3,7 +3,8 @@ ├── bower@1.7.9 ├── caniuse-cmd@1.3.1 ├── cowsay@1.1.8 -├── eslint@3.9.1 +├── eslint@3.12.2 +├── eslint-plugin-compat@0.1.3 ├── eslint-plugin-flowtype@2.20.0 ├── eslint-plugin-react@6.5.0 ├── flow-bin@0.33.0 From 0af843d74d28d0ca529956556b73e9c2a44adc28 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 4 Jan 2017 17:47:56 -0500 Subject: [PATCH 045/141] - Added .NET build folders to search ignore. --- .vscode/settings.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index ea4b6bcd653..0d366534ef4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,6 +20,11 @@ "**/components": true, "**/dist": true, + // .NET + "**/bin": true, + "**/obj": true, + "**/packages": true, + // DJANGO "**/migrations": true, "**/south_migrations": true, From d844524ac130c8cbbbb736d5393d388ab67c76d1 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 8 Jan 2017 11:20:24 -0500 Subject: [PATCH 046/141] - Removed some casks and aliases I don't really need. --- .aliases | 3 --- .vscode/settings.json | 4 ++-- brew.sh | 4 ---- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.aliases b/.aliases index 715c2f2d78a..6f7f40544e2 100644 --- a/.aliases +++ b/.aliases @@ -114,9 +114,6 @@ alias spotoff="sudo mdutil -a -i off" # Enable Spotlight alias spoton="sudo mdutil -a -i on" -# PlistBuddy alias, because sometimes `defaults` just doesn’t cut it -alias plistbuddy="/usr/libexec/PlistBuddy" - # Ring the terminal bell, and put a badge on Terminal.app’s Dock icon # (useful when executing time-consuming commands) alias badge="tput bel" diff --git a/.vscode/settings.json b/.vscode/settings.json index 0d366534ef4..5ac432d2878 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,7 +17,7 @@ // GENERAL "**/.git": true, "**/node_modules": true, - "**/components": true, + "**/build": true, "**/dist": true, // .NET @@ -308,4 +308,4 @@ "less.lint.idSelector": "ignore", "vsicons.dontShowNewVersionMessage": true, "window.zoomLevel": 0 -} \ No newline at end of file +} diff --git a/brew.sh b/brew.sh index 41ac986d589..a2e6db0f59b 100755 --- a/brew.sh +++ b/brew.sh @@ -63,16 +63,12 @@ brew install gnupg gnupg2 # Encrypt and sign data/communication vi brew install python # Python language brew install nginx # High performance load balancer, web server and reverse proxy brew install node # Server-side JavaScript -brew install mongodb # NoSQL database -brew install watchman # File watching tool # Applications brew cask install iterm2 # Improved Mac Terminal -brew cask install opera # Opera browser brew cask install google-chrome # Chrome browser brew cask install firefox # Firefox browser brew cask install visual-studio-code # VS Code text editor -brew cask install brackets # Brackets text editor brew cask install slack # IM team chat application brew cask install spotify # Music subsciption service/player brew cask install postman # API request compose/debugger From 1d1f26bc0dc17d05383e3122b1f62bcdcd609ceb Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 26 Jan 2017 15:57:35 -0500 Subject: [PATCH 047/141] - Added a couple shorthand aliases for git. - Added FileZilla to casks. --- .gitconfig | 6 ++++++ brew.sh | 1 + 2 files changed, 7 insertions(+) diff --git a/.gitconfig b/.gitconfig index 3dfed2c5dd4..d3fea064cf1 100644 --- a/.gitconfig +++ b/.gitconfig @@ -4,6 +4,12 @@ [alias] + # Shorthand for checkout + co = "checkout" + + # Shorthand for merge + m = "merge" + # View abbreviated SHA, description, and history graph of the latest 20 commits l = log --pretty=format:'%C(auto,yellow)%h %C(auto,blue)%ad %C(auto,green)%aN %Creset%s %C(auto,cyan)% %d' -n 20 --graph --abbrev-commit --date=relative diff --git a/brew.sh b/brew.sh index a2e6db0f59b..27eca3f069c 100755 --- a/brew.sh +++ b/brew.sh @@ -72,6 +72,7 @@ brew cask install visual-studio-code # VS Code text editor brew cask install slack # IM team chat application brew cask install spotify # Music subsciption service/player brew cask install postman # API request compose/debugger +brew cask install filezilla # FTP Client # Remove outdated versions from the cellar. brew cleanup From 7cacd43b27ab82d7da233e83c9909bbe1d7be3e2 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 2 Mar 2017 19:40:06 -0500 Subject: [PATCH 048/141] - Updated VS Code settings with latest update changes. - Set flow to check all files. --- .eslintrc | 2 +- .flowconfig | 8 +++++++- .vscode/settings.json | 24 +++++++++++------------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.eslintrc b/.eslintrc index 66f509bde17..faa116cf5d8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -88,7 +88,7 @@ "block-scoped-var": 1, // treat var statements as if they were block scoped (off by default) "complexity": 0, // specify the maximum cyclomatic complexity allowed in a program (off by default) - "consistent-return": 2, // require return statements to either always or never specify values + "consistent-return": 0, // require return statements to either always or never specify values "curly": [1, "all"], // specify curly brace conventions for all control statements "default-case": 2, // require default case in switch statements (off by default) "dot-notation": 1, // encourages use of dot notation whenever possible diff --git a/.flowconfig b/.flowconfig index 5537e22dbec..f6894e11cb8 100644 --- a/.flowconfig +++ b/.flowconfig @@ -1,5 +1,11 @@ [ignore] .*/node_modules/.* .*/bower_components/.* +.*/coverage/.* .*/dist/.* -.*/build/.* \ No newline at end of file +.*/build/.* +.*\.config\.js +.*\.test\.js + +[options] +all=true diff --git a/.vscode/settings.json b/.vscode/settings.json index 5ac432d2878..bb59cd3ada9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,15 +2,21 @@ { //-------- Editor configuration -------- + "window.zoomLevel": 0, + "window.newWindowDimensions": "maximized", "editor.tabSize": 4, "editor.renderIndentGuides": true, "editor.glyphMargin": true, "editor.scrollBeyondLastLine": true, "editor.mouseWheelZoom": false, "editor.cursorStyle": "line", - "diffEditor.ignoreTrimWhitespace": false, "editor.renderWhitespace": "boundary", "editor.formatOnSave": false, + "editor.minimap.enabled": false, + "editor.wordWrap": "on", + "diffEditor.ignoreTrimWhitespace": false, + "debug.inlineValues": true, + "workbench.iconTheme": "vscode-icons", "extensions.autoUpdate": true, "search.exclude": { @@ -47,15 +53,9 @@ //-------- Icons -------- - "vsicons.icons": "http://github.com/robertohuertasm/vscode-icons/blob/master/icons.zip?raw=true", - - // Greyscale - // "vsicons.icons": "https://github.com/jedmao/vscode-icons/blob/grayscale-icons/icons.zip?raw=true", - - - //-------- JSHint configuration -------- - - "jshint.enable": false, + "vsicons.dontShowNewVersionMessage": true, + "vsicons.projectDetection.disableDetect": true, + "vsicons.presets.angular": true, //-------- ESLint configuration -------- @@ -305,7 +305,5 @@ "less.lint.float": "ignore", // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. - "less.lint.idSelector": "ignore", - "vsicons.dontShowNewVersionMessage": true, - "window.zoomLevel": 0 + "less.lint.idSelector": "ignore" } From 7c95f8080ebb527bb5aa4d4f6a661a6737147d60 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 19 Mar 2017 12:12:22 -0400 Subject: [PATCH 049/141] - Added emoji to terminal prompt! - Removed global .gitignore for build files, causes too many issues. - Updated npm deps. --- .bash_prompt | 2 +- .eslintrc | 2 +- .gitignore | 4 +--- .vscode/settings.json | 2 +- npm-ls.txt | 9 +++++---- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.bash_prompt b/.bash_prompt index 70835ecd3c5..34b395a9596 100644 --- a/.bash_prompt +++ b/.bash_prompt @@ -115,7 +115,7 @@ PS1+="\[${white}\] in "; PS1+="\[${green}\]\w"; # working directory full path PS1+="\$(prompt_git \"\[${white}\] on \[${violet}\]\" \"\[${blue}\]\")"; # Git repository details PS1+="\n"; -PS1+="\[${white}\]\$ \[${reset}\]"; # `$` (and reset color) +PS1+="\[${white}\]🌀 \[${reset}\]"; # `Emoji > $!` (and reset color) export PS1; PS2="\[${yellow}\]→ \[${reset}\]"; diff --git a/.eslintrc b/.eslintrc index faa116cf5d8..7e6855bc0f0 100644 --- a/.eslintrc +++ b/.eslintrc @@ -183,7 +183,7 @@ } ], "comma-style": [1, "last"], // enforce one true comma style (off by default) - "comma-dangle": 2, // disallow trailing commas in object literals + "comma-dangle": 0, // disallow trailing commas in object literals "consistent-this": 1, // enforces consistent naming when capturing the current execution context (off by default) "eol-last": 1, // enforce newline at the end of file, with no multiple empty lines "func-names": 0, // require function expressions to have a name (off by default) diff --git a/.gitignore b/.gitignore index c9d91a4cf66..9cfe0e16e07 100644 --- a/.gitignore +++ b/.gitignore @@ -4,15 +4,13 @@ # Static files **/node_modules **/bower_components -**/dist -**/build # Python **/*.pyc **/*.sqlite3 # Node -**/npm-debug.log +**/npm-debug.log* # ESLint .eslintcache diff --git a/.vscode/settings.json b/.vscode/settings.json index bb59cd3ada9..d32a77b0ffe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,7 +13,7 @@ "editor.renderWhitespace": "boundary", "editor.formatOnSave": false, "editor.minimap.enabled": false, - "editor.wordWrap": "on", + "editor.wordWrap": "off", "diffEditor.ignoreTrimWhitespace": false, "debug.inlineValues": true, "workbench.iconTheme": "vscode-icons", diff --git a/npm-ls.txt b/npm-ls.txt index 72898d66bb7..75f02e9cca2 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -3,19 +3,20 @@ ├── bower@1.7.9 ├── caniuse-cmd@1.3.1 ├── cowsay@1.1.8 -├── eslint@3.12.2 +├── eslint@3.16.1 ├── eslint-plugin-compat@0.1.3 ├── eslint-plugin-flowtype@2.20.0 ├── eslint-plugin-react@6.5.0 ├── flow-bin@0.33.0 -├── generator-aspnet@0.2.4 +├── git-velocity@2.2.3 ├── grunt@1.0.1 ├── grunt-cli@1.2.0 +├── grunt-init@0.3.2 ├── htmlhint@0.9.13 ├── npm@3.10.7 ├── react-native-cli@1.0.0 +├── semantic-release-cli@3.0.3 ├── stylelint@7.4.2 ├── webpack@1.13.3 -├── wttr@0.0.4 -└── yo@1.8.5 +└── wttr@0.0.4 From b657643ddbf34e732c2039c6afe20f73b732f5e4 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 25 Mar 2017 14:37:41 -0400 Subject: [PATCH 050/141] - Removed `eslint-plugin-compat`. It was more annoying than anything. --- .eslintrc | 8 +------- npm-ls.txt | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.eslintrc b/.eslintrc index 7e6855bc0f0..754c59c3044 100644 --- a/.eslintrc +++ b/.eslintrc @@ -18,8 +18,7 @@ "plugins": [ "flowtype", - "react", - "compat" + "react" ], "extends": [ @@ -51,11 +50,6 @@ }, "rules": { - - ////////// Campatability Errors ////////// - - "compat/compat": 2, - ////////// Possible Errors ////////// "no-cond-assign": 2, // disallow assignment in conditional expressions diff --git a/npm-ls.txt b/npm-ls.txt index 75f02e9cca2..c264716f7f5 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -4,7 +4,6 @@ ├── caniuse-cmd@1.3.1 ├── cowsay@1.1.8 ├── eslint@3.16.1 -├── eslint-plugin-compat@0.1.3 ├── eslint-plugin-flowtype@2.20.0 ├── eslint-plugin-react@6.5.0 ├── flow-bin@0.33.0 From 038a131e725e0ce177bc1e63487d618fa1ddd5de Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 30 Mar 2017 21:19:30 -0400 Subject: [PATCH 051/141] - Brew installed Fira font and enabled ligatures in VS Code. --- .vscode/settings.json | 3 +++ brew.sh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index d32a77b0ffe..5ea8f76b7c1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,8 @@ "window.zoomLevel": 0, "window.newWindowDimensions": "maximized", + "editor.fontFamily": "Fira Code", + "editor.fontSize": 13, "editor.tabSize": 4, "editor.renderIndentGuides": true, "editor.glyphMargin": true, @@ -14,6 +16,7 @@ "editor.formatOnSave": false, "editor.minimap.enabled": false, "editor.wordWrap": "off", + "editor.fontLigatures": true, "diffEditor.ignoreTrimWhitespace": false, "debug.inlineValues": true, "workbench.iconTheme": "vscode-icons", diff --git a/brew.sh b/brew.sh index 27eca3f069c..bebff6ab195 100755 --- a/brew.sh +++ b/brew.sh @@ -59,6 +59,10 @@ brew install webkit2png # Take full screenshots of a webpage # brew install zopfli # Ability to use Zopfli compression brew install gnupg gnupg2 # Encrypt and sign data/communication via GnuPG +# Fonts +brew tap caskroom/fonts +brew cask install font-fira-code # Fira (Ligatures) + # Development brew install python # Python language brew install nginx # High performance load balancer, web server and reverse proxy From f6a9e8b55d020b009ed723e644e87fe2ca197aaf Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 5 Apr 2017 22:34:33 -0400 Subject: [PATCH 052/141] - Added new settings from latest release. - Added DocThis extension. --- .vscode/extensions.json | 34 +++++++++++++++++----------------- .vscode/settings.json | 5 ++++- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5664fddb97b..42ffabda4fe 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,19 +1,19 @@ { - // See http://go.microsoft.com/fwlink/?LinkId=827846 - // for the documentation about the extensions.json format - "recommendations": [ - // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp - "abierbaum.vscode-file-peek", - "dbaeumer.vscode-eslint", - "donjayamanne.python", - "flowtype.flow-for-vscode", - "minhthai.vscode-todo-parser", - "mkaufman.HTMLHint", - "ms-vscode.csharp", - "ms-vscode.typescript-javascript-grammar", - "robertohuertasm.vscode-icons", - "shinnn.stylelint", - "vsmobile.vscode-react-native", - "waderyan.gitblame" - ] + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + "dbaeumer.vscode-eslint", + "donjayamanne.python", + "flowtype.flow-for-vscode", + "minhthai.vscode-todo-parser", + "mkaufman.HTMLHint", + "ms-vscode.csharp", + "ms-vscode.typescript-javascript-grammar", + "robertohuertasm.vscode-icons", + "shinnn.stylelint", + "vsmobile.vscode-react-native", + "waderyan.gitblame", + "joelday.docthis" + ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 5ea8f76b7c1..d1600b2d608 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,9 +17,12 @@ "editor.minimap.enabled": false, "editor.wordWrap": "off", "editor.fontLigatures": true, + "editor.renderControlCharacters": true, + "workbench.iconTheme": "vscode-icons", + "workbench.editor.revealIfOpen": true, + "terminal.integrated.confirmOnExit": true, "diffEditor.ignoreTrimWhitespace": false, "debug.inlineValues": true, - "workbench.iconTheme": "vscode-icons", "extensions.autoUpdate": true, "search.exclude": { From d4851452b421cea8c3c2e67de24673ae34756724 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 21 Apr 2017 16:56:16 -0400 Subject: [PATCH 053/141] - Removed flow analysis on all files, way too expensive. --- .eslintrc | 2 +- .flowconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 754c59c3044..5309ed210ec 100644 --- a/.eslintrc +++ b/.eslintrc @@ -178,7 +178,7 @@ ], "comma-style": [1, "last"], // enforce one true comma style (off by default) "comma-dangle": 0, // disallow trailing commas in object literals - "consistent-this": 1, // enforces consistent naming when capturing the current execution context (off by default) + "consistent-this": 0, // enforces consistent naming when capturing the current execution context (off by default) "eol-last": 1, // enforce newline at the end of file, with no multiple empty lines "func-names": 0, // require function expressions to have a name (off by default) "func-style": 0, // enforces use of function declarations or expressions (off by default) diff --git a/.flowconfig b/.flowconfig index f6894e11cb8..2441995d0fb 100644 --- a/.flowconfig +++ b/.flowconfig @@ -8,4 +8,4 @@ .*\.test\.js [options] -all=true +all=false From e151e44de01d1a077b7492a7eff6c3bc3100c98a Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 21 Apr 2017 16:59:26 -0400 Subject: [PATCH 054/141] Removed `git back`, as `git co -` is basically just as quick. --- .gitconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitconfig b/.gitconfig index d3fea064cf1..af453724233 100644 --- a/.gitconfig +++ b/.gitconfig @@ -34,9 +34,6 @@ # Switch to a branch, creating it if necessary go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" - # Switch to last branch - back = !"git checkout -" - # Show verbose output about tags, branches or remotes tags = tag -l branches = branch -a From 153bc0c072f88bd77a2a264b21a40d66727fe69d Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 30 Apr 2017 17:53:12 -0400 Subject: [PATCH 055/141] - Added `.path` file to hold all exported $PATH values. - Added yarn brew install. - Removed global npm commands since moving to yarn. --- .bashrc | 13 ++----------- .functions | 12 ------------ .path | 8 ++++++++ brew.sh | 1 + npm-ls.txt | 21 --------------------- 5 files changed, 11 insertions(+), 44 deletions(-) create mode 100644 .path delete mode 100644 npm-ls.txt diff --git a/.bashrc b/.bashrc index 640ad608512..4a9c771486c 100644 --- a/.bashrc +++ b/.bashrc @@ -1,13 +1,4 @@ [ -n "$PS1" ] && source ~/.bash_profile; -# OLD - -export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting -[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* - -export PATH="/usr/local/sbin:$PATH" # Add Homebrew's sbin to PATH (`brew doctor` suggestion) - -# NOTE: This was added automatically, not sure how just yet... Going to leave commented, in case I find out its actually needed. -# export PYTHONPATH=.:..:../lib -# if [ -f ~/.git-completion.sh ]; then . ~/.git-completion.sh; fi -# export PS1='\T-\u \w$(__git_ps1 "(%s)")\$ ' +# Load RVM into a shell session *as a function* +[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" diff --git a/.functions b/.functions index 9d77f2351fb..926e5c2f14b 100644 --- a/.functions +++ b/.functions @@ -7,18 +7,6 @@ function touchgo() vim $1; } -# List global npm packages -function npm-ls() -{ - npm list -g --depth=0 -} - -# Store global npm packages -function npm-store() -{ - npm-ls > ~/npm-ls.txt -} - # Go to a django project's site root function djp() { diff --git a/.path b/.path new file mode 100644 index 00000000000..10e959f9c26 --- /dev/null +++ b/.path @@ -0,0 +1,8 @@ +# Homebrew's sbin (`brew doctor` suggestion) +export PATH="/usr/local/sbin:$PATH" + +# RVM +export PATH="$PATH:$HOME/.rvm/bin" + +# Yarn +export PATH="$PATH:`yarn global bin`" diff --git a/brew.sh b/brew.sh index bebff6ab195..3f0c961940f 100755 --- a/brew.sh +++ b/brew.sh @@ -67,6 +67,7 @@ brew cask install font-fira-code # Fira (Ligatures) brew install python # Python language brew install nginx # High performance load balancer, web server and reverse proxy brew install node # Server-side JavaScript +brew install yarn # JavaScript package manager # Applications brew cask install iterm2 # Improved Mac Terminal diff --git a/npm-ls.txt b/npm-ls.txt deleted file mode 100644 index c264716f7f5..00000000000 --- a/npm-ls.txt +++ /dev/null @@ -1,21 +0,0 @@ -/usr/local/lib -├── babel-eslint@7.0.0 -├── bower@1.7.9 -├── caniuse-cmd@1.3.1 -├── cowsay@1.1.8 -├── eslint@3.16.1 -├── eslint-plugin-flowtype@2.20.0 -├── eslint-plugin-react@6.5.0 -├── flow-bin@0.33.0 -├── git-velocity@2.2.3 -├── grunt@1.0.1 -├── grunt-cli@1.2.0 -├── grunt-init@0.3.2 -├── htmlhint@0.9.13 -├── npm@3.10.7 -├── react-native-cli@1.0.0 -├── semantic-release-cli@3.0.3 -├── stylelint@7.4.2 -├── webpack@1.13.3 -└── wttr@0.0.4 - From 54c855e7669de3893bcbea66bead97559a76e0bb Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 1 May 2017 22:29:45 -0400 Subject: [PATCH 056/141] Added command to list globally installed yarn packages. --- .functions | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.functions b/.functions index 926e5c2f14b..56cec184d3e 100644 --- a/.functions +++ b/.functions @@ -27,6 +27,12 @@ function vagrant-ssh() vagrant ssh $id } +# List all yarn packages installed globally +function yarn-ls() +{ + ls `yarn global bin` | grep -Eo '^[^ ]+' +} + # Fix system time, match with Apple server time. function fix-time() { sudo ntpdate -u time.apple.com From 578362b33338aa0ad5ee871fa71a0a36679eff0e Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 25 May 2017 14:16:15 -0400 Subject: [PATCH 057/141] - Simplified ESLint rules. - Replaced `yarn-ls` with `npm-ls`, too many issues with yarn global module installs. - Added brew steps and path values to setup node the "right" way. --- .eslintrc | 262 ++++++++++++++---------------------------- .functions | 6 +- .path | 6 +- .vscode/settings.json | 1 + brew.sh | 9 +- 5 files changed, 101 insertions(+), 183 deletions(-) diff --git a/.eslintrc b/.eslintrc index 5309ed210ec..c2e4e54ee06 100644 --- a/.eslintrc +++ b/.eslintrc @@ -11,18 +11,13 @@ "es6": true // enable es6 keywords, except module. }, - "globals": { - "_": true, - "Backbone": true - }, - "plugins": [ "flowtype", "react" ], "extends": [ - "eslint:recommended", + "eslint:all", "plugin:react/recommended", "plugin:flowtype/recommended" ], @@ -50,205 +45,118 @@ }, "rules": { - ////////// Possible Errors ////////// - - "no-cond-assign": 2, // disallow assignment in conditional expressions - "no-console": 0, // disallow use of console (off by default in the node environment) - "no-constant-condition": 2, // disallow use of constant expressions in conditions - "no-control-regex": 1, // disallow control characters in regular expressions - "no-debugger": 0, // disallow use of debugger - "no-dupe-keys": 2, // disallow duplicate keys when creating object literals - "no-empty": 2, // disallow empty statements - "no-ex-assign": 1, // disallow assigning to the exception in a catch block - "no-extra-boolean-cast": 2, // disallow double-negation boolean casts in a boolean context - "no-extra-parens": [1, "all"], // disallow unnecessary parentheses (off by default) - "no-extra-semi": 2, // disallow unnecessary semicolons - "no-func-assign": 2, // disallow overwriting functions written as function declarations - "no-inner-declarations": 2, // disallow function or variable declarations in nested blocks - "no-invalid-regexp": 2, // disallow invalid regular expression strings in the RegExp constructor - "no-irregular-whitespace": 2, // disallow irregular whitespace outside of strings and comments - "no-unsafe-negation": 2, // disallow negation of the left operand of an in expression - "no-obj-calls": 2, // disallow the use of object properties of the global object (Math and JSON) as functions - "no-regex-spaces": 1, // disallow multiple spaces in a regular expression literal - "quote-props": [1, "as-needed"],// disallow reserved words being used as object literal keys (off by default) - "no-sparse-arrays": 2, // disallow sparse arrays - "no-unreachable": 2, // disallow unreachable statements after a return, throw, continue, or break statement - "use-isnan": 2, // disallow comparisons with the value NaN - "valid-jsdoc": 1, // Ensure JSDoc comments are valid (off by default) - "valid-typeof": 2, // Ensure that the results of typeof are compared against a valid string - - - ////////// Best Practices ////////// - - "block-scoped-var": 1, // treat var statements as if they were block scoped (off by default) - "complexity": 0, // specify the maximum cyclomatic complexity allowed in a program (off by default) - "consistent-return": 0, // require return statements to either always or never specify values - "curly": [1, "all"], // specify curly brace conventions for all control statements - "default-case": 2, // require default case in switch statements (off by default) - "dot-notation": 1, // encourages use of dot notation whenever possible - "eqeqeq": 1, // require the use of === and !== - "guard-for-in": 0, // make sure for-in loops have an if statement (off by default) - "no-alert": 0, // disallow the use of alert, confirm, and prompt - "no-caller": 0, // disallow use of arguments.caller or arguments.callee - "no-div-regex": 1, // disallow division operators explicitly at beginning of regular expression (off by default) - "no-else-return": 1, // disallow else after a return in an if (off by default) - "no-eq-null": 2, // disallow comparisons to null without a type-checking operator (off by default) - "no-eval": 0, // disallow use of eval() - "no-extend-native": 0, // disallow adding to native types - "no-extra-bind": 0, // disallow unnecessary function binding - "no-fallthrough": 0, // disallow fallthrough of case statements - "no-floating-decimal": 0, // disallow the use of leading or trailing decimal points in numeric literals (off by default) - "no-implied-eval": 0, // disallow use of eval()-like methods - "no-iterator": 0, // disallow usage of __iterator__ property - "no-labels": 2, // disallow use of labeled statements - "no-lone-blocks": 2, // disallow unnecessary nested blocks - "no-loop-func": 2, // disallow creation of functions within loops - "no-multi-spaces": 1, // disallow use of multiple spaces - "no-multi-str": 1, // disallow use of multiline strings - "no-native-reassign": 2, // disallow reassignments of native objects - "no-new": 1, // disallow use of new operator when not part of the assignment or comparison - "no-new-func": 1, // disallow use of new operator for Function object - "no-new-wrappers": 2, // disallows creating new instances of String, Number, and Boolean - "no-octal": 1, // disallow use of octal literals - "no-octal-escape": 1, // disallow use of octal escape sequences in string literals, such as var foo = "Copyright \051"; - "no-process-env": 2, // disallow use of process.env (off by default) - "no-proto": 2, // disallow usage of __proto__ property - "no-redeclare": 2, // disallow declaring the same variable more then once - "no-return-assign": 2, // disallow use of assignment in return statement - "no-script-url": 2, // disallow use of javascript: urls. - "no-self-compare": 2, // disallow comparisons where both sides are exactly the same (off by default) - "no-sequences": 2, // disallow use of comma operator - "no-unused-expressions": 2, // disallow usage of expressions in statement position - "no-void": 1, // disallow use of void operator (off by default) - "no-warning-comments": 0, // disallow usage of configurable warning terms in comments, e.g. TODO or FIXME (off by default) - "no-with": 1, // disallow use of the with statement - "radix": 0, // require use of the second argument for parseInt() (off by default) - "vars-on-top": 0, // requires to declare all vars on top of their containing scope (off by default) - "wrap-iife": [1, "inside"], // require immediate function invocation to be wrapped in parentheses (off by default) - "yoda": [1, "never"], // require or disallow Yoda conditions - - - ////////// Strict Mode ////////// - - // Needs to be disabled if ES6 modules are enabled... - // "strict": [2, "global"], // controls location of Use Strict Directives - - - ////////// Variables ////////// - - "no-catch-shadow": 2, // disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment) - "no-delete-var": 2, // disallow deletion of variables - "no-label-var": 2, // disallow labels that share a name with a variable - "no-shadow": 2, // disallow declaration of variables already declared in the outer scope - "no-shadow-restricted-names": 2, // disallow shadowing of names such as arguments - "no-undef": 2, // disallow use of undeclared variables unless mentioned in a /*global */ block - "no-undef-init": 2, // disallow use of undefined when initializing variables - "no-undefined": 0, // disallow use of undefined variable (off by default) - "no-unused-vars": 2, // disallow declaration of variables that are not used in the code - "no-use-before-define": 0, // disallow use of variables before they are defined - - - ////////// Node.js ////////// - - // "handle-callback-err": 2, // enforces error handling in callbacks (off by default) (on by default in the node environment) - // "no-mixed-requires": 2, // disallow mixing regular variable and require declarations (off by default) (on by default in the node environment) - // "no-new-require": 2, // disallow use of new operator with the require function (off by default) (on by default in the node environment) - // "no-path-concat": 2, // disallow string concatenation with __dirname and __filename (off by default) (on by default in the node environment) - // "no-process-exit": 2, // disallow process.exit() (on by default in the node environment) - // "no-restricted-modules": 1, // restrict usage of specified node modules (off by default) - // "no-sync": 1, // disallow use of synchronous methods (off by default) - - - ////////// Stylistic Issues ////////// - - "brace-style": [ // enforce one true brace style (off by default) + // GENERAL + "no-console": 0, + "linebreak-style": 0, + "id-length": 0, + "consistent-return": 0, + "no-negated-condition": 0, + "no-warning-comments": 0, + "no-mixed-operators": 0, + "no-confusing-arrow": 0, + "no-empty-function": 0, + "array-callback-return": 0, + "no-undefined": 0, + "complexity": 0, // NOTE: This is actually a pretty valid constraint. Might want to reconsider. + + // STYLE + "indent": [1, 4, + { + "SwitchCase": 1 + }], + "max-len": 0, // NOTE: Might want to configure this to keep lines from trailing off screen. + "max-statements": 0, + "max-statements-per-line": 0, + "max-params": 0, + "max-lines": 0, + "quote-props": [1, "consistent-as-needed"], + "object-curly-newline": 0, + "sort-imports": 0, + "object-property-newline": 1, + "object-shorthand": 1, + "space-before-function-paren": [1, "never"], + "brace-style": [ 1, "stroustrup", { "allowSingleLine": true } ], - "camelcase": 0, // require camel case names - "comma-spacing": [ // enforce spacing before and after comma + "camelcase": 0, + "comma-spacing": [ 1, { "before": false, "after": true } ], - "comma-style": [1, "last"], // enforce one true comma style (off by default) - "comma-dangle": 0, // disallow trailing commas in object literals - "consistent-this": 0, // enforces consistent naming when capturing the current execution context (off by default) - "eol-last": 1, // enforce newline at the end of file, with no multiple empty lines - "func-names": 0, // require function expressions to have a name (off by default) - "func-style": 0, // enforces use of function declarations or expressions (off by default) - "key-spacing": 1, // enforces spacing between keys and values in object literal properties - "max-nested-callbacks": [1, 3], // specify the maximum depth callbacks can be nested (off by default) - "new-cap": 0, // require a capital letter for constructors - "new-parens": 1, // disallow the omission of parentheses when invoking a constructor with no arguments - "no-array-constructor": 2, // disallow use of the Array constructor - "no-inline-comments": 0, // disallow comments inline after code (off by default) - "no-lonely-if": 2, // disallow if as the only statement in an else block (off by default) - "no-mixed-spaces-and-tabs": 2, // disallow mixed spaces and tabs for indentation - "no-multiple-empty-lines": 1, // disallow multiple empty lines (off by default) - "no-nested-ternary": 0, // disallow nested ternary expressions (off by default) - "no-new-object": 2, // disallow use of the Object constructor - "semi-spacing": [ // disallow space before semicolon + "computed-property-spacing": [1, "always"], + "template-curly-spacing": [1, "always"], + "arrow-parens": [1, "as-needed"], + "sort-keys": 0, + "dot-location": [1, "property"], + "comma-style": [1, "last"], + "comma-dangle": 0, + "consistent-this": 0, + "eol-last": 1, + "func-names": 0, + "func-style": 0, + "key-spacing": 1, + "max-nested-callbacks": [1, 4], + "new-cap": 0, + "new-parens": 1, + "no-array-constructor": 2, + "no-inline-comments": 0, + "line-comment-position": 0, + "no-lonely-if": 2, + "no-mixed-spaces-and-tabs": 2, + "no-multiple-empty-lines": 1, + "no-nested-ternary": 0, + "no-new-object": 2, + "no-magic-numbers": 0, + "no-use-before-define": 0, + "multiline-ternary": 0, + "semi-spacing": [ 1, { "before": false, "after": true }], - "no-spaced-func": 1, // disallow space between function identifier and application - "no-ternary": 0, // disallow the use of ternary operators (off by default) - "no-trailing-spaces": 1, // disallow trailing whitespace at the end of lines - "no-underscore-dangle": 0, // disallow dangling underscores in identifiers - "one-var": [1, "never"], // allow just one var statement per function (off by default) - "operator-assignment": 1, // require assignment operator shorthand where possible or prohibit it entirely (off by default) - "padded-blocks": 0, // enforce padding within blocks (off by default) - "quotes": [1, "single"], // specify whether double or single quotes should be used - "semi": 2, // require or disallow use of semicolons instead of ASI - "sort-vars": 0, // sort variables within the same declaration block (off by default) - "space-before-blocks": 1, // require or disallow space before blocks (off by default) - "object-curly-spacing": [1, "always"], // require or disallow spaces inside curly braces (off by default) - "array-bracket-spacing": [1, "always"], // require or disallow spaces inside array brackets (off by default) - "space-in-parens": 0, // require or disallow spaces inside parentheses (off by default) - "space-infix-ops": 0, // require spaces around operators - "keyword-spacing": 1, // require a space after keywords - "space-unary-ops": [ // Require or disallow spaces before/after unary operators (words on by default, nonwords off by default) + "no-spaced-func": 1, + "no-ternary": 0, + "no-trailing-spaces": 1, + "no-underscore-dangle": 0, + "one-var": [1, "never"], + "operator-assignment": 1, + "padded-blocks": 0, + "quotes": [1, "single"], + "semi": 2, + "sort-vars": 0, + "space-before-blocks": 1, + "object-curly-spacing": [1, "always"], + "array-bracket-spacing": [1, "always"], + "space-in-parens": 0, + "space-infix-ops": 0, + "keyword-spacing": 1, + "space-unary-ops": [ 1, { "words": true, "nonwords": false }], - "spaced-comment": [1, "always"], // require or disallow a space immediately following the // in a line comment (off by default) - "wrap-regex": 0, // require regex literals to be wrapped in parentheses (off by default) - - - ////////// ECMAScript 6 ////////// - - "no-var": 0, // require let or const instead of var (off by default) - "generator-star-spacing": 0, // enforce the position of the * in generator functions (off by default) - "no-confusing-arrow": 0, // Disallow arrow functions where they could be confused with comparisons - - - ////////// Legacy ////////// - - "max-depth": 0, // specify the maximum depth that blocks can be nested (off by default) - "max-len": 0, // specify the maximum length of a line in your program (off by default) - "max-params": 0, // limits the number of parameters that can be used in the function declaration. (off by default) - "max-statements": 0, // specify the maximum number of statement allowed in a function (off by default) - "no-bitwise": 0, // disallow use of bitwise operators (off by default) - "no-plusplus": 0 // disallow use of unary operators, ++ and -- (off by default) + "spaced-comment": [1, "always"], + "wrap-regex": 0, + "wrap-iife": [1, "inside"], + "no-sync": 0, + "no-process-env": 0, + "require-jsdoc": 0, + "jsx-quotes": [0, "prefer-single"] }, "settings": { "flowtype": { "onlyFilesWithFlowAnnotation": false }, - "targets": ["chrome", "firefox", "ie", "edge", "safari"], - "polyfills": [], - "coverage": true, "compiler": "babel" } } diff --git a/.functions b/.functions index 56cec184d3e..f918b32b09e 100644 --- a/.functions +++ b/.functions @@ -27,10 +27,10 @@ function vagrant-ssh() vagrant ssh $id } -# List all yarn packages installed globally -function yarn-ls() +# List all npm packages installed globally +function npm-ls() { - ls `yarn global bin` | grep -Eo '^[^ ]+' + npm list -g --depth=0 } # Fix system time, match with Apple server time. diff --git a/.path b/.path index 10e959f9c26..d30744a9d51 100644 --- a/.path +++ b/.path @@ -4,5 +4,7 @@ export PATH="/usr/local/sbin:$PATH" # RVM export PATH="$PATH:$HOME/.rvm/bin" -# Yarn -export PATH="$PATH:`yarn global bin`" +# NPM +export NPM_PACKAGES="$HOME/.npm-packages" +export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH" +export PATH="$NPM_PACKAGES/bin:$PATH" diff --git a/.vscode/settings.json b/.vscode/settings.json index d1600b2d608..3884f2f4f28 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -91,6 +91,7 @@ // Is flow enabled "flow.enabled": true, + "flow.runOnEdit": false, //-------- HTML configuration -------- diff --git a/brew.sh b/brew.sh index 3f0c961940f..5524ed6aea7 100755 --- a/brew.sh +++ b/brew.sh @@ -66,7 +66,14 @@ brew cask install font-fira-code # Fira (Ligatures) # Development brew install python # Python language brew install nginx # High performance load balancer, web server and reverse proxy -brew install node # Server-side JavaScript + +# Need a few steps to install node the "right" way. +# https://johnpapa.net/how-to-use-npm-global-without-sudo-on-osx/ +brew install node --without-npm # Server-side JavaScript +mkdir "${HOME}/.npm-packages" +echo prefix=${HOME}/.npm-packages >> ${HOME}/.npmrc +curl -L https://www.npmjs.org/install.sh | sh + brew install yarn # JavaScript package manager # Applications From e66460714359fdc3b8a258c3e6f7677ee8d723b6 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 25 May 2017 14:59:52 -0400 Subject: [PATCH 058/141] - Added `npm-store` back to functions. --- .functions | 6 ++++++ npm-ls.txt | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 npm-ls.txt diff --git a/.functions b/.functions index f918b32b09e..c5677176fc3 100644 --- a/.functions +++ b/.functions @@ -33,6 +33,12 @@ function npm-ls() npm list -g --depth=0 } +# Store global npm packages +function npm-store() +{ + npm-ls > ~/npm-ls.txt +} + # Fix system time, match with Apple server time. function fix-time() { sudo ntpdate -u time.apple.com diff --git a/npm-ls.txt b/npm-ls.txt new file mode 100644 index 00000000000..d4990023279 --- /dev/null +++ b/npm-ls.txt @@ -0,0 +1,21 @@ +/Users/ibarsi/.npm-packages/lib +├── babel-eslint@7.2.3 +├── bower@1.8.0 +├── caniuse@0.1.3 +├── cowsay@1.1.9 +├── eslint@3.19.0 +├── eslint-plugin-flowtype@2.33.0 +├── eslint-plugin-react@7.0.1 +├── flow-bin@0.46.0 +├── flow-typed@2.1.2 +├── git-velocity@2.2.6 +├── grunt@1.0.1 +├── grunt-init@0.3.2 +├── htmlhint@0.9.13 +├── jshint@2.9.4 +├── npm@4.6.1 +├── semantic-release-cli@3.0.3 +├── stylelint@7.10.1 +├── webpack@2.6.1 +└── wttr@0.0.4 + From c5859d7218de548bb02d47e7f1ace5430916efc2 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 22 Jun 2017 17:11:47 -0400 Subject: [PATCH 059/141] - Add EOL automatically in Code. --- .vscode/settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3884f2f4f28..222fb8da02d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,6 +20,7 @@ "editor.renderControlCharacters": true, "workbench.iconTheme": "vscode-icons", "workbench.editor.revealIfOpen": true, + "files.insertFinalNewline": true, "terminal.integrated.confirmOnExit": true, "diffEditor.ignoreTrimWhitespace": false, "debug.inlineValues": true, From 913c9f65aa8e785caeb3e8258ad59995411ab04b Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 3 Jul 2017 12:06:55 -0400 Subject: [PATCH 060/141] Removed custom node + npm setup in favour of standard node brew. --- .macos | 2 +- .path | 5 ----- .vscode/extensions.json | 1 - brew.sh | 9 +-------- 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.macos b/.macos index c99b280d4f9..a4bdc37dbf9 100644 --- a/.macos +++ b/.macos @@ -149,7 +149,7 @@ defaults write com.apple.finder NewWindowTarget -string "PfDe" defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" # Finder: show hidden files by default -#defaults write com.apple.finder AppleShowAllFiles -bool true +defaults write com.apple.finder AppleShowAllFiles -bool true # Finder: show all filename extensions defaults write NSGlobalDomain AppleShowAllExtensions -bool true diff --git a/.path b/.path index d30744a9d51..b675c7d40aa 100644 --- a/.path +++ b/.path @@ -3,8 +3,3 @@ export PATH="/usr/local/sbin:$PATH" # RVM export PATH="$PATH:$HOME/.rvm/bin" - -# NPM -export NPM_PACKAGES="$HOME/.npm-packages" -export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH" -export PATH="$NPM_PACKAGES/bin:$PATH" diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 42ffabda4fe..f916ffef11c 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -8,7 +8,6 @@ "flowtype.flow-for-vscode", "minhthai.vscode-todo-parser", "mkaufman.HTMLHint", - "ms-vscode.csharp", "ms-vscode.typescript-javascript-grammar", "robertohuertasm.vscode-icons", "shinnn.stylelint", diff --git a/brew.sh b/brew.sh index 5524ed6aea7..3f0c961940f 100755 --- a/brew.sh +++ b/brew.sh @@ -66,14 +66,7 @@ brew cask install font-fira-code # Fira (Ligatures) # Development brew install python # Python language brew install nginx # High performance load balancer, web server and reverse proxy - -# Need a few steps to install node the "right" way. -# https://johnpapa.net/how-to-use-npm-global-without-sudo-on-osx/ -brew install node --without-npm # Server-side JavaScript -mkdir "${HOME}/.npm-packages" -echo prefix=${HOME}/.npm-packages >> ${HOME}/.npmrc -curl -L https://www.npmjs.org/install.sh | sh - +brew install node # Server-side JavaScript brew install yarn # JavaScript package manager # Applications From 326edeade21285a6ce65cdb35a6e0c36fe1b380e Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 3 Jul 2017 17:46:06 -0400 Subject: [PATCH 061/141] Updated Git email to personal. --- .gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index af453724233..211f9b05874 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,6 +1,6 @@ [user] name = Igor Barsi - email = ibarsi@unioncreative.com + email = ibarsi92@gmail.com [alias] From dd001b46bf12356c40e5adf6170bd728e55aa4f0 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 18 Jul 2017 20:48:25 -0400 Subject: [PATCH 062/141] Updated global npm modules, adjusted Mac delete speed. --- .macos | 2 +- .vscode/settings.json | 1 + npm-ls.txt | 24 ++++++++++++++---------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.macos b/.macos index a4bdc37dbf9..4e9c8b5c2fc 100644 --- a/.macos +++ b/.macos @@ -112,7 +112,7 @@ defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false # Set a blazingly fast keyboard repeat rate -defaults write NSGlobalDomain KeyRepeat -int 0 +defaults write NSGlobalDomain KeyRepeat -int 1 # Disable auto-correct # defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false diff --git a/.vscode/settings.json b/.vscode/settings.json index 222fb8da02d..6d350ec5dc0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,6 +20,7 @@ "editor.renderControlCharacters": true, "workbench.iconTheme": "vscode-icons", "workbench.editor.revealIfOpen": true, + "workbench.startupEditor": "newUntitledFile", "files.insertFinalNewline": true, "terminal.integrated.confirmOnExit": true, "diffEditor.ignoreTrimWhitespace": false, diff --git a/npm-ls.txt b/npm-ls.txt index d4990023279..12636f99d81 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -1,21 +1,25 @@ -/Users/ibarsi/.npm-packages/lib +/usr/local/lib ├── babel-eslint@7.2.3 ├── bower@1.8.0 -├── caniuse@0.1.3 +├── caniuse-cmd@1.3.1 ├── cowsay@1.1.9 -├── eslint@3.19.0 -├── eslint-plugin-flowtype@2.33.0 -├── eslint-plugin-react@7.0.1 -├── flow-bin@0.46.0 +├── eslint@4.1.1 +├── eslint-plugin-flowtype@2.34.0 +├── eslint-plugin-react@7.1.0 +├── flow-bin@0.48.0 ├── flow-typed@2.1.2 ├── git-velocity@2.2.6 ├── grunt@1.0.1 ├── grunt-init@0.3.2 ├── htmlhint@0.9.13 -├── jshint@2.9.4 -├── npm@4.6.1 +├── jshint@2.9.5 +├── mocha@3.4.2 +├── n@2.1.7 +├── npm@3.10.10 +├── nsp@2.6.3 ├── semantic-release-cli@3.0.3 -├── stylelint@7.10.1 -├── webpack@2.6.1 +├── stylelint@7.12.0 +├── vtop@0.5.7 +├── webpack@3.0.0 └── wttr@0.0.4 From 0941325c9e94e26649e782df3e08292173bbec95 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 30 Jul 2017 13:02:57 -0400 Subject: [PATCH 063/141] Added brew installs and removed old union ssh key from startup. --- .bash_profile | 1 - .vscode/settings.json | 2 +- brew.sh | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bash_profile b/.bash_profile index 7fe860b42b9..471734092a7 100644 --- a/.bash_profile +++ b/.bash_profile @@ -51,5 +51,4 @@ complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes Syste if [[ $SSH_AUTH_SOCK && $(ssh-add -l | grep "The agent has no identities") ]]; then eval `ssh-agent -s` ssh-add - ssh-add "$HOME/.ssh/id_rsa_union" fi diff --git a/.vscode/settings.json b/.vscode/settings.json index 6d350ec5dc0..fa3e3cbdae7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -200,7 +200,7 @@ //-------- CSS configuration -------- // TODO: Noticed problems with these settings and stylelint, consider removing. - "css.validate": false, + "css.validate": true, // When using a vendor-specific prefix make sure to also include all other vendor-specific properties "css.lint.compatibleVendorPrefixes": "warning", diff --git a/brew.sh b/brew.sh index 3f0c961940f..407b3f98834 100755 --- a/brew.sh +++ b/brew.sh @@ -66,8 +66,9 @@ brew cask install font-fira-code # Fira (Ligatures) # Development brew install python # Python language brew install nginx # High performance load balancer, web server and reverse proxy +brew install mongodb # NoSQL document based database brew install node # Server-side JavaScript -brew install yarn # JavaScript package manager +brew install phantomjs # Headless browser # Applications brew cask install iterm2 # Improved Mac Terminal From 1f0f14647fdc9cd06ba9d8fd4307861d76e4495c Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 23 Sep 2017 11:38:08 -0400 Subject: [PATCH 064/141] Simplified ESLint and Stylelint configs. Adjusted editor settings. --- .aliases | 4 +- .eslintrc | 34 ++++------ .gitconfig | 3 + .stylelintrc | 146 +----------------------------------------- .vscode/settings.json | 8 +++ 5 files changed, 28 insertions(+), 167 deletions(-) diff --git a/.aliases b/.aliases index 3421ab13e11..498e76e325a 100644 --- a/.aliases +++ b/.aliases @@ -55,14 +55,14 @@ alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date # Get macOS Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages. # TODO: Should also prune un-needed packages, but note that brew cleanup blows away npm for some reason... -alias update='sudo softwareupdate -i -a; brew update; brew upgrade --all; sudo npm update -g; sudo gem update --system; sudo gem update' +alias update='sudo softwareupdate -i -a; brew update; brew upgrade; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update; sudo gem cleanup' # Google Chrome alias chrome='open -a Google\ Chrome' # IP addresses alias ip="dig +short myip.opendns.com @resolver1.opendns.com" -alias ipl="ipconfig getifaddr en0" +alias lip="ipconfig getifaddr en0" alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" # Show active network interfaces diff --git a/.eslintrc b/.eslintrc index c2e4e54ee06..ed4d4df65dd 100644 --- a/.eslintrc +++ b/.eslintrc @@ -26,24 +26,6 @@ "sourceType": "module" }, - "ecmaFeatures": { - "binaryLiterals": true, // enable binary literals - "blockBindings": true, // enable let and const (aka block bindings) - "defaultParams": true, // enable default function parameters - "forOf": true, // enable for-of loops - "generators": true, // enable generators - "objectLiteralComputedProperties": true, // enable computed object literal property names - "objectLiteralDuplicateProperties": true, // enable duplicate object literal properties in strict mode - "objectLiteralShorthandMethods": true, // enable object literal shorthand methods - "objectLiteralShorthandProperties": true, // enable object literal shorthand properties - "octalLiterals": true, // enable octal literals - "regexUFlag": true, // enable the regular expression u flag - "regexYFlag": true, // enable the regular expression y flag - "templateStrings": true, // enable template strings - "unicodeCodePointEscapes": true, // enable code point escapes - "jsx": true // enable JSX - }, - "rules": { // GENERAL "no-console": 0, @@ -54,6 +36,7 @@ "no-warning-comments": 0, "no-mixed-operators": 0, "no-confusing-arrow": 0, + "arrow-body-style": 0, "no-empty-function": 0, "array-callback-return": 0, "no-undefined": 0, @@ -62,7 +45,8 @@ // STYLE "indent": [1, 4, { - "SwitchCase": 1 + "SwitchCase": 1, + "MemberExpression": 0 }], "max-len": 0, // NOTE: Might want to configure this to keep lines from trailing off screen. "max-statements": 0, @@ -72,7 +56,8 @@ "quote-props": [1, "consistent-as-needed"], "object-curly-newline": 0, "sort-imports": 0, - "object-property-newline": 1, + "object-property-newline": 0, + "newline-per-chained-call": 0, "object-shorthand": 1, "space-before-function-paren": [1, "never"], "brace-style": [ @@ -90,6 +75,7 @@ "after": true } ], + "class-methods-use-this": 0, "computed-property-spacing": [1, "always"], "template-curly-spacing": [1, "always"], "arrow-parens": [1, "as-needed"], @@ -110,6 +96,7 @@ "line-comment-position": 0, "no-lonely-if": 2, "no-mixed-spaces-and-tabs": 2, + "no-multi-spaces": 1, "no-multiple-empty-lines": 1, "no-nested-ternary": 0, "no-new-object": 2, @@ -135,6 +122,7 @@ "space-before-blocks": 1, "object-curly-spacing": [1, "always"], "array-bracket-spacing": [1, "always"], + "array-element-newline": 0, "space-in-parens": 0, "space-infix-ops": 0, "keyword-spacing": 1, @@ -150,7 +138,11 @@ "no-sync": 0, "no-process-env": 0, "require-jsdoc": 0, - "jsx-quotes": [0, "prefer-single"] + "jsx-quotes": [0, "prefer-single"], + "global-require": 0, + + // REACT + "react/prop-types": 0 }, "settings": { diff --git a/.gitconfig b/.gitconfig index c6e556f14b4..7155ba7b219 100644 --- a/.gitconfig +++ b/.gitconfig @@ -34,6 +34,9 @@ # Switch to a branch, creating it if necessary go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" + # Undo last local commit + undo-commit = reset --soft HEAD^ + # Show verbose output about tags, branches or remotes tags = tag -l branches = branch -a diff --git a/.stylelintrc b/.stylelintrc index fa5ce7a026b..3c76c27fba3 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,148 +1,6 @@ { + "extends": "stylelint-config-recommended", "rules": { - "at-rule-empty-line-before": ["always", { - "ignore": ["after-comment"], - }], - "at-rule-name-case": "lower", - "at-rule-name-newline-after": "always-multi-line", - "at-rule-name-space-after": "always", - "at-rule-no-unknown": true, - # "at-rule-no-vendor-prefix": true, - "block-closing-brace-empty-line-before": "never", - "at-rule-semicolon-newline-after": "always", - "block-closing-brace-newline-before": "always-multi-line", - "block-closing-brace-space-before": "always-single-line", - "block-no-empty": true, - # "block-no-single-line": true, - "block-opening-brace-newline-after": "always-multi-line", - "block-opening-brace-space-after": "always-single-line", - "block-opening-brace-space-before": "always", - "color-hex-case": "upper", - "color-hex-length": "long", - "color-named": "never", - # "color-no-hex": true, - "color-no-invalid-hex": true, - "comment-empty-line-before": ["always", { - "ignore": ["between-comments"], - }], - "comment-whitespace-inside": "always", - "comment-no-empty": true, - "custom-property-no-outside-root": true, - "custom-property-empty-line-before": ["always", { - "except": ["after-comment", "after-custom-property", "first-nested"], - }], - "declaration-bang-space-after": "never", - "declaration-bang-space-before": "always", - "declaration-block-no-duplicate-properties": true, - "declaration-block-no-ignored-properties": true, - "declaration-block-no-shorthand-property-overrides": true, - "declaration-block-semicolon-newline-after": "always-multi-line", - "declaration-block-semicolon-newline-before": "never-multi-line", - "declaration-block-semicolon-space-after": "always-single-line", - "declaration-block-semicolon-space-before": "never", - "declaration-block-single-line-max-declarations": 1, - "declaration-block-trailing-semicolon": "always", - "declaration-colon-newline-after": "always-multi-line", - "declaration-colon-space-after": "always", - "declaration-colon-space-before": "never", - "font-family-name-quotes": "always-unless-keyword", - "font-weight-notation": "numeric", - "function-calc-no-unspaced-operator": true, - "function-comma-newline-after": "never-multi-line", - "function-comma-newline-before": "never-multi-line", - "function-comma-space-after": "always", - "function-comma-space-before": "never", - "function-linear-gradient-no-nonstandard-direction": true, - "function-max-empty-lines": 0, - "function-name-case": "lower", - "function-parentheses-newline-inside": "always-multi-line", - "function-parentheses-space-inside": "never", - # "function-url-data-uris": true, - "function-url-no-scheme-relative": true, - "function-url-quotes": "always", - "function-whitespace-after": "always", - "indentation": 4, - "length-zero-no-unit": true, - "max-empty-lines": 2, - "max-nesting-depth": 3, - "media-feature-colon-space-after": "always", - "media-feature-colon-space-before": "never", - "media-feature-no-missing-punctuation": true, - "media-feature-parentheses-space-inside": "never", - "media-feature-range-operator-space-after": "always", - "media-feature-range-operator-space-before": "always", - # "media-feature-name-no-vendor-prefix:" true, - "media-query-list-comma-space-after": "always", - "media-query-list-comma-space-before": "never", - # "no-browser-hacks": true, - "no-descending-specificity": true, - "no-duplicate-selectors": true, - "no-empty-source": true, - "no-eol-whitespace": true, - "no-extra-semicolons": true, - "no-indistinguishable-colors": true, - "no-invalid-double-slash-comments": true, - "no-missing-end-of-source-newline": true, - "no-unknown-animations": true, - "number-leading-zero": "always", - "number-max-precision": 2, - "number-no-trailing-zeros": true, - "property-case": "lower", - "property-no-unknown": true, - # "property-no-vendor-prefix": true, - "root-no-standard-properties": true, - "rule-nested-empty-line-before": ["always", { - "except": ["first-nested"], - "ignore": ["after-comment"], - }], - "rule-non-nested-empty-line-before": ["always", { - "except": ["after-single-line-comment"], - "ignore": ["after-comment"], - }], - "selector-attribute-brackets-space-inside": "never", - "selector-attribute-operator-space-after": "never", - "selector-attribute-operator-space-before": "never", - "selector-attribute-quotes": "always", - "selector-combinator-space-after": "always", - "selector-combinator-space-before": "always", - "selector-list-comma-newline-after": "always-multi-line", - "selector-list-comma-newline-before": "never-multi-line", - "selector-list-comma-space-after": "always", - "selector-list-comma-space-before": "never", - "selector-max-empty-lines": 0, - "selector-max-compound-selectors": 3, - "selector-max-specificity": "0,3,0", - "selector-no-id": true, - # "selector-no-attribute": true, - # "selector-no-combinator": true, - # "selector-no-type": true, - # "selector-no-universal": true, - # "selector-no-vendor-prefix": true, - "selector-no-qualifying-type": [true, { - "ignore": ["attribute"], - }], - "selector-pseudo-class-case": "lower", - "selector-pseudo-class-no-unknown": true, - "selector-pseudo-class-parentheses-space-inside": "never", - "selector-pseudo-element-case": "lower", - "selector-pseudo-element-colon-notation": "single", - "selector-pseudo-element-no-unknown": true, - "selector-root-no-composition": true, - "selector-type-case": "lower", - "selector-type-no-unknown": true, - "shorthand-property-no-redundant-values": true, - "string-no-newline": true, - "string-quotes": "single", - "stylelint-disable-reason": "always-before", - "time-no-imperceptible": true, - "unit-blacklist": ["pt"], - "unit-case": "lower", - "unit-no-unknown": true, - "value-keyword-case": "lower", - # "value-no-vendor-prefix": true, - "value-list-comma-newline-after": "always-multi-line", - "value-list-comma-newline-before": "never-multi-line", - "value-list-comma-space-after": "always", - "value-list-comma-space-before": "never", + "indentation": 4 } } diff --git a/.vscode/settings.json b/.vscode/settings.json index fa3e3cbdae7..414f25e45a8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,10 +18,13 @@ "editor.wordWrap": "off", "editor.fontLigatures": true, "editor.renderControlCharacters": true, + "editor.autoIndent": false, + "editor.snippetSuggestions": "top", "workbench.iconTheme": "vscode-icons", "workbench.editor.revealIfOpen": true, "workbench.startupEditor": "newUntitledFile", "files.insertFinalNewline": true, + "editor.insertSpaces": true, "terminal.integrated.confirmOnExit": true, "diffEditor.ignoreTrimWhitespace": false, "debug.inlineValues": true, @@ -98,6 +101,8 @@ //-------- HTML configuration -------- + "emmet.showSuggestionsAsSnippets": true, + // Maximum amount of characters per line (0 = disable). "html.format.wrapLineLength": 120, @@ -122,6 +127,9 @@ // List of tags, comma separated, that should have an extra newline before them. 'null' defaults to "head, body, /html". "html.format.extraLiners": "head, body, /html", + // Wrap attributes. + "html.format.wrapAttributes": "force", + //-------- JavaScript configuration -------- From 8964587386b996bd3acfd22c906599df265be961 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 20 Oct 2017 09:47:10 -0400 Subject: [PATCH 065/141] Whole bunch of random config changes. --- .bash_prompt | 2 +- .eslintrc | 5 +-- .vscode/settings.json | 77 +++++-------------------------------------- brew.sh | 3 +- 4 files changed, 14 insertions(+), 73 deletions(-) diff --git a/.bash_prompt b/.bash_prompt index 34b395a9596..ebf0cad94fe 100644 --- a/.bash_prompt +++ b/.bash_prompt @@ -115,7 +115,7 @@ PS1+="\[${white}\] in "; PS1+="\[${green}\]\w"; # working directory full path PS1+="\$(prompt_git \"\[${white}\] on \[${violet}\]\" \"\[${blue}\]\")"; # Git repository details PS1+="\n"; -PS1+="\[${white}\]🌀 \[${reset}\]"; # `Emoji > $!` (and reset color) +PS1+="\[${white}\]🌀 \[${reset}\]"; # `Emoji > $!` (and reset color) export PS1; PS2="\[${yellow}\]→ \[${reset}\]"; diff --git a/.eslintrc b/.eslintrc index ed4d4df65dd..632c86e9a14 100644 --- a/.eslintrc +++ b/.eslintrc @@ -59,10 +59,10 @@ "object-property-newline": 0, "newline-per-chained-call": 0, "object-shorthand": 1, - "space-before-function-paren": [1, "never"], + "space-before-function-paren": [1, "always"], "brace-style": [ 1, - "stroustrup", + "1tbs", { "allowSingleLine": true } @@ -80,6 +80,7 @@ "template-curly-spacing": [1, "always"], "arrow-parens": [1, "as-needed"], "sort-keys": 0, + "no-prototype-builtins": 0, "dot-location": [1, "property"], "comma-style": [1, "last"], "comma-dangle": 0, diff --git a/.vscode/settings.json b/.vscode/settings.json index 414f25e45a8..d631e5014d1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,8 @@ "window.zoomLevel": 0, "window.newWindowDimensions": "maximized", + "workbench.editor.labelFormat": "short", + "window.nativeTabs": false, "editor.fontFamily": "Fira Code", "editor.fontSize": 13, "editor.tabSize": 4, @@ -26,6 +28,8 @@ "files.insertFinalNewline": true, "editor.insertSpaces": true, "terminal.integrated.confirmOnExit": true, + "terminal.integrated.fontFamily": "Fira Code", + "terminal.integrated.fontSize": 13, "diffEditor.ignoreTrimWhitespace": false, "debug.inlineValues": true, "extensions.autoUpdate": true, @@ -37,6 +41,9 @@ "**/build": true, "**/dist": true, + // TESTS + "**/coverage": true, + // .NET "**/bin": true, "**/obj": true, @@ -72,7 +79,7 @@ //-------- ESLint configuration -------- "eslint.enable": true, - "eslint.autoFixOnSave": false, + "eslint.autoFixOnSave": true, //-------- HTMLHint configuration -------- @@ -135,74 +142,6 @@ // TODO: Noticed problems with these settings and eslint, consider removing. "javascript.validate.enable": false, - "javascript.validate.semanticValidation": true, - "javascript.validate.syntaxValidation": true, - - // Always include all words from the current document. - "javascript.suggest.alwaysAllWords": false, - - // Complete functions with their parameter signature. - "javascript.suggest.useCodeSnippetsOnMethodSuggest": true, - - // Don't spare curly brackets. - "javascript.validate.lint.curlyBracketsMustNotBeOmitted": "error", - - // Empty block should have a comment. - "javascript.validate.lint.emptyBlocksWithoutComment": "error", - - // Use '!==' and '===' instead of '!=' and '=='. - "javascript.validate.lint.comparisonOperatorsNotStrict": "error", - - // Missing semicolon. - "javascript.validate.lint.missingSemicolon": "error", - - // Unexpected output of the 'typeof' operator. - "javascript.validate.lint.unknownTypeOfResults": "error", - - // Semicolon instead of block. - "javascript.validate.lint.semicolonsInsteadOfBlocks": "error", - - // Function inside loop. - "javascript.validate.lint.functionsInsideLoops": "error", - - // Function with lowercase name used as constructor. - "javascript.validate.lint.newOnLowercaseFunctions": "ignore", - - // Looks for mistyped triple-slash references. - "javascript.validate.lint.tripleSlashReferenceAlike": "error", - - // Unused local variable. - "javascript.validate.lint.unusedVariables": "error", - - // Unused local function. - "javascript.validate.lint.unusedFunctions": "error", - - // Parameters don't match a function signature - "javascript.validate.lint.parametersDontMatchSignature": "error", - - // Don't re-declare a variable and change its type. - "javascript.validate.lint.redeclaredVariables": "error", - - // Don't use an undeclared variable. - "javascript.validate.lint.undeclaredVariables": "error", - - // Don't use an unknown property. - "javascript.validate.lint.unknownProperty": "error", - - // Don't require an unknown module. - "javascript.validate.lint.unknownModule": "error", - - // Don't re-declare a variable type by an assignment. - "javascript.validate.lint.forcedTypeConversion": "error", - - // Only use numbers for arithmetic operations. - "javascript.validate.lint.mixedTypesArithmetics": "warning", - - // Don't use instanceof with primitive types. - "javascript.validate.lint.primitivesInInstanceOf": "error", - - // Function with return statement used as constructor. - "javascript.validate.lint.newOnReturningFunctions": "error", //-------- CSS configuration -------- diff --git a/brew.sh b/brew.sh index 570acc9f304..25d2c978cb6 100755 --- a/brew.sh +++ b/brew.sh @@ -40,7 +40,7 @@ brew install wget --with-iri brew install gnupg # Install more recent versions of some macOS tools. -brew install vim --with-override-system-vi +brew install vim brew install homebrew/dupes/grep brew install homebrew/dupes/openssh # brew install homebrew/dupes/screen @@ -81,6 +81,7 @@ brew cask install slack # IM team chat application brew cask install spotify # Music subsciption service/player brew cask install postman # API request compose/debugger brew cask install filezilla # FTP Client +brew cask instal disk-inventory-x # Harddrive disk space analysis # Remove outdated versions from the cellar. brew cleanup From 213922bce47603fd1d7229e92e828f5ce75e357d Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 4 Nov 2017 11:31:43 -0400 Subject: [PATCH 066/141] Cleaned up functions and added "focus mode" --- .eslintrc | 3 ++- .functions | 16 ++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.eslintrc b/.eslintrc index 632c86e9a14..016c364ef4f 100644 --- a/.eslintrc +++ b/.eslintrc @@ -83,7 +83,7 @@ "no-prototype-builtins": 0, "dot-location": [1, "property"], "comma-style": [1, "last"], - "comma-dangle": 0, + "comma-dangle": [1, "always-multiline"], "consistent-this": 0, "eol-last": 1, "func-names": 0, @@ -95,6 +95,7 @@ "no-array-constructor": 2, "no-inline-comments": 0, "line-comment-position": 0, + "capitalized-comments": 0, "no-lonely-if": 2, "no-mixed-spaces-and-tabs": 2, "no-multi-spaces": 1, diff --git a/.functions b/.functions index c5677176fc3..972843d81a8 100644 --- a/.functions +++ b/.functions @@ -7,10 +7,10 @@ function touchgo() vim $1; } -# Go to a django project's site root -function djp() -{ - cd ~/projects/$1/site/$1 +# Toggle "focus mode" +function focus() { + osascript -e 'tell application "System Events" to keystroke "d" using {command down, option down}' + osascript -e 'tell application "System Events" to keystroke "d" using {command down, option down, control down}' } # Activate local virtualenv @@ -19,14 +19,6 @@ function venv() source ${PWD##*/}/bin/activate } -# SSH into default vagrant box (first in global list, if you have multiple) -function vagrant-ssh() -{ - id=$(vagrant global-status | sed -n '/id/{n;n;p;}' | cut -c 1-7) - - vagrant ssh $id -} - # List all npm packages installed globally function npm-ls() { From 4a38266d6ed5a43558aebc6131da85842aecf0b7 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 9 Dec 2017 12:17:39 -0500 Subject: [PATCH 067/141] Updated modules. Turned on GPG signed commits. Silence pointless errors in npm-ls. --- .functions | 2 +- .gitconfig | 2 +- .vscode/settings.json | 1 + npm-ls.txt | 16 ++++++++++------ 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.functions b/.functions index 972843d81a8..a8fa14f57c8 100644 --- a/.functions +++ b/.functions @@ -22,7 +22,7 @@ function venv() # List all npm packages installed globally function npm-ls() { - npm list -g --depth=0 + npm ls -g --depth=0 --silent } # Store global npm packages diff --git a/.gitconfig b/.gitconfig index 7155ba7b219..f5acd26e7bd 100644 --- a/.gitconfig +++ b/.gitconfig @@ -147,7 +147,7 @@ template = ~/.gitmessage # https://help.github.com/articles/signing-commits-using-gpg/ - # gpgsign = true + gpgsign = true [diff] diff --git a/.vscode/settings.json b/.vscode/settings.json index d631e5014d1..9c07847b295 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,6 +22,7 @@ "editor.renderControlCharacters": true, "editor.autoIndent": false, "editor.snippetSuggestions": "top", + "explorer.confirmDragAndDrop": false, "workbench.iconTheme": "vscode-icons", "workbench.editor.revealIfOpen": true, "workbench.startupEditor": "newUntitledFile", diff --git a/npm-ls.txt b/npm-ls.txt index 12636f99d81..912c2017132 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -1,25 +1,29 @@ /usr/local/lib ├── babel-eslint@7.2.3 -├── bower@1.8.0 +├── bower@1.8.2 ├── caniuse-cmd@1.3.1 -├── cowsay@1.1.9 +├── create-react-native-app@1.0.0 ├── eslint@4.1.1 ├── eslint-plugin-flowtype@2.34.0 ├── eslint-plugin-react@7.1.0 +├── exp@45.1.0 ├── flow-bin@0.48.0 ├── flow-typed@2.1.2 -├── git-velocity@2.2.6 +├── git-velocity@2.2.7 ├── grunt@1.0.1 ├── grunt-init@0.3.2 +├── gtop@0.1.5 ├── htmlhint@0.9.13 ├── jshint@2.9.5 ├── mocha@3.4.2 -├── n@2.1.7 +├── n@2.1.8 +├── nodemon@1.12.1 ├── npm@3.10.10 ├── nsp@2.6.3 +├── react-native-cli@2.0.1 ├── semantic-release-cli@3.0.3 -├── stylelint@7.12.0 -├── vtop@0.5.7 +├── stylelint@8.1.1 +├── stylelint-config-recommended@1.0.0 ├── webpack@3.0.0 └── wttr@0.0.4 From 5d1a7eea9df58f00fc8e53c161eaef859f7b0e16 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 17 Dec 2017 15:28:36 -0500 Subject: [PATCH 068/141] Updated git log graph, installed hub. --- .bash_profile | 3 +++ .gitconfig | 2 +- brew.sh | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.bash_profile b/.bash_profile index 471734092a7..8ff93fc8491 100644 --- a/.bash_profile +++ b/.bash_profile @@ -47,6 +47,9 @@ complete -W "NSGlobalDomain" defaults; # Add `killall` tab completion for common apps complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall; +# Add hub commands to git +eval "$(hub alias -s)" + # Start ssh agent and add all relevant keys if no keys are currently available. if [[ $SSH_AUTH_SOCK && $(ssh-add -l | grep "The agent has no identities") ]]; then eval `ssh-agent -s` diff --git a/.gitconfig b/.gitconfig index f5acd26e7bd..595c2a8931d 100644 --- a/.gitconfig +++ b/.gitconfig @@ -11,7 +11,7 @@ m = "merge" # View abbreviated SHA, description, and history graph of the latest 20 commits - l = log --pretty=format:'%C(auto,yellow)%h %C(auto,blue)%ad %C(auto,green)%aN %Creset%s %C(auto,cyan)% %d' -n 20 --graph --abbrev-commit --date=relative + l = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' # View the current working tree status using the short format s = status -s diff --git a/brew.sh b/brew.sh index 25d2c978cb6..69dc1a1ee98 100755 --- a/brew.sh +++ b/brew.sh @@ -71,6 +71,7 @@ brew install nginx # High performance load balancer, web se brew install mongodb # NoSQL document based database brew install node # Server-side JavaScript brew install phantomjs # Headless browser +brew install hub # GitHub CLI # Applications brew cask install iterm2 # Improved Mac Terminal From d0d04d4b1502326074ecbbe29abed4a46114d08e Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 21 Dec 2017 11:57:24 -0500 Subject: [PATCH 069/141] Function to start up Mavencare dev environment. Git alias to push Mavencare default PR. --- .functions | 7 +++++++ .gitconfig | 17 ++--------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.functions b/.functions index a8fa14f57c8..8b1f0f5e976 100644 --- a/.functions +++ b/.functions @@ -1,5 +1,12 @@ #!/usr/bin/env bash +# Run Mavencare dev environment +function maven() +{ + mongod --dbpath ~/mongo/db/ --fork --logpath ~/mongo/logs/log; + redis-server --port 6380 --daemonize yes; +} + # Touch and vim a file function touchgo() { diff --git a/.gitconfig b/.gitconfig index 595c2a8931d..3dd35ffa79d 100644 --- a/.gitconfig +++ b/.gitconfig @@ -76,21 +76,8 @@ # List contributors with number of commits contrib = shortlog --summary --numbered - # Merge GitHub pull request on top of the current branch or, - # if a branch name is specified, on top of the specified branch - mpr = "!f() { \ - declare currentBranch=\"$(git symbolic-ref --short HEAD)\"; \ - declare branch=\"${2:-$currentBranch}\"; \ - if [ $(printf \"%s\" \"$1\" | grep '^[0-9]\\+$' > /dev/null; printf $?) -eq 0 ]; then \ - git fetch origin refs/pull/$1/head:pr/$1 && \ - git checkout -B $branch && \ - git rebase $branch pr/$1 && \ - git checkout -B $branch && \ - git merge pr/$1 && \ - git branch -D pr/$1 && \ - git commit --amend -m \"$(git log -1 --pretty=%B)\n\nCloses #$1.\"; \ - fi \ - }; f" + # Pull request with Mavencare defaults. + mpr = "!git branch | sed -n 's/* //gp' | sed 's/-/ /g' | sed 's/.*/\\u&/' | awk '{ print \"\\\"\"$0\"\\\"\"}' | xargs hub pull-request -l NEEDS_REVIEW -m" [apply] From 3f236209a030f59359daecd8a800b2617482cd7c Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 21 Dec 2017 12:09:42 -0500 Subject: [PATCH 070/141] Switch to GNU sed to make the last git alias work (and generally make sed awesome). --- brew.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brew.sh b/brew.sh index 69dc1a1ee98..6648143875e 100755 --- a/brew.sh +++ b/brew.sh @@ -19,7 +19,7 @@ brew install moreutils brew install findutils # Install GNU `sed`, overwriting the built-in `sed`. -# brew install gnu-sed --with-default-names +brew install gnu-sed --with-default-names # Install Bash 4. # Note: don’t forget to add `/usr/local/bin/bash` to `/etc/shells` before From 760e7ddf5ad02162901124727f71e91906e8bb80 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 23 Dec 2017 12:44:07 -0500 Subject: [PATCH 071/141] Run test redis in Mavencare dev env function. --- .functions | 1 + 1 file changed, 1 insertion(+) diff --git a/.functions b/.functions index 8b1f0f5e976..99db032f60f 100644 --- a/.functions +++ b/.functions @@ -5,6 +5,7 @@ function maven() { mongod --dbpath ~/mongo/db/ --fork --logpath ~/mongo/logs/log; redis-server --port 6380 --daemonize yes; + redis-server --port 6379 --daemonize yes; } # Touch and vim a file From c2594044578adbf8c0a5701ef2e1d8b702488c14 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 6 Jan 2018 15:54:07 -0500 Subject: [PATCH 072/141] Clean up and organized editor settings, extensions brew installs. --- .functions | 10 ---------- .vscode/extensions.json | 6 +++++- .vscode/settings.json | 17 +++++++++++------ brew.sh | 9 +++------ 4 files changed, 19 insertions(+), 23 deletions(-) diff --git a/.functions b/.functions index 99db032f60f..b4827ad361a 100644 --- a/.functions +++ b/.functions @@ -44,16 +44,6 @@ function fix-time() { sudo ntpdate -u time.apple.com } -# Take full responsive screenshots of a webpage -function screenshots() { - local array=(1600 768 320) - - for i in "${array[@]}" - do - webkit2png -Fs 1 -W $i --filename='screenshot-'$(date +%Y%m%d-%H%M%S) --delay=2 "$1" - done -} - # Simple calculator function calc() { local result=""; diff --git a/.vscode/extensions.json b/.vscode/extensions.json index f916ffef11c..d3d03355df6 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -4,6 +4,7 @@ "recommendations": [ // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp "dbaeumer.vscode-eslint", + "dbaeumer.jshint", "donjayamanne.python", "flowtype.flow-for-vscode", "minhthai.vscode-todo-parser", @@ -13,6 +14,9 @@ "shinnn.stylelint", "vsmobile.vscode-react-native", "waderyan.gitblame", - "joelday.docthis" + "joelday.docthis", + "ms-vscode.node-debug2", + "eg2.vscode-npm-script", + "christian-kohler.npm-intellisense" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 9c07847b295..b8d755cf285 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,8 +4,14 @@ "window.zoomLevel": 0, "window.newWindowDimensions": "maximized", - "workbench.editor.labelFormat": "short", "window.nativeTabs": false, + + "workbench.editor.labelFormat": "short", + "workbench.iconTheme": "vscode-icons", + "workbench.editor.revealIfOpen": true, + "workbench.startupEditor": "newUntitledFile", + "workbench.colorTheme": "Abyss", + "editor.fontFamily": "Fira Code", "editor.fontSize": 13, "editor.tabSize": 4, @@ -22,15 +28,14 @@ "editor.renderControlCharacters": true, "editor.autoIndent": false, "editor.snippetSuggestions": "top", - "explorer.confirmDragAndDrop": false, - "workbench.iconTheme": "vscode-icons", - "workbench.editor.revealIfOpen": true, - "workbench.startupEditor": "newUntitledFile", - "files.insertFinalNewline": true, "editor.insertSpaces": true, + "terminal.integrated.confirmOnExit": true, "terminal.integrated.fontFamily": "Fira Code", "terminal.integrated.fontSize": 13, + + "explorer.confirmDragAndDrop": false, + "files.insertFinalNewline": true, "diffEditor.ignoreTrimWhitespace": false, "debug.inlineValues": true, "extensions.autoUpdate": true, diff --git a/brew.sh b/brew.sh index 6648143875e..8ad81fcc4f5 100755 --- a/brew.sh +++ b/brew.sh @@ -49,16 +49,11 @@ brew install homebrew/dupes/openssh brew install ack # Beyond `grep` brew install dark-mode # Toggle Mac dark mode brew install exiv2 # Read/Write image metadata -brew install git # Source control -brew install git-lfs # System for managing large files in source control via Git LFS brew install p7zip # 7zip for Mac -# brew install pigz # Parallel implementation of gzip brew install speedtest_cli # Test your internet connection speed brew install ssh-copy-id # Add ssh identity to remote host for easy login brew install testssl # Test ssl configuration strength brew install tree # View tree list of folder/file structures -brew install webkit2png # Take full screenshots of a webpage -# brew install zopfli # Ability to use Zopfli compression brew install gnupg gnupg2 # Encrypt and sign data/communication via GnuPG # Fonts @@ -66,6 +61,8 @@ brew tap caskroom/fonts brew cask install font-fira-code # Fira (Ligatures) # Development +brew install git # Source control +brew install git-lfs # System for managing large files in source control via Git LFS brew install python # Python language brew install nginx # High performance load balancer, web server and reverse proxy brew install mongodb # NoSQL document based database @@ -82,7 +79,7 @@ brew cask install slack # IM team chat application brew cask install spotify # Music subsciption service/player brew cask install postman # API request compose/debugger brew cask install filezilla # FTP Client -brew cask instal disk-inventory-x # Harddrive disk space analysis +brew cask install disk-inventory-x # Harddrive disk space analysis # Remove outdated versions from the cellar. brew cleanup From 988ecbe443a1373415c8be103cf09b2ab27696d8 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 9 Jan 2018 21:02:14 -0500 Subject: [PATCH 073/141] Adjusted Abyss theme colours and added GitLens. --- .vscode/extensions.json | 4 ++-- .vscode/settings.json | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index d3d03355df6..6b5d786407d 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -13,10 +13,10 @@ "robertohuertasm.vscode-icons", "shinnn.stylelint", "vsmobile.vscode-react-native", - "waderyan.gitblame", "joelday.docthis", "ms-vscode.node-debug2", "eg2.vscode-npm-script", - "christian-kohler.npm-intellisense" + "christian-kohler.npm-intellisense", + "eamodio.gitlens" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index b8d755cf285..5c26712c400 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,6 +12,11 @@ "workbench.startupEditor": "newUntitledFile", "workbench.colorTheme": "Abyss", + // Abyss only! + "editor.tokenColorCustomizations": { + "comments": "#225588", + "keywords": "#2d6fb1" + }, "editor.fontFamily": "Fira Code", "editor.fontSize": 13, "editor.tabSize": 4, @@ -105,6 +110,20 @@ "python.linting.pep8Enabled": true, + //-------- GitLens configuration -------- + + "gitlens.advanced.messages": { + "suppressCommitHasNoPreviousCommitWarning": false, + "suppressCommitNotFoundWarning": false, + "suppressFileNotUnderSourceControlWarning": false, + "suppressGitVersionWarning": false, + "suppressLineUncommittedWarning": false, + "suppressNoRepositoryWarning": false, + "suppressUpdateNotice": false, + "suppressWelcomeNotice": true + }, + + //-------- Flow configuration -------- // Is flow enabled From 623e6dd07a8796138a89ac1e65650fcbc37baeac Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 15 Jan 2018 18:34:04 -0500 Subject: [PATCH 074/141] Added a few helpful brew casks --- .vscode/settings.json | 1 + brew.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 5c26712c400..4c3450ecff4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,6 +11,7 @@ "workbench.editor.revealIfOpen": true, "workbench.startupEditor": "newUntitledFile", "workbench.colorTheme": "Abyss", + "workbench.editor.enablePreviewFromQuickOpen": false, // Abyss only! "editor.tokenColorCustomizations": { diff --git a/brew.sh b/brew.sh index 8ad81fcc4f5..0d1acc452a0 100755 --- a/brew.sh +++ b/brew.sh @@ -80,6 +80,9 @@ brew cask install spotify # Music subsciption service/player brew cask install postman # API request compose/debugger brew cask install filezilla # FTP Client brew cask install disk-inventory-x # Harddrive disk space analysis +brew cask install spectacle # Keyboard shortcuts for window sizing +brew cask install vanilla # Hide menu bar icons +brew cask install licecap # GIF screen capture # Remove outdated versions from the cellar. brew cleanup From 50cb7bbd5faa629af768c3d795decdd33be3a320 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 13 Feb 2018 13:44:27 -0500 Subject: [PATCH 075/141] Remove some stuff that I no longer need. --- .aliases | 11 +++--- .gitconfig | 4 --- .gitmessage | 0 .jshintignore | 5 --- .jshintrc | 82 ------------------------------------------- .vscode/settings.json | 9 ++--- README.md | 7 ---- brew.sh | 10 ++---- 8 files changed, 12 insertions(+), 116 deletions(-) delete mode 100644 .gitmessage delete mode 100644 .jshintignore delete mode 100644 .jshintrc diff --git a/.aliases b/.aliases index 498e76e325a..2b338dbbd65 100644 --- a/.aliases +++ b/.aliases @@ -1,11 +1,10 @@ #!/usr/bin/env bash -# Easier navigation: .., ..., ...., ....., ~ and - +# Easier navigation alias ..="cd .." alias ...="cd ../.." alias ....="cd ../../.." alias .....="cd ../../../.." -alias ~="cd ~" # `cd` is probably faster to type though alias -- -="cd -" # Shortcuts @@ -60,6 +59,9 @@ alias update='sudo softwareupdate -i -a; brew update; brew upgrade; npm install # Google Chrome alias chrome='open -a Google\ Chrome' +# Vanilla +alias vanilla='open -a Vanilla' + # IP addresses alias ip="dig +short myip.opendns.com @resolver1.opendns.com" alias lip="ipconfig getifaddr en0" @@ -83,11 +85,6 @@ command -v md5sum > /dev/null || alias md5sum="md5" # macOS has no `sha1sum`, so use `shasum` as a fallback command -v sha1sum > /dev/null || alias sha1sum="shasum" -# JavaScriptCore REPL -jscbin="/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc"; -[ -e "${jscbin}" ] && alias jsc="${jscbin}"; -unset jscbin; - # Recursively delete `.DS_Store` files alias cleanup="find . -type f -name '*.DS_Store' -ls -delete" diff --git a/.gitconfig b/.gitconfig index 3dd35ffa79d..5d89771bed5 100644 --- a/.gitconfig +++ b/.gitconfig @@ -42,9 +42,6 @@ branches = branch -a remotes = remote -v - # List aliases - aliases = config --get-regexp alias - # Amend the currently staged files to the latest commit amend = commit --amend --reuse-message=HEAD @@ -132,7 +129,6 @@ [commit] - template = ~/.gitmessage # https://help.github.com/articles/signing-commits-using-gpg/ gpgsign = true diff --git a/.gitmessage b/.gitmessage deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index ab0e40f1cf8..00000000000 --- a/.jshintignore +++ /dev/null @@ -1,5 +0,0 @@ -**/.git/**/* -**/node_modules/**/* -**/components/**/* -**/vendor/**/* -**/dist/**/* \ No newline at end of file diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 1e5737cf941..00000000000 --- a/.jshintrc +++ /dev/null @@ -1,82 +0,0 @@ -{ - // JSHint Default Configuration File (as on JSHint website) - // See http://jshint.com/docs/ for more details - - "maxerr" : 50, // {int} Maximum error before stopping - - // Enforcing - "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) - "camelcase" : false, // true: Identifiers must be in camelCase - "curly" : true, // true: Require {} for every new block or scope - "eqeqeq" : true, // true: Require triple equals (===) for comparison - "forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty() - "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc. - "immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` - "latedef" : false, // true: Require variables/functions to be defined before being used - "newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()` - "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` - "noempty" : true, // true: Prohibit use of empty blocks - "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters. - "nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment) - "plusplus" : false, // true: Prohibit use of `++` and `--` - "quotmark" : false, // Quotation mark consistency: - // false : do nothing (default) - // true : ensure whatever is used is consistent - // "single" : require single quotes - // "double" : require double quotes - "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) - "unused" : true, // Unused variables: - // true : all variables, last function parameter - // "vars" : all variables only - // "strict" : all variables, all function parameters - "strict" : true, // true: Requires all functions run in ES5 Strict Mode - "maxparams" : false, // {int} Max number of formal params allowed per function - "maxdepth" : false, // {int} Max depth of nested blocks (within functions) - "maxstatements" : false, // {int} Max number statements per function - "maxcomplexity" : false, // {int} Max cyclomatic complexity per function - "maxlen" : false, // {int} Max number of characters per line - "varstmt" : false, // true: Disallow any var statements. Only `let` and `const` are allowed. - - // Relaxing - "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons) - "boss" : false, // true: Tolerate assignments where comparisons would be expected - "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. - "eqnull" : false, // true: Tolerate use of `== null` - "esversion" : 6, // {int} Specify the ECMAScript version to which the code must adhere. - "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) - // (ex: `for each`, multiple try/catch, function expression…) - "evil" : false, // true: Tolerate use of `eval` and `new Function()` - "expr" : false, // true: Tolerate `ExpressionStatement` as Programs - "funcscope" : false, // true: Tolerate defining variables inside control statements - "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') - "iterator" : false, // true: Tolerate using the `__iterator__` property - "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block - "laxbreak" : false, // true: Tolerate possibly unsafe line breakings - "laxcomma" : false, // true: Tolerate comma-first style coding - "loopfunc" : false, // true: Tolerate functions being defined in loops - "multistr" : false, // true: Tolerate multi-line strings - "noyield" : false, // true: Tolerate generator functions with no yield statement in them. - "notypeof" : false, // true: Tolerate invalid typeof operator values - "proto" : false, // true: Tolerate using the `__proto__` property - "scripturl" : false, // true: Tolerate script-targeted URLs - "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` - "sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation - "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;` - "validthis" : false, // true: Tolerate using this in a non-constructor function - - // Environments - "browser" : true, // Web Browser (window, document, etc) - "browserify" : true, // Browserify (node.js code in the browser) - "devel" : true, // Development/debugging (alert, confirm, etc) - "jasmine" : true, // Jasmine - "jquery" : true, // jQuery - "mocha" : true, // Mocha - "node" : true, // Node.js - "worker" : true, // Web Workers - - // Custom Globals - "globals" : { - "_": true, - "Backbone": true - } -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 4c3450ecff4..b9a9f57e647 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,11 +12,11 @@ "workbench.startupEditor": "newUntitledFile", "workbench.colorTheme": "Abyss", "workbench.editor.enablePreviewFromQuickOpen": false, - - // Abyss only! "editor.tokenColorCustomizations": { - "comments": "#225588", - "keywords": "#2d6fb1" + "[Abyss]": { + "comments": "#225588", + "keywords": "#2d6fb1" + } }, "editor.fontFamily": "Fira Code", "editor.fontSize": 13, @@ -45,6 +45,7 @@ "diffEditor.ignoreTrimWhitespace": false, "debug.inlineValues": true, "extensions.autoUpdate": true, + "git.promptToSaveFilesBeforeCommit": true, "search.exclude": { // GENERAL diff --git a/README.md b/README.md index d708700c6af..038bc917c5e 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,3 @@ https://github.com/mathiasbynens/dotfiles.git 8. Restart. 9. ???? 10. PROFIT!!! - -### TODOs - -* Bootstrap.sh - Implement symlink creation of files nested in folders (currently only creates links one level deep, in the root). -* node-ls.txt - Manually generated (`npm-store`) _and_ installed list of global npm packages. Would be awesome if this could all be automated. -* .vscode/settings.json - This currently needs to be symlinked to VS Code's machine config location (`~/Library/Application\ Support/Code/User/`). -* .vscode/extensions.json - Would be nice to find a way to generate this automatically from currently installed extensions. diff --git a/brew.sh b/brew.sh index 0d1acc452a0..38bdef2b69f 100755 --- a/brew.sh +++ b/brew.sh @@ -36,19 +36,14 @@ fi; # Install `wget` with IRI support. brew install wget --with-iri -# Install GnuPG to enable PGP-signing commits. -brew install gnupg - # Install more recent versions of some macOS tools. brew install vim -brew install homebrew/dupes/grep -brew install homebrew/dupes/openssh -# brew install homebrew/dupes/screen +brew install grep +brew install openssh # Install other useful binaries. brew install ack # Beyond `grep` brew install dark-mode # Toggle Mac dark mode -brew install exiv2 # Read/Write image metadata brew install p7zip # 7zip for Mac brew install speedtest_cli # Test your internet connection speed brew install ssh-copy-id # Add ssh identity to remote host for easy login @@ -83,6 +78,7 @@ brew cask install disk-inventory-x # Harddrive disk space analysis brew cask install spectacle # Keyboard shortcuts for window sizing brew cask install vanilla # Hide menu bar icons brew cask install licecap # GIF screen capture +brew cask install caprine # Facebook Messenger desktop application # Remove outdated versions from the cellar. brew cleanup From c19c70638ad7f271c0b4748fff0f9e9aa8a8229c Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 14 Feb 2018 18:11:40 -0500 Subject: [PATCH 076/141] Added dropbox to brew script. --- brew.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/brew.sh b/brew.sh index 38bdef2b69f..b96d47b05bb 100755 --- a/brew.sh +++ b/brew.sh @@ -72,6 +72,7 @@ brew cask install firefox # Firefox browser brew cask install visual-studio-code # VS Code text editor brew cask install slack # IM team chat application brew cask install spotify # Music subsciption service/player +brew cask install dropbox # Cloud file storage brew cask install postman # API request compose/debugger brew cask install filezilla # FTP Client brew cask install disk-inventory-x # Harddrive disk space analysis From bad01535be771e9ea8e45fb6e3db787cec42728a Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 15 Feb 2018 16:56:39 -0500 Subject: [PATCH 077/141] Moved some single line functions into aliases. Removed a few needless global npm modules. --- .aliases | 12 ++++++++++++ .functions | 23 ----------------------- npm-ls.txt | 27 +++++++++++++-------------- 3 files changed, 25 insertions(+), 37 deletions(-) diff --git a/.aliases b/.aliases index 2b338dbbd65..703ef1a9852 100644 --- a/.aliases +++ b/.aliases @@ -142,3 +142,15 @@ alias reload="exec ${SHELL} -l" # Print each PATH entry on a separate line alias path='echo -e ${PATH//:/\\n}' + +# List all npm packages installed globally +alias npmls='npm ls -g --depth=0 --silent' + +# Store global npm packages in text file +alias npmst='npmls > ~/npm-ls.txt' + +# Activate local virtualenv +alias venv='source ${PWD##*/}/bin/activate' + +# Fix system time by matching Apple server time. +alias fixtime='sudo ntpdate -u time.apple.com' diff --git a/.functions b/.functions index b4827ad361a..4ad3d91c37a 100644 --- a/.functions +++ b/.functions @@ -21,29 +21,6 @@ function focus() { osascript -e 'tell application "System Events" to keystroke "d" using {command down, option down, control down}' } -# Activate local virtualenv -function venv() -{ - source ${PWD##*/}/bin/activate -} - -# List all npm packages installed globally -function npm-ls() -{ - npm ls -g --depth=0 --silent -} - -# Store global npm packages -function npm-store() -{ - npm-ls > ~/npm-ls.txt -} - -# Fix system time, match with Apple server time. -function fix-time() { - sudo ntpdate -u time.apple.com -} - # Simple calculator function calc() { local result=""; diff --git a/npm-ls.txt b/npm-ls.txt index 912c2017132..29d8b8c32c0 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -1,29 +1,28 @@ /usr/local/lib -├── babel-eslint@7.2.3 +├── babel-eslint@8.1.1 ├── bower@1.8.2 ├── caniuse-cmd@1.3.1 ├── create-react-native-app@1.0.0 -├── eslint@4.1.1 -├── eslint-plugin-flowtype@2.34.0 -├── eslint-plugin-react@7.1.0 -├── exp@45.1.0 -├── flow-bin@0.48.0 -├── flow-typed@2.1.2 +├── eslint@4.14.0 +├── eslint-plugin-flowtype@2.40.1 +├── eslint-plugin-react@7.5.1 +├── exp@47.1.4 +├── flow-bin@0.61.0 +├── flow-typed@2.2.3 ├── git-velocity@2.2.7 ├── grunt@1.0.1 ├── grunt-init@0.3.2 ├── gtop@0.1.5 ├── htmlhint@0.9.13 ├── jshint@2.9.5 -├── mocha@3.4.2 +├── mocha@4.0.1 ├── n@2.1.8 -├── nodemon@1.12.1 +├── nodemon@1.14.3 ├── npm@3.10.10 -├── nsp@2.6.3 +├── nsp@3.1.0 ├── react-native-cli@2.0.1 -├── semantic-release-cli@3.0.3 -├── stylelint@8.1.1 -├── stylelint-config-recommended@1.0.0 -├── webpack@3.0.0 +├── semantic-release-cli@3.3.0 +├── stylelint@8.4.0 +├── stylelint-config-recommended@2.0.1 └── wttr@0.0.4 From 8c5e27272a39004215b6bcb0dff7a2bdb7cef8d6 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 27 Mar 2018 10:03:18 -0400 Subject: [PATCH 078/141] Use NVM and EditorConfig. --- .bash_profile | 5 +++++ .editorconfig | 7 +++++++ .gitconfig | 1 + .vscode/extensions.json | 4 ++-- pip.sh | 6 +++--- 5 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 .editorconfig diff --git a/.bash_profile b/.bash_profile index 8ff93fc8491..61aa0e138dc 100644 --- a/.bash_profile +++ b/.bash_profile @@ -55,3 +55,8 @@ if [[ $SSH_AUTH_SOCK && $(ssh-add -l | grep "The agent has no identities") ]]; t eval `ssh-agent -s` ssh-add fi + +# Load nvm +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..f999431de51 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.gitconfig b/.gitconfig index 5d89771bed5..c7de8c3347c 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,6 +1,7 @@ [user] name = Igor Barsi email = ibarsi92@gmail.com + signingKey = 2EEF83EC3F50C9158011DDD4276481F1B67133A4 [alias] diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 6b5d786407d..c8071f9e4e8 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -12,11 +12,11 @@ "ms-vscode.typescript-javascript-grammar", "robertohuertasm.vscode-icons", "shinnn.stylelint", - "vsmobile.vscode-react-native", "joelday.docthis", "ms-vscode.node-debug2", "eg2.vscode-npm-script", "christian-kohler.npm-intellisense", - "eamodio.gitlens" + "eamodio.gitlens", + "EditorConfig.editorconfig" ] } diff --git a/pip.sh b/pip.sh index 0f3bc79f960..e3b6467f956 100755 --- a/pip.sh +++ b/pip.sh @@ -5,6 +5,6 @@ # Make sure we’re using the latest pip. pip install --upgrade pip -pip install virtualenv # Python virtual environments -pip install pep8 # Python Linter -pip install pygments # Syntax highlighter +sudo pip install virtualenv # Python virtual environments +sudo pip install pep8 # Python Linter +sudo pip install pygments # Syntax highlighter From b7ca49b454a998eab765c80ea0527ad939d870d3 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 3 Apr 2018 16:22:58 -0400 Subject: [PATCH 079/141] Added killport function. Cleaned up npm installs. Updated VS Code settings to closer match how we work at Rangle. --- .functions | 8 ++-- .vscode/settings.json | 98 ++++--------------------------------------- npm-ls.txt | 33 ++++----------- 3 files changed, 19 insertions(+), 120 deletions(-) diff --git a/.functions b/.functions index 4ad3d91c37a..47c0151f6ad 100644 --- a/.functions +++ b/.functions @@ -1,11 +1,9 @@ #!/usr/bin/env bash -# Run Mavencare dev environment -function maven() +# Kill process by port +function killport() { - mongod --dbpath ~/mongo/db/ --fork --logpath ~/mongo/logs/log; - redis-server --port 6380 --daemonize yes; - redis-server --port 6379 --daemonize yes; + lsof -i tcp:$1 | awk 'FNR == 2 {print $2}' | xargs kill -9 } # Touch and vim a file diff --git a/.vscode/settings.json b/.vscode/settings.json index b9a9f57e647..c8289575c04 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,9 @@ // Place your settings in this file to overwrite the default settings { //-------- Editor configuration -------- - "window.zoomLevel": 0, "window.newWindowDimensions": "maximized", "window.nativeTabs": false, - "workbench.editor.labelFormat": "short", "workbench.iconTheme": "vscode-icons", "workbench.editor.revealIfOpen": true, @@ -20,14 +18,14 @@ }, "editor.fontFamily": "Fira Code", "editor.fontSize": 13, - "editor.tabSize": 4, + "editor.tabSize": 2, "editor.renderIndentGuides": true, "editor.glyphMargin": true, "editor.scrollBeyondLastLine": true, "editor.mouseWheelZoom": false, "editor.cursorStyle": "line", "editor.renderWhitespace": "boundary", - "editor.formatOnSave": false, + "editor.formatOnSave": true, "editor.minimap.enabled": false, "editor.wordWrap": "off", "editor.fontLigatures": true, @@ -35,85 +33,61 @@ "editor.autoIndent": false, "editor.snippetSuggestions": "top", "editor.insertSpaces": true, - "terminal.integrated.confirmOnExit": true, "terminal.integrated.fontFamily": "Fira Code", "terminal.integrated.fontSize": 13, - "explorer.confirmDragAndDrop": false, "files.insertFinalNewline": true, "diffEditor.ignoreTrimWhitespace": false, "debug.inlineValues": true, "extensions.autoUpdate": true, "git.promptToSaveFilesBeforeCommit": true, - "search.exclude": { // GENERAL "**/.git": true, "**/node_modules": true, "**/build": true, "**/dist": true, - // TESTS "**/coverage": true, - // .NET "**/bin": true, "**/obj": true, "**/packages": true, - // DJANGO "**/migrations": true, "**/south_migrations": true, "**/lib": true, - // JEKYLL "**/_site": true }, - - //-------- Files configuration -------- - "files.exclude": { "**/*.pyc": true, "**/*.sublime*": true }, - "files.trimTrailingWhitespace": true, - - //-------- Icons -------- - "vsicons.dontShowNewVersionMessage": true, "vsicons.projectDetection.disableDetect": true, "vsicons.presets.angular": true, + //-------- Prettier configuration -------- + "prettier.requireConfig": true, - //-------- ESLint configuration -------- + //-------- ESLint configuration -------- "eslint.enable": true, "eslint.autoFixOnSave": true, - - //-------- HTMLHint configuration -------- - "htmlhint.enable": true, - - //-------- StyleLint configuration -------- - "stylelint.enable": true, - - //-------- Python configuration -------- - "python.linting.enabled": true, "python.linting.pylintEnabled": false, "python.linting.pep8Enabled": true, - - //-------- GitLens configuration -------- - "gitlens.advanced.messages": { "suppressCommitHasNoPreviousCommitWarning": false, "suppressCommitNotFoundWarning": false, @@ -121,172 +95,114 @@ "suppressGitVersionWarning": false, "suppressLineUncommittedWarning": false, "suppressNoRepositoryWarning": false, + "suppressResultsExplorerNotice": false, + "suppressShowKeyBindingsNotice": true, "suppressUpdateNotice": false, "suppressWelcomeNotice": true }, - - //-------- Flow configuration -------- - // Is flow enabled "flow.enabled": true, "flow.runOnEdit": false, - - //-------- HTML configuration -------- - "emmet.showSuggestionsAsSnippets": true, - // Maximum amount of characters per line (0 = disable). "html.format.wrapLineLength": 120, - // List of tags, comma separated, that shouldn't be reformatted. 'null' defaults to all tags listed at https://www.w3.org/TR/html5/dom.html#phrasing-content. "html.format.unformatted": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, script, select, small, span, strong, sub, sup, textarea, tt, var", - // Indent and sections. "html.format.indentInnerHtml": false, - // Whether existing line breaks before elements should be preserved. Only works before elements, not inside tags or for text. "html.format.preserveNewLines": true, - // Maximum number of line breaks to be preserved in one chunk. Use 'null' for unlimited. "html.format.maxPreserveNewLines": null, - // Format and indent {{#foo}} and {{/foo}}. "html.format.indentHandlebars": false, - // End with a newline. "html.format.endWithNewline": false, - // List of tags, comma separated, that should have an extra newline before them. 'null' defaults to "head, body, /html". "html.format.extraLiners": "head, body, /html", - // Wrap attributes. "html.format.wrapAttributes": "force", - - //-------- JavaScript configuration -------- - // TODO: Noticed problems with these settings and eslint, consider removing. "javascript.validate.enable": false, - - //-------- CSS configuration -------- - // TODO: Noticed problems with these settings and stylelint, consider removing. "css.validate": true, - // When using a vendor-specific prefix make sure to also include all other vendor-specific properties "css.lint.compatibleVendorPrefixes": "warning", - // When using a vendor-specific prefix also include the standard property "css.lint.vendorPrefix": "warning", - // Do not use duplicate style definitions "css.lint.duplicateProperties": "error", - // Do not use empty rulesets "css.lint.emptyRules": "error", - // Import statements do not load in parallel "css.lint.importStatement": "warning", - // Do not use width or height when using padding or border "css.lint.boxModel": "ignore", - // The universal selector (*) is known to be slow "css.lint.universalSelector": "ignore", - // No unit for zero needed "css.lint.zeroUnits": "error", - // @font-face rule must define 'src' and 'font-family' properties "css.lint.fontFaceProperties": "warning", - // Hex colors must consist of three or six hex numbers "css.lint.hexColorLength": "error", - // Invalid number of parameters "css.lint.argumentsInColorFunction": "error", - // Unknown property. "css.lint.unknownProperties": "error", - // IE hacks are only necessary when supporting IE7 and older "css.lint.ieHack": "warning", - // Unknown vendor specific property. "css.lint.unknownVendorSpecificProperties": "error", - // Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect "css.lint.propertyIgnoredDueToDisplay": "error", - // Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. "css.lint.important": "warning", - // Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. "css.lint.float": "ignore", - // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. "css.lint.idSelector": "ignore", - - //-------- LESS configuration -------- - // TODO: Noticed problems with these settings and stylelint, consider removing. "less.validate": false, - // When using a vendor-specific prefix make sure to also include all other vendor-specific properties "less.lint.compatibleVendorPrefixes": "warning", - // When using a vendor-specific prefix also include the standard property "less.lint.vendorPrefix": "warning", - // Do not use duplicate style definitions "less.lint.duplicateProperties": "error", - // Do not use empty rulesets "less.lint.emptyRules": "error", - // Import statements do not load in parallel "less.lint.importStatement": "warning", - // Do not use width or height when using padding or border "less.lint.boxModel": "ignore", - // The universal selector (*) is known to be slow "less.lint.universalSelector": "ignore", - // No unit for zero needed "less.lint.zeroUnits": "error", - // @font-face rule must define 'src' and 'font-family' properties "less.lint.fontFaceProperties": "warning", - // Hex colors must consist of three or six hex numbers "less.lint.hexColorLength": "error", - // Invalid number of parameters "less.lint.argumentsInColorFunction": "error", - // Unknown property. "less.lint.unknownProperties": "error", - // IE hacks are only necessary when supporting IE7 and older "less.lint.ieHack": "warning", - // Unknown vendor specific property. "less.lint.unknownVendorSpecificProperties": "warning", - // Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect "less.lint.propertyIgnoredDueToDisplay": "error", - // Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. "less.lint.important": "warning", - // Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. "less.lint.float": "ignore", - // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. "less.lint.idSelector": "ignore" } diff --git a/npm-ls.txt b/npm-ls.txt index 29d8b8c32c0..106ed27944f 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -1,28 +1,13 @@ -/usr/local/lib -├── babel-eslint@8.1.1 -├── bower@1.8.2 -├── caniuse-cmd@1.3.1 -├── create-react-native-app@1.0.0 -├── eslint@4.14.0 -├── eslint-plugin-flowtype@2.40.1 -├── eslint-plugin-react@7.5.1 -├── exp@47.1.4 -├── flow-bin@0.61.0 -├── flow-typed@2.2.3 -├── git-velocity@2.2.7 -├── grunt@1.0.1 -├── grunt-init@0.3.2 -├── gtop@0.1.5 +/Users/igorbarsi/.nvm/versions/node/v8.6.0/lib +├── eslint@4.19.1 +├── eslint-plugin-flowtype@2.46.1 +├── eslint-plugin-react@7.7.0 +├── flow-bin@0.68.0 +├── grunt@1.0.2 ├── htmlhint@0.9.13 ├── jshint@2.9.5 -├── mocha@4.0.1 -├── n@2.1.8 -├── nodemon@1.14.3 -├── npm@3.10.10 -├── nsp@3.1.0 -├── react-native-cli@2.0.1 -├── semantic-release-cli@3.3.0 -├── stylelint@8.4.0 -├── stylelint-config-recommended@2.0.1 +├── npm@5.4.2 +├── stylelint@9.1.3 +├── stylelint-config-recommended@2.1.0 └── wttr@0.0.4 From 94fa405909d3ad9748ff439bf7c9be9ac96cdf3a Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 12 Apr 2018 18:25:04 -0400 Subject: [PATCH 080/141] Added a bunch of useful git aliases. Remapped some keybindings to play nicer with Spectacle. --- .gitconfig | 22 ++++++++++++++++++++-- .vscode/keybindings.json | 31 +++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .vscode/keybindings.json diff --git a/.gitconfig b/.gitconfig index c7de8c3347c..da43962dff8 100644 --- a/.gitconfig +++ b/.gitconfig @@ -29,6 +29,12 @@ # Clone a repository including all submodules c = clone --recursive + # Print current branch name + b = "!git rev-parse --abbrev-ref HEAD" + + # Fetch origin + fo = "!git fetch origin" + # Commit all changes ca = !git add -A && git commit -av @@ -52,6 +58,12 @@ # Interactive rebase with the given number of latest commits reb = "!r() { git rebase -i HEAD~$1; }; r" + # Fetch and rebase current branch with master + mreb = "!git rebase origin/master" + + # Interactively rebase changes in current branch + breb = "!git rebase -i `git merge-base master HEAD`" + # Remove the old tag with this name and tag the latest commit with it. retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r" @@ -74,8 +86,14 @@ # List contributors with number of commits contrib = shortlog --summary --numbered - # Pull request with Mavencare defaults. - mpr = "!git branch | sed -n 's/* //gp' | sed 's/-/ /g' | sed 's/.*/\\u&/' | awk '{ print \"\\\"\"$0\"\\\"\"}' | xargs hub pull-request -l NEEDS_REVIEW -m" + # Create a PR with branch generated name. + mpr = "!git b | sed 's/-/ /g' | sed 's/.*/\\u&/' | awk '{ print \"\\\"\"$0\"\\\"\"}' | xargs hub pull-request -m" + + # Push current branch to origin and set upstream + pub = "!git push -u origin $(git b)" + + # Delete current branch from origin + unpub = "!git push origin :$(git b)" [apply] diff --git a/.vscode/keybindings.json b/.vscode/keybindings.json new file mode 100644 index 00000000000..02b66f9c264 --- /dev/null +++ b/.vscode/keybindings.json @@ -0,0 +1,31 @@ +// Place your key bindings in this file to overwrite the defaults +[ + { + "key": "cmd+]", + "command": "workbench.action.terminal.focusNextPane", + "when": "terminalFocus" + }, + { + "key": "alt+cmd+right", + "command": "-workbench.action.terminal.focusNextPane", + "when": "terminalFocus" + }, + { + "key": "cmd+[", + "command": "workbench.action.terminal.focusPreviousPane", + "when": "terminalFocus" + }, + { + "key": "alt+cmd+up", + "command": "-workbench.action.terminal.focusPreviousPane", + "when": "terminalFocus" + }, + { + "key": "cmd+k cmd+z", + "command": "workbench.action.toggleZenMode" + }, + { + "key": "cmd+k z", + "command": "-workbench.action.toggleZenMode" + } +] From 069f8b10821534c6aee5fa286da039272a1f7c0b Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 28 Apr 2018 11:43:46 -0400 Subject: [PATCH 081/141] Integrated Prettier into standard worklow. --- .eslintrc | 69 +++++++------------------------------------ .prettierignore | 7 +++++ .prettierrc | 4 +++ .vscode/settings.json | 7 ++--- npm-ls.txt | 7 ++++- 5 files changed, 31 insertions(+), 63 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.eslintrc b/.eslintrc index 016c364ef4f..c8c82ec1913 100644 --- a/.eslintrc +++ b/.eslintrc @@ -13,13 +13,17 @@ "plugins": [ "flowtype", - "react" + "react", + "prettier", ], "extends": [ "eslint:all", "plugin:react/recommended", - "plugin:flowtype/recommended" + "plugin:flowtype/recommended", + "prettier", + "prettier/flowtype", + "prettier/react", ], "parserOptions": { @@ -43,100 +47,46 @@ "complexity": 0, // NOTE: This is actually a pretty valid constraint. Might want to reconsider. // STYLE - "indent": [1, 4, - { - "SwitchCase": 1, - "MemberExpression": 0 - }], "max-len": 0, // NOTE: Might want to configure this to keep lines from trailing off screen. "max-statements": 0, "max-statements-per-line": 0, "max-params": 0, "max-lines": 0, - "quote-props": [1, "consistent-as-needed"], "object-curly-newline": 0, "sort-imports": 0, "object-property-newline": 0, "newline-per-chained-call": 0, "object-shorthand": 1, - "space-before-function-paren": [1, "always"], - "brace-style": [ - 1, - "1tbs", - { - "allowSingleLine": true - } - ], "camelcase": 0, - "comma-spacing": [ - 1, - { - "before": false, - "after": true - } - ], "class-methods-use-this": 0, - "computed-property-spacing": [1, "always"], - "template-curly-spacing": [1, "always"], - "arrow-parens": [1, "as-needed"], "sort-keys": 0, "no-prototype-builtins": 0, - "dot-location": [1, "property"], - "comma-style": [1, "last"], - "comma-dangle": [1, "always-multiline"], "consistent-this": 0, - "eol-last": 1, "func-names": 0, "func-style": 0, - "key-spacing": 1, "max-nested-callbacks": [1, 4], "new-cap": 0, - "new-parens": 1, "no-array-constructor": 2, "no-inline-comments": 0, "line-comment-position": 0, "capitalized-comments": 0, "no-lonely-if": 2, - "no-mixed-spaces-and-tabs": 2, - "no-multi-spaces": 1, - "no-multiple-empty-lines": 1, "no-nested-ternary": 0, "no-new-object": 2, "no-magic-numbers": 0, "no-use-before-define": 0, "multiline-ternary": 0, - "semi-spacing": [ - 1, - { - "before": false, - "after": true - }], - "no-spaced-func": 1, "no-ternary": 0, - "no-trailing-spaces": 1, "no-underscore-dangle": 0, "one-var": [1, "never"], "operator-assignment": 1, "padded-blocks": 0, - "quotes": [1, "single"], - "semi": 2, "sort-vars": 0, - "space-before-blocks": 1, - "object-curly-spacing": [1, "always"], - "array-bracket-spacing": [1, "always"], "array-element-newline": 0, "space-in-parens": 0, "space-infix-ops": 0, - "keyword-spacing": 1, - "space-unary-ops": [ - 1, - { - "words": true, - "nonwords": false - }], "spaced-comment": [1, "always"], "wrap-regex": 0, - "wrap-iife": [1, "inside"], "no-sync": 0, "no-process-env": 0, "require-jsdoc": 0, @@ -144,12 +94,15 @@ "global-require": 0, // REACT - "react/prop-types": 0 + "react/prop-types": 0, + + // PRETTIER + "prettier/prettier": "error" }, "settings": { "flowtype": { - "onlyFilesWithFlowAnnotation": false + "onlyFilesWithFlowAnnotation": true }, "compiler": "babel" } diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000000..5644a3568ef --- /dev/null +++ b/.prettierignore @@ -0,0 +1,7 @@ +.*/ +flow-typed/ +node_modules/ +dist/ +package.json +package-lock.json + diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000000..6e778b4fb9c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "trailingComma": "all", + "singleQuote": true +} diff --git a/.vscode/settings.json b/.vscode/settings.json index c8289575c04..7de4c45d7bc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -48,6 +48,8 @@ "**/node_modules": true, "**/build": true, "**/dist": true, + // JS + "**/flow-typed": true, // TESTS "**/coverage": true, // .NET @@ -71,18 +73,15 @@ "vsicons.dontShowNewVersionMessage": true, "vsicons.projectDetection.disableDetect": true, "vsicons.presets.angular": true, - //-------- Prettier configuration -------- "prettier.requireConfig": true, - - //-------- ESLint configuration -------- "eslint.enable": true, "eslint.autoFixOnSave": true, //-------- HTMLHint configuration -------- "htmlhint.enable": true, //-------- StyleLint configuration -------- - "stylelint.enable": true, + "stylelint.enable": false, //-------- Python configuration -------- "python.linting.enabled": true, "python.linting.pylintEnabled": false, diff --git a/npm-ls.txt b/npm-ls.txt index 106ed27944f..9e9601a3393 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -1,13 +1,18 @@ /Users/igorbarsi/.nvm/versions/node/v8.6.0/lib +├── babel-eslint@8.2.2 ├── eslint@4.19.1 +├── eslint-config-prettier@2.9.0 ├── eslint-plugin-flowtype@2.46.1 +├── eslint-plugin-prettier@2.6.0 ├── eslint-plugin-react@7.7.0 ├── flow-bin@0.68.0 ├── grunt@1.0.2 ├── htmlhint@0.9.13 ├── jshint@2.9.5 ├── npm@5.4.2 +├── prettier@1.12.1 ├── stylelint@9.1.3 ├── stylelint-config-recommended@2.1.0 -└── wttr@0.0.4 +├── wttr@0.0.4 +└── yarn@1.5.1 From d6c242320fdeba9bfbe8b74684e89f8ca18d557d Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 28 Apr 2018 11:43:53 -0400 Subject: [PATCH 082/141] Open PRs when created from command line. Updated VS Code keybindings to play nicer when multiple terminals are open. --- .gitconfig | 2 +- .vscode/keybindings.json | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitconfig b/.gitconfig index da43962dff8..d70bf61ce9c 100644 --- a/.gitconfig +++ b/.gitconfig @@ -87,7 +87,7 @@ contrib = shortlog --summary --numbered # Create a PR with branch generated name. - mpr = "!git b | sed 's/-/ /g' | sed 's/.*/\\u&/' | awk '{ print \"\\\"\"$0\"\\\"\"}' | xargs hub pull-request -m" + mpr = "!git b | sed 's/-/ /g' | sed 's/.*/\\u&/' | awk '{ print \"\\\"\"$0\"\\\"\"}' | xargs hub pull-request -m | xargs open" # Push current branch to origin and set upstream pub = "!git push -u origin $(git b)" diff --git a/.vscode/keybindings.json b/.vscode/keybindings.json index 02b66f9c264..c37a3389089 100644 --- a/.vscode/keybindings.json +++ b/.vscode/keybindings.json @@ -27,5 +27,15 @@ { "key": "cmd+k z", "command": "-workbench.action.toggleZenMode" - } + }, + { + "key": "cmd+d", + "command": "workbench.action.terminal.split", + "when": "terminalFocus" + }, + { + "key": "cmd+w", + "command": "workbench.action.terminal.kill", + "when": "terminalFocus" + }, ] From 789de04459e17be063a6e30f474ee214ef4b4ef5 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 28 Apr 2018 11:51:33 -0400 Subject: [PATCH 083/141] Formatted and purged most ESLint rules to clean house a bit. --- .eslintrc | 153 +++++++++++++++++------------------------------------- 1 file changed, 47 insertions(+), 106 deletions(-) diff --git a/.eslintrc b/.eslintrc index c8c82ec1913..d4770d1fff8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,109 +1,50 @@ { - "parser": "babel-eslint", - - "env": { - "browser": true, // browser global variables. - "node": true, // Node.js global variables and Node.js-specific rules. - "amd": true, // defines require() and define() as global variables as per the amd spec. - "mocha": true, // adds all of the Mocha testing global variables. - "jasmine": true, // adds all of the Jasmine testing global variables for version 1.3 and 0.0. - "jquery": true, // jquery global variables. - "es6": true // enable es6 keywords, except module. - }, - - "plugins": [ - "flowtype", - "react", - "prettier", - ], - - "extends": [ - "eslint:all", - "plugin:react/recommended", - "plugin:flowtype/recommended", - "prettier", - "prettier/flowtype", - "prettier/react", - ], - - "parserOptions": { - "sourceType": "module" + "parser": "babel-eslint", + + "env": { + "browser": true, // browser global variables. + "node": true, // Node.js global variables and Node.js-specific rules. + "amd": true, // defines require() and define() as global variables as per the amd spec. + "mocha": true, // adds all of the Mocha testing global variables. + "jasmine": true, // adds all of the Jasmine testing global variables for version 1.3 and 0.0. + "jquery": true, // jquery global variables. + "es6": true // enable es6 keywords, except module. + }, + + "plugins": ["flowtype", "react", "prettier"], + + "extends": [ + "eslint:all", + "plugin:react/recommended", + "plugin:flowtype/recommended", + "prettier", + "prettier/flowtype", + "prettier/react" + ], + + "parserOptions": { + "sourceType": "module" + }, + + "rules": { + // GENERAL + "one-var": "off", + "no-process-env": "off", + "no-ternary": "off", + "sort-imports": "off", + "sort-keys": "off", + + // REACT + "react/prop-types": "off", + + // PRETTIER + "prettier/prettier": "error" + }, + + "settings": { + "flowtype": { + "onlyFilesWithFlowAnnotation": true }, - - "rules": { - // GENERAL - "no-console": 0, - "linebreak-style": 0, - "id-length": 0, - "consistent-return": 0, - "no-negated-condition": 0, - "no-warning-comments": 0, - "no-mixed-operators": 0, - "no-confusing-arrow": 0, - "arrow-body-style": 0, - "no-empty-function": 0, - "array-callback-return": 0, - "no-undefined": 0, - "complexity": 0, // NOTE: This is actually a pretty valid constraint. Might want to reconsider. - - // STYLE - "max-len": 0, // NOTE: Might want to configure this to keep lines from trailing off screen. - "max-statements": 0, - "max-statements-per-line": 0, - "max-params": 0, - "max-lines": 0, - "object-curly-newline": 0, - "sort-imports": 0, - "object-property-newline": 0, - "newline-per-chained-call": 0, - "object-shorthand": 1, - "camelcase": 0, - "class-methods-use-this": 0, - "sort-keys": 0, - "no-prototype-builtins": 0, - "consistent-this": 0, - "func-names": 0, - "func-style": 0, - "max-nested-callbacks": [1, 4], - "new-cap": 0, - "no-array-constructor": 2, - "no-inline-comments": 0, - "line-comment-position": 0, - "capitalized-comments": 0, - "no-lonely-if": 2, - "no-nested-ternary": 0, - "no-new-object": 2, - "no-magic-numbers": 0, - "no-use-before-define": 0, - "multiline-ternary": 0, - "no-ternary": 0, - "no-underscore-dangle": 0, - "one-var": [1, "never"], - "operator-assignment": 1, - "padded-blocks": 0, - "sort-vars": 0, - "array-element-newline": 0, - "space-in-parens": 0, - "space-infix-ops": 0, - "spaced-comment": [1, "always"], - "wrap-regex": 0, - "no-sync": 0, - "no-process-env": 0, - "require-jsdoc": 0, - "jsx-quotes": [0, "prefer-single"], - "global-require": 0, - - // REACT - "react/prop-types": 0, - - // PRETTIER - "prettier/prettier": "error" - }, - - "settings": { - "flowtype": { - "onlyFilesWithFlowAnnotation": true - }, - "compiler": "babel" - } + "compiler": "babel" + } } From d40535817eddae9169d054f66f08cb729229dbef Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 28 Apr 2018 12:12:05 -0400 Subject: [PATCH 084/141] Added recommended VS Code extensions and configured spell check settings. --- .spellignore | 1 + .stylelintrc | 2 +- .vscode/extensions.json | 13 +++++++------ .vscode/settings.json | 9 ++++++++- README.md | 23 ++++++++++++----------- 5 files changed, 29 insertions(+), 19 deletions(-) create mode 100644 .spellignore diff --git a/.spellignore b/.spellignore new file mode 100644 index 00000000000..8d98f9debde --- /dev/null +++ b/.spellignore @@ -0,0 +1 @@ +.* diff --git a/.stylelintrc b/.stylelintrc index 3c76c27fba3..d60d2a3f528 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,6 +1,6 @@ { "extends": "stylelint-config-recommended", "rules": { - "indentation": 4 + "indentation": 2 } } diff --git a/.vscode/extensions.json b/.vscode/extensions.json index c8071f9e4e8..98bbb842bfe 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -4,19 +4,20 @@ "recommendations": [ // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp "dbaeumer.vscode-eslint", - "dbaeumer.jshint", - "donjayamanne.python", + "ms-python.python", "flowtype.flow-for-vscode", - "minhthai.vscode-todo-parser", "mkaufman.HTMLHint", - "ms-vscode.typescript-javascript-grammar", "robertohuertasm.vscode-icons", "shinnn.stylelint", "joelday.docthis", - "ms-vscode.node-debug2", "eg2.vscode-npm-script", "christian-kohler.npm-intellisense", "eamodio.gitlens", - "EditorConfig.editorconfig" + "EditorConfig.editorconfig", + "esbenp.prettier-vscode", + "asvetliakov.snapshot-tools", + "ban.spellright", + "bierner.markdown-preview-github-styles", + "wayou.vscode-todo-highlight" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 7de4c45d7bc..7fc40f0fe7d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -99,8 +99,15 @@ "suppressUpdateNotice": false, "suppressWelcomeNotice": true }, + //-------- SpellRight configuration -------- + "spellright.notificationClass": "warning", + "spellright.documentTypes": [ + "markdown", + "latex", + "plaintext", + "javascript" + ], //-------- Flow configuration -------- - // Is flow enabled "flow.enabled": true, "flow.runOnEdit": false, //-------- HTML configuration -------- diff --git a/README.md b/README.md index 038bc917c5e..b27705b44c0 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,15 @@ Forked from Mathias Bynens' excellent repo! https://github.com/mathiasbynens/dotfiles.git ## Steps to Configure (OSX) Environment -1. Install Xcode -2. Install Homebrew. -3. `source brew.sh` -3. `source pip.sh` -4. `source bootstrap.sh` -5. Manually symlink nested files to their appropriate locations (I'll add these steps to `bootstrap.sh` eventually). -6. Manually install global npm packages listed in `npm-ls.txt` (hopefully, this can be automated at some point). -7. `source .macos` -8. Restart. -9. ???? -10. PROFIT!!! + +1. Install Xcode +2. Install Homebrew. +3. `source brew.sh` +4. `source pip.sh` +5. `source bootstrap.sh` +6. Manually symlink nested files to their appropriate locations (I'll add these steps to `bootstrap.sh` eventually). +7. Manually install global npm packages listed in `npm-ls.txt` (hopefully, this can be automated at some point). +8. `source .macos` +9. Restart. +10. ???? +11. PROFIT!!! From e7d4e2e68d6c47bfb9a8dbe98daf08fbb5db9380 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 28 Apr 2018 12:19:47 -0400 Subject: [PATCH 085/141] Deleted extensions recommendations in favour of install script. --- .vscode/extensions.json | 23 ----------------------- README.md | 13 +++++++------ vscode.sh | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 29 deletions(-) delete mode 100644 .vscode/extensions.json create mode 100755 vscode.sh diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 98bbb842bfe..00000000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - // See http://go.microsoft.com/fwlink/?LinkId=827846 - // for the documentation about the extensions.json format - "recommendations": [ - // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp - "dbaeumer.vscode-eslint", - "ms-python.python", - "flowtype.flow-for-vscode", - "mkaufman.HTMLHint", - "robertohuertasm.vscode-icons", - "shinnn.stylelint", - "joelday.docthis", - "eg2.vscode-npm-script", - "christian-kohler.npm-intellisense", - "eamodio.gitlens", - "EditorConfig.editorconfig", - "esbenp.prettier-vscode", - "asvetliakov.snapshot-tools", - "ban.spellright", - "bierner.markdown-preview-github-styles", - "wayou.vscode-todo-highlight" - ] -} diff --git a/README.md b/README.md index b27705b44c0..88fbb7e2d0f 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,10 @@ https://github.com/mathiasbynens/dotfiles.git 3. `source brew.sh` 4. `source pip.sh` 5. `source bootstrap.sh` -6. Manually symlink nested files to their appropriate locations (I'll add these steps to `bootstrap.sh` eventually). -7. Manually install global npm packages listed in `npm-ls.txt` (hopefully, this can be automated at some point). -8. `source .macos` -9. Restart. -10. ???? -11. PROFIT!!! +6. `source vscode.sh` +7. Manually symlink nested files to their appropriate locations (I'll add these steps to `bootstrap.sh` eventually). +8. Manually install global npm packages listed in `npm-ls.txt` (hopefully, this can be automated at some point). +9. `source .macos` +10. Restart. +11. ???? +12. PROFIT!!! diff --git a/vscode.sh b/vscode.sh new file mode 100755 index 00000000000..7b215ada151 --- /dev/null +++ b/vscode.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Install VS Code Extensions. + +code --install-extension dbaeumer.vscode-eslint +code --install-extension ms-python.python +code --install-extension flowtype.flow-for-vscode +code --install-extension mkaufman.HTMLHint +code --install-extension robertohuertasm.vscode-icons +code --install-extension shinnn.stylelint +code --install-extension joelday.docthis +code --install-extension eg2.vscode-npm-script +code --install-extension christian-kohler.npm-intellisense +code --install-extension eamodio.gitlens +code --install-extension EditorConfig.editorconfig +code --install-extension esbenp.prettier-vscode +code --install-extension asvetliakov.snapshot-tools +code --install-extension ban.spellright +code --install-extension bierner.markdown-preview-github-styles +code --install-extension wayou.vscode-todo-highlight From 6d2a79ce90565908d0684f2e4f4d157cdc9a8d77 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 28 May 2018 09:11:13 -0400 Subject: [PATCH 086/141] Added desktop randomizer script. Updated functions and vscode extensions. --- .aliases | 3 --- .functions | 8 ++++++++ vscode.sh | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.aliases b/.aliases index 703ef1a9852..60801ec5f57 100644 --- a/.aliases +++ b/.aliases @@ -59,9 +59,6 @@ alias update='sudo softwareupdate -i -a; brew update; brew upgrade; npm install # Google Chrome alias chrome='open -a Google\ Chrome' -# Vanilla -alias vanilla='open -a Vanilla' - # IP addresses alias ip="dig +short myip.opendns.com @resolver1.opendns.com" alias lip="ipconfig getifaddr en0" diff --git a/.functions b/.functions index 47c0151f6ad..652fd0d5e21 100644 --- a/.functions +++ b/.functions @@ -1,5 +1,13 @@ #!/usr/bin/env bash +# Randomize desktop background image +function desktoprandomizer() { + path="${HOME}/Projects/desktop-randomizer" + source "${path}/desktop-randomizer/bin/activate"; + python "${path}/main.py" + deactivate; +} + # Kill process by port function killport() { diff --git a/vscode.sh b/vscode.sh index 7b215ada151..7308d22dbbe 100755 --- a/vscode.sh +++ b/vscode.sh @@ -18,3 +18,7 @@ code --install-extension asvetliakov.snapshot-tools code --install-extension ban.spellright code --install-extension bierner.markdown-preview-github-styles code --install-extension wayou.vscode-todo-highlight +code --install-extension alexdima.copy-relative-path +code --install-extension wangtao0101.vscode-js-import +code --install-extension CoenraadS.bracket-pair-colorizer +code --install-extension yahya-gilany.vscode-terminal-launcher From 3f72f52e71504ac7a7f4e52e63aafbbef5f62167 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 28 May 2018 09:11:38 -0400 Subject: [PATCH 087/141] Formatted vscode settings. --- .vscode/settings.json | 426 +++++++++++++++++++++--------------------- 1 file changed, 215 insertions(+), 211 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 7fc40f0fe7d..f610d6c6020 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,214 +1,218 @@ // Place your settings in this file to overwrite the default settings { - //-------- Editor configuration -------- - "window.zoomLevel": 0, - "window.newWindowDimensions": "maximized", - "window.nativeTabs": false, - "workbench.editor.labelFormat": "short", - "workbench.iconTheme": "vscode-icons", - "workbench.editor.revealIfOpen": true, - "workbench.startupEditor": "newUntitledFile", - "workbench.colorTheme": "Abyss", - "workbench.editor.enablePreviewFromQuickOpen": false, - "editor.tokenColorCustomizations": { - "[Abyss]": { - "comments": "#225588", - "keywords": "#2d6fb1" - } - }, - "editor.fontFamily": "Fira Code", - "editor.fontSize": 13, - "editor.tabSize": 2, - "editor.renderIndentGuides": true, - "editor.glyphMargin": true, - "editor.scrollBeyondLastLine": true, - "editor.mouseWheelZoom": false, - "editor.cursorStyle": "line", - "editor.renderWhitespace": "boundary", - "editor.formatOnSave": true, - "editor.minimap.enabled": false, - "editor.wordWrap": "off", - "editor.fontLigatures": true, - "editor.renderControlCharacters": true, - "editor.autoIndent": false, - "editor.snippetSuggestions": "top", - "editor.insertSpaces": true, - "terminal.integrated.confirmOnExit": true, - "terminal.integrated.fontFamily": "Fira Code", - "terminal.integrated.fontSize": 13, - "explorer.confirmDragAndDrop": false, - "files.insertFinalNewline": true, - "diffEditor.ignoreTrimWhitespace": false, - "debug.inlineValues": true, - "extensions.autoUpdate": true, - "git.promptToSaveFilesBeforeCommit": true, - "search.exclude": { - // GENERAL - "**/.git": true, - "**/node_modules": true, - "**/build": true, - "**/dist": true, - // JS - "**/flow-typed": true, - // TESTS - "**/coverage": true, - // .NET - "**/bin": true, - "**/obj": true, - "**/packages": true, - // DJANGO - "**/migrations": true, - "**/south_migrations": true, - "**/lib": true, - // JEKYLL - "**/_site": true - }, - //-------- Files configuration -------- - "files.exclude": { - "**/*.pyc": true, - "**/*.sublime*": true - }, - "files.trimTrailingWhitespace": true, - //-------- Icons -------- - "vsicons.dontShowNewVersionMessage": true, - "vsicons.projectDetection.disableDetect": true, - "vsicons.presets.angular": true, - //-------- Prettier configuration -------- - "prettier.requireConfig": true, - //-------- ESLint configuration -------- - "eslint.enable": true, - "eslint.autoFixOnSave": true, - //-------- HTMLHint configuration -------- - "htmlhint.enable": true, - //-------- StyleLint configuration -------- - "stylelint.enable": false, - //-------- Python configuration -------- - "python.linting.enabled": true, - "python.linting.pylintEnabled": false, - "python.linting.pep8Enabled": true, - //-------- GitLens configuration -------- - "gitlens.advanced.messages": { - "suppressCommitHasNoPreviousCommitWarning": false, - "suppressCommitNotFoundWarning": false, - "suppressFileNotUnderSourceControlWarning": false, - "suppressGitVersionWarning": false, - "suppressLineUncommittedWarning": false, - "suppressNoRepositoryWarning": false, - "suppressResultsExplorerNotice": false, - "suppressShowKeyBindingsNotice": true, - "suppressUpdateNotice": false, - "suppressWelcomeNotice": true - }, - //-------- SpellRight configuration -------- - "spellright.notificationClass": "warning", - "spellright.documentTypes": [ - "markdown", - "latex", - "plaintext", - "javascript" - ], - //-------- Flow configuration -------- - "flow.enabled": true, - "flow.runOnEdit": false, - //-------- HTML configuration -------- - "emmet.showSuggestionsAsSnippets": true, - // Maximum amount of characters per line (0 = disable). - "html.format.wrapLineLength": 120, - // List of tags, comma separated, that shouldn't be reformatted. 'null' defaults to all tags listed at https://www.w3.org/TR/html5/dom.html#phrasing-content. - "html.format.unformatted": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, script, select, small, span, strong, sub, sup, textarea, tt, var", - // Indent and sections. - "html.format.indentInnerHtml": false, - // Whether existing line breaks before elements should be preserved. Only works before elements, not inside tags or for text. - "html.format.preserveNewLines": true, - // Maximum number of line breaks to be preserved in one chunk. Use 'null' for unlimited. - "html.format.maxPreserveNewLines": null, - // Format and indent {{#foo}} and {{/foo}}. - "html.format.indentHandlebars": false, - // End with a newline. - "html.format.endWithNewline": false, - // List of tags, comma separated, that should have an extra newline before them. 'null' defaults to "head, body, /html". - "html.format.extraLiners": "head, body, /html", - // Wrap attributes. - "html.format.wrapAttributes": "force", - //-------- JavaScript configuration -------- - // TODO: Noticed problems with these settings and eslint, consider removing. - "javascript.validate.enable": false, - //-------- CSS configuration -------- - // TODO: Noticed problems with these settings and stylelint, consider removing. - "css.validate": true, - // When using a vendor-specific prefix make sure to also include all other vendor-specific properties - "css.lint.compatibleVendorPrefixes": "warning", - // When using a vendor-specific prefix also include the standard property - "css.lint.vendorPrefix": "warning", - // Do not use duplicate style definitions - "css.lint.duplicateProperties": "error", - // Do not use empty rulesets - "css.lint.emptyRules": "error", - // Import statements do not load in parallel - "css.lint.importStatement": "warning", - // Do not use width or height when using padding or border - "css.lint.boxModel": "ignore", - // The universal selector (*) is known to be slow - "css.lint.universalSelector": "ignore", - // No unit for zero needed - "css.lint.zeroUnits": "error", - // @font-face rule must define 'src' and 'font-family' properties - "css.lint.fontFaceProperties": "warning", - // Hex colors must consist of three or six hex numbers - "css.lint.hexColorLength": "error", - // Invalid number of parameters - "css.lint.argumentsInColorFunction": "error", - // Unknown property. - "css.lint.unknownProperties": "error", - // IE hacks are only necessary when supporting IE7 and older - "css.lint.ieHack": "warning", - // Unknown vendor specific property. - "css.lint.unknownVendorSpecificProperties": "error", - // Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect - "css.lint.propertyIgnoredDueToDisplay": "error", - // Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. - "css.lint.important": "warning", - // Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. - "css.lint.float": "ignore", - // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. - "css.lint.idSelector": "ignore", - //-------- LESS configuration -------- - // TODO: Noticed problems with these settings and stylelint, consider removing. - "less.validate": false, - // When using a vendor-specific prefix make sure to also include all other vendor-specific properties - "less.lint.compatibleVendorPrefixes": "warning", - // When using a vendor-specific prefix also include the standard property - "less.lint.vendorPrefix": "warning", - // Do not use duplicate style definitions - "less.lint.duplicateProperties": "error", - // Do not use empty rulesets - "less.lint.emptyRules": "error", - // Import statements do not load in parallel - "less.lint.importStatement": "warning", - // Do not use width or height when using padding or border - "less.lint.boxModel": "ignore", - // The universal selector (*) is known to be slow - "less.lint.universalSelector": "ignore", - // No unit for zero needed - "less.lint.zeroUnits": "error", - // @font-face rule must define 'src' and 'font-family' properties - "less.lint.fontFaceProperties": "warning", - // Hex colors must consist of three or six hex numbers - "less.lint.hexColorLength": "error", - // Invalid number of parameters - "less.lint.argumentsInColorFunction": "error", - // Unknown property. - "less.lint.unknownProperties": "error", - // IE hacks are only necessary when supporting IE7 and older - "less.lint.ieHack": "warning", - // Unknown vendor specific property. - "less.lint.unknownVendorSpecificProperties": "warning", - // Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect - "less.lint.propertyIgnoredDueToDisplay": "error", - // Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. - "less.lint.important": "warning", - // Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. - "less.lint.float": "ignore", - // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. - "less.lint.idSelector": "ignore" + //-------- Editor configuration -------- + "window.zoomLevel": 0, + "window.newWindowDimensions": "maximized", + "window.nativeTabs": false, + "workbench.editor.labelFormat": "short", + "workbench.iconTheme": "vscode-icons", + "workbench.editor.revealIfOpen": true, + "workbench.startupEditor": "newUntitledFile", + "workbench.colorTheme": "Abyss", + "workbench.editor.enablePreviewFromQuickOpen": false, + "editor.tokenColorCustomizations": { + "[Abyss]": { + "comments": "#225588", + "keywords": "#2d6fb1" + } + }, + "editor.fontFamily": "Fira Code", + "editor.fontSize": 13, + "editor.tabSize": 2, + "editor.renderIndentGuides": true, + "editor.glyphMargin": true, + "editor.scrollBeyondLastLine": true, + "editor.mouseWheelZoom": false, + "editor.cursorStyle": "line", + "editor.renderWhitespace": "boundary", + "editor.formatOnSave": true, + "editor.minimap.enabled": false, + "editor.wordWrap": "off", + "editor.fontLigatures": true, + "editor.renderControlCharacters": true, + "editor.autoIndent": false, + "editor.snippetSuggestions": "top", + "editor.insertSpaces": true, + "editor.codeActionsOnSave": { + "source.organizeImports": false, + }, + "terminal.integrated.confirmOnExit": true, + "terminal.integrated.fontFamily": "Fira Code", + "terminal.integrated.fontSize": 13, + "explorer.confirmDragAndDrop": false, + "files.insertFinalNewline": true, + "diffEditor.ignoreTrimWhitespace": false, + "debug.inlineValues": true, + "extensions.autoUpdate": true, + "git.promptToSaveFilesBeforeCommit": true, + "search.exclude": { + // GENERAL + "**/.git": true, + "**/node_modules": true, + "**/build": true, + "**/dist": true, + // JS + "**/flow-typed": true, + // TESTS + "**/coverage": true, + // .NET + "**/bin": true, + "**/obj": true, + "**/packages": true, + // DJANGO + "**/migrations": true, + "**/south_migrations": true, + "**/lib": true, + // JEKYLL + "**/_site": true + }, + //-------- Files configuration -------- + "files.exclude": { + "**/*.pyc": true, + "**/*.sublime*": true + }, + "files.trimTrailingWhitespace": true, + //-------- Icons -------- + "vsicons.dontShowNewVersionMessage": true, + "vsicons.projectDetection.disableDetect": true, + "vsicons.presets.angular": true, + //-------- Prettier configuration -------- + "prettier.requireConfig": true, + //-------- ESLint configuration -------- + "eslint.enable": true, + "eslint.autoFixOnSave": true, + //-------- HTMLHint configuration -------- + "htmlhint.enable": true, + //-------- StyleLint configuration -------- + "stylelint.enable": false, + //-------- Python configuration -------- + "python.linting.enabled": true, + "python.linting.pylintEnabled": false, + "python.linting.pep8Enabled": true, + //-------- GitLens configuration -------- + "gitlens.advanced.messages": { + "suppressCommitHasNoPreviousCommitWarning": false, + "suppressCommitNotFoundWarning": false, + "suppressFileNotUnderSourceControlWarning": false, + "suppressGitVersionWarning": false, + "suppressLineUncommittedWarning": false, + "suppressNoRepositoryWarning": false, + "suppressResultsExplorerNotice": false, + "suppressShowKeyBindingsNotice": true, + "suppressUpdateNotice": false, + "suppressWelcomeNotice": true + }, + //-------- SpellRight configuration -------- + "spellright.notificationClass": "warning", + "spellright.documentTypes": [ + "markdown", + "latex", + "plaintext", + "javascript" + ], + //-------- Flow configuration -------- + "flow.enabled": true, + "flow.runOnEdit": false, + //-------- HTML configuration -------- + "emmet.showSuggestionsAsSnippets": true, + // Maximum amount of characters per line (0 = disable). + "html.format.wrapLineLength": 120, + // List of tags, comma separated, that shouldn't be reformatted. 'null' defaults to all tags listed at https://www.w3.org/TR/html5/dom.html#phrasing-content. + "html.format.unformatted": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, script, select, small, span, strong, sub, sup, textarea, tt, var", + // Indent and sections. + "html.format.indentInnerHtml": false, + // Whether existing line breaks before elements should be preserved. Only works before elements, not inside tags or for text. + "html.format.preserveNewLines": true, + // Maximum number of line breaks to be preserved in one chunk. Use 'null' for unlimited. + "html.format.maxPreserveNewLines": null, + // Format and indent {{#foo}} and {{/foo}}. + "html.format.indentHandlebars": false, + // End with a newline. + "html.format.endWithNewline": false, + // List of tags, comma separated, that should have an extra newline before them. 'null' defaults to "head, body, /html". + "html.format.extraLiners": "head, body, /html", + // Wrap attributes. + "html.format.wrapAttributes": "force", + //-------- JavaScript configuration -------- + // TODO: Noticed problems with these settings and eslint, consider removing. + "javascript.validate.enable": false, + //-------- CSS configuration -------- + // TODO: Noticed problems with these settings and stylelint, consider removing. + "css.validate": true, + // When using a vendor-specific prefix make sure to also include all other vendor-specific properties + "css.lint.compatibleVendorPrefixes": "warning", + // When using a vendor-specific prefix also include the standard property + "css.lint.vendorPrefix": "warning", + // Do not use duplicate style definitions + "css.lint.duplicateProperties": "error", + // Do not use empty rulesets + "css.lint.emptyRules": "error", + // Import statements do not load in parallel + "css.lint.importStatement": "warning", + // Do not use width or height when using padding or border + "css.lint.boxModel": "ignore", + // The universal selector (*) is known to be slow + "css.lint.universalSelector": "ignore", + // No unit for zero needed + "css.lint.zeroUnits": "error", + // @font-face rule must define 'src' and 'font-family' properties + "css.lint.fontFaceProperties": "warning", + // Hex colors must consist of three or six hex numbers + "css.lint.hexColorLength": "error", + // Invalid number of parameters + "css.lint.argumentsInColorFunction": "error", + // Unknown property. + "css.lint.unknownProperties": "error", + // IE hacks are only necessary when supporting IE7 and older + "css.lint.ieHack": "warning", + // Unknown vendor specific property. + "css.lint.unknownVendorSpecificProperties": "error", + // Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect + "css.lint.propertyIgnoredDueToDisplay": "error", + // Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. + "css.lint.important": "warning", + // Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. + "css.lint.float": "ignore", + // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. + "css.lint.idSelector": "ignore", + //-------- LESS configuration -------- + // TODO: Noticed problems with these settings and stylelint, consider removing. + "less.validate": false, + // When using a vendor-specific prefix make sure to also include all other vendor-specific properties + "less.lint.compatibleVendorPrefixes": "warning", + // When using a vendor-specific prefix also include the standard property + "less.lint.vendorPrefix": "warning", + // Do not use duplicate style definitions + "less.lint.duplicateProperties": "error", + // Do not use empty rulesets + "less.lint.emptyRules": "error", + // Import statements do not load in parallel + "less.lint.importStatement": "warning", + // Do not use width or height when using padding or border + "less.lint.boxModel": "ignore", + // The universal selector (*) is known to be slow + "less.lint.universalSelector": "ignore", + // No unit for zero needed + "less.lint.zeroUnits": "error", + // @font-face rule must define 'src' and 'font-family' properties + "less.lint.fontFaceProperties": "warning", + // Hex colors must consist of three or six hex numbers + "less.lint.hexColorLength": "error", + // Invalid number of parameters + "less.lint.argumentsInColorFunction": "error", + // Unknown property. + "less.lint.unknownProperties": "error", + // IE hacks are only necessary when supporting IE7 and older + "less.lint.ieHack": "warning", + // Unknown vendor specific property. + "less.lint.unknownVendorSpecificProperties": "warning", + // Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect + "less.lint.propertyIgnoredDueToDisplay": "error", + // Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. + "less.lint.important": "warning", + // Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. + "less.lint.float": "ignore", + // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. + "less.lint.idSelector": "ignore", + "gitlens.historyExplorer.enabled": true } From ff1e6d492e569efa8a277a02f09559aa2e8a8c50 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 6 Jul 2018 10:45:32 -0400 Subject: [PATCH 088/141] Added git helpers that make upstream work easier. --- .eslintrc | 1 + .gitconfig | 16 ++++++++++------ .vscode/settings.json | 1 + 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.eslintrc b/.eslintrc index d4770d1fff8..dd860f90919 100644 --- a/.eslintrc +++ b/.eslintrc @@ -33,6 +33,7 @@ "no-ternary": "off", "sort-imports": "off", "sort-keys": "off", + "no-magic-numbers": "off", // REACT "react/prop-types": "off", diff --git a/.gitconfig b/.gitconfig index d70bf61ce9c..8d6cf145c9f 100644 --- a/.gitconfig +++ b/.gitconfig @@ -35,6 +35,9 @@ # Fetch origin fo = "!git fetch origin" + # Fetch upstream + fu = "!git fetch upstream" + # Commit all changes ca = !git add -A && git commit -av @@ -58,8 +61,11 @@ # Interactive rebase with the given number of latest commits reb = "!r() { git rebase -i HEAD~$1; }; r" - # Fetch and rebase current branch with master - mreb = "!git rebase origin/master" + # Fetch and rebase current branch with origin's master + oreb = "!git rebase origin/master" + + # Fetch and rebase current branch with upstream's master + ureb = "!git rebase upstream/master" # Interactively rebase changes in current branch breb = "!git rebase -i `git merge-base master HEAD`" @@ -173,10 +179,8 @@ [push] - # Use the Git 1.x.x default to avoid errors on machines with old Git - # installations. To use `simple` instead, add this to your `~/.extra` file: - # `git config --global push.default simple`. See http://git.io/mMah-w. - default = matching + # Push current branch to its upstream branch. + default = upstream # Make `git push` push relevant annotated tags when pushing branches out. followTags = true diff --git a/.vscode/settings.json b/.vscode/settings.json index f610d6c6020..70e0a759f5a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -43,6 +43,7 @@ "files.insertFinalNewline": true, "diffEditor.ignoreTrimWhitespace": false, "debug.inlineValues": true, + "debug.toolBarLocation": "docked", "extensions.autoUpdate": true, "git.promptToSaveFilesBeforeCommit": true, "search.exclude": { From a2c715c9681569b784a70a3cd810a01221a2aa02 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 11 Oct 2018 09:22:05 -0400 Subject: [PATCH 089/141] Removed flow related things, updated VS Code extensions list, updated settings for newer VS Code versions. --- .eslintrc | 7 +------ .flowconfig | 11 ----------- .vscode/settings.json | 11 +++++++---- vscode.sh | 6 ++---- 4 files changed, 10 insertions(+), 25 deletions(-) delete mode 100644 .flowconfig diff --git a/.eslintrc b/.eslintrc index dd860f90919..9f5ca5159a6 100644 --- a/.eslintrc +++ b/.eslintrc @@ -11,14 +11,12 @@ "es6": true // enable es6 keywords, except module. }, - "plugins": ["flowtype", "react", "prettier"], + "plugins": ["react", "prettier"], "extends": [ "eslint:all", "plugin:react/recommended", - "plugin:flowtype/recommended", "prettier", - "prettier/flowtype", "prettier/react" ], @@ -43,9 +41,6 @@ }, "settings": { - "flowtype": { - "onlyFilesWithFlowAnnotation": true - }, "compiler": "babel" } } diff --git a/.flowconfig b/.flowconfig deleted file mode 100644 index 2441995d0fb..00000000000 --- a/.flowconfig +++ /dev/null @@ -1,11 +0,0 @@ -[ignore] -.*/node_modules/.* -.*/bower_components/.* -.*/coverage/.* -.*/dist/.* -.*/build/.* -.*\.config\.js -.*\.test\.js - -[options] -all=false diff --git a/.vscode/settings.json b/.vscode/settings.json index 70e0a759f5a..3036451f8e4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -34,7 +34,7 @@ "editor.snippetSuggestions": "top", "editor.insertSpaces": true, "editor.codeActionsOnSave": { - "source.organizeImports": false, + "source.organizeImports": false }, "terminal.integrated.confirmOnExit": true, "terminal.integrated.fontFamily": "Fira Code", @@ -77,6 +77,8 @@ "vsicons.dontShowNewVersionMessage": true, "vsicons.projectDetection.disableDetect": true, "vsicons.presets.angular": true, + //-------- GitLens configuration -------- + "gitlens.historyExplorer.enabled": true, //-------- Prettier configuration -------- "prettier.requireConfig": true, //-------- ESLint configuration -------- @@ -104,12 +106,14 @@ "suppressWelcomeNotice": true }, //-------- SpellRight configuration -------- + "spellright.language": "en", "spellright.notificationClass": "warning", "spellright.documentTypes": [ "markdown", "latex", "plaintext", - "javascript" + "javascript", + "typescript" ], //-------- Flow configuration -------- "flow.enabled": true, @@ -214,6 +218,5 @@ // Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. "less.lint.float": "ignore", // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. - "less.lint.idSelector": "ignore", - "gitlens.historyExplorer.enabled": true + "less.lint.idSelector": "ignore" } diff --git a/vscode.sh b/vscode.sh index 7308d22dbbe..2f05070fb9d 100755 --- a/vscode.sh +++ b/vscode.sh @@ -4,7 +4,6 @@ code --install-extension dbaeumer.vscode-eslint code --install-extension ms-python.python -code --install-extension flowtype.flow-for-vscode code --install-extension mkaufman.HTMLHint code --install-extension robertohuertasm.vscode-icons code --install-extension shinnn.stylelint @@ -14,11 +13,10 @@ code --install-extension christian-kohler.npm-intellisense code --install-extension eamodio.gitlens code --install-extension EditorConfig.editorconfig code --install-extension esbenp.prettier-vscode -code --install-extension asvetliakov.snapshot-tools code --install-extension ban.spellright code --install-extension bierner.markdown-preview-github-styles code --install-extension wayou.vscode-todo-highlight -code --install-extension alexdima.copy-relative-path -code --install-extension wangtao0101.vscode-js-import code --install-extension CoenraadS.bracket-pair-colorizer code --install-extension yahya-gilany.vscode-terminal-launcher +code --install-extension eg2.tslint +code --install-extension davidanson.vscode-markdownlint From 1b566398660e31863a08b56ac2d84d8376e91337 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 11 Oct 2018 09:25:28 -0400 Subject: [PATCH 090/141] Removed comments from ESLint config. --- .eslintrc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.eslintrc b/.eslintrc index 9f5ca5159a6..0959b0d8e63 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,13 +2,12 @@ "parser": "babel-eslint", "env": { - "browser": true, // browser global variables. - "node": true, // Node.js global variables and Node.js-specific rules. - "amd": true, // defines require() and define() as global variables as per the amd spec. - "mocha": true, // adds all of the Mocha testing global variables. - "jasmine": true, // adds all of the Jasmine testing global variables for version 1.3 and 0.0. - "jquery": true, // jquery global variables. - "es6": true // enable es6 keywords, except module. + "browser": true, + "node": true, + "amd": true, + "mocha": true, + "jasmine": true, + "es6": true }, "plugins": ["react", "prettier"], @@ -25,7 +24,6 @@ }, "rules": { - // GENERAL "one-var": "off", "no-process-env": "off", "no-ternary": "off", @@ -33,10 +31,8 @@ "sort-keys": "off", "no-magic-numbers": "off", - // REACT "react/prop-types": "off", - // PRETTIER "prettier/prettier": "error" }, From 63277750820f7800252309762a8dd13240760db4 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 11 Oct 2018 09:31:32 -0400 Subject: [PATCH 091/141] Removed npm modules and git configs related to old projects. --- .gitattributes | 7 ------- npm-ls.txt | 10 ++++------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.gitattributes b/.gitattributes index a31c71852b9..e3f66c8a31f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,10 +3,3 @@ *.dll binary *.zip binary *.psd binary - -# Git LFS -# Temporarily disabled because it messes with older repos at work. -# *.bin filter=lfs diff=lfs merge=lfs -text -# *.dll filter=lfs diff=lfs merge=lfs -text -# *.zip filter=lfs diff=lfs merge=lfs -text -# *.psd filter=lfs diff=lfs merge=lfs -text diff --git a/npm-ls.txt b/npm-ls.txt index 9e9601a3393..634890b4cb9 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -1,18 +1,16 @@ -/Users/igorbarsi/.nvm/versions/node/v8.6.0/lib +/Users/igorbarsi/.nvm/versions/node/v10.5.0/lib ├── babel-eslint@8.2.2 +├── create-react-app@1.5.2 ├── eslint@4.19.1 ├── eslint-config-prettier@2.9.0 -├── eslint-plugin-flowtype@2.46.1 ├── eslint-plugin-prettier@2.6.0 ├── eslint-plugin-react@7.7.0 -├── flow-bin@0.68.0 +├── firebase-tools@4.2.1 ├── grunt@1.0.2 ├── htmlhint@0.9.13 -├── jshint@2.9.5 -├── npm@5.4.2 +├── npm@6.3.0 ├── prettier@1.12.1 ├── stylelint@9.1.3 ├── stylelint-config-recommended@2.1.0 -├── wttr@0.0.4 └── yarn@1.5.1 From f69a133f980e3c84801bee4faee9a4cf75dda59f Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 11 Oct 2018 09:33:40 -0400 Subject: [PATCH 092/141] Removed most flow related things and fixed a VS Code settings config error. --- .prettierignore | 1 - .vscode/settings.json | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.prettierignore b/.prettierignore index 5644a3568ef..92383e15e0e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,4 @@ .*/ -flow-typed/ node_modules/ dist/ package.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 3036451f8e4..de7701665a1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -52,8 +52,6 @@ "**/node_modules": true, "**/build": true, "**/dist": true, - // JS - "**/flow-typed": true, // TESTS "**/coverage": true, // .NET @@ -106,7 +104,7 @@ "suppressWelcomeNotice": true }, //-------- SpellRight configuration -------- - "spellright.language": "en", + "spellright.language": ["en"], "spellright.notificationClass": "warning", "spellright.documentTypes": [ "markdown", @@ -115,9 +113,6 @@ "javascript", "typescript" ], - //-------- Flow configuration -------- - "flow.enabled": true, - "flow.runOnEdit": false, //-------- HTML configuration -------- "emmet.showSuggestionsAsSnippets": true, // Maximum amount of characters per line (0 = disable). From a2d56bdb41b88cc6d08e6e699d9f5b8a01c27c1c Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 24 Nov 2018 16:48:25 -0500 Subject: [PATCH 093/141] Shorten desktop randomizer function name and update some VS Code settings. --- .functions | 4 ++-- .vscode/settings.json | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.functions b/.functions index 652fd0d5e21..8571f71f928 100644 --- a/.functions +++ b/.functions @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Randomize desktop background image -function desktoprandomizer() { +function drand() { path="${HOME}/Projects/desktop-randomizer" source "${path}/desktop-randomizer/bin/activate"; python "${path}/main.py" @@ -9,7 +9,7 @@ function desktoprandomizer() { } # Kill process by port -function killport() +function killport() { lsof -i tcp:$1 | awk 'FNR == 2 {print $2}' | xargs kill -9 } diff --git a/.vscode/settings.json b/.vscode/settings.json index de7701665a1..ca652c64980 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,6 +10,7 @@ "workbench.startupEditor": "newUntitledFile", "workbench.colorTheme": "Abyss", "workbench.editor.enablePreviewFromQuickOpen": false, + "workbench.editor.highlightModifiedTabs": true, "editor.tokenColorCustomizations": { "[Abyss]": { "comments": "#225588", @@ -46,6 +47,7 @@ "debug.toolBarLocation": "docked", "extensions.autoUpdate": true, "git.promptToSaveFilesBeforeCommit": true, + "search.showLineNumbers": true, "search.exclude": { // GENERAL "**/.git": true, @@ -65,6 +67,7 @@ // JEKYLL "**/_site": true }, + "typescript.updateImportsOnFileMove.enabled": "always", //-------- Files configuration -------- "files.exclude": { "**/*.pyc": true, From bdac28149e4c982b75f10dbf870803011e8370f3 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 13 Dec 2018 08:39:43 -0500 Subject: [PATCH 094/141] Add yarn to PATH. --- .path | 2 ++ .vscode/settings.json | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.path b/.path index b675c7d40aa..1d38545c17a 100644 --- a/.path +++ b/.path @@ -3,3 +3,5 @@ export PATH="/usr/local/sbin:$PATH" # RVM export PATH="$PATH:$HOME/.rvm/bin" + +export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" diff --git a/.vscode/settings.json b/.vscode/settings.json index ca652c64980..496c36a2b58 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -79,7 +79,8 @@ "vsicons.projectDetection.disableDetect": true, "vsicons.presets.angular": true, //-------- GitLens configuration -------- - "gitlens.historyExplorer.enabled": true, + "gitlens.views.fileHistory.enabled": true, + "gitlens.views.lineHistory.enabled": true, //-------- Prettier configuration -------- "prettier.requireConfig": true, //-------- ESLint configuration -------- @@ -139,6 +140,7 @@ //-------- JavaScript configuration -------- // TODO: Noticed problems with these settings and eslint, consider removing. "javascript.validate.enable": false, + "javascript.updateImportsOnFileMove.enabled": "always", //-------- CSS configuration -------- // TODO: Noticed problems with these settings and stylelint, consider removing. "css.validate": true, From 77d507f9a84301a28e1efe8fb79b4f79101cbb82 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 29 Jan 2019 15:26:45 -0500 Subject: [PATCH 095/141] Update git rebase aliases to accept a remote branch name, otherwise defaulting to the current branch. --- .gitconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitconfig b/.gitconfig index 8d6cf145c9f..d635e11671c 100644 --- a/.gitconfig +++ b/.gitconfig @@ -62,10 +62,10 @@ reb = "!r() { git rebase -i HEAD~$1; }; r" # Fetch and rebase current branch with origin's master - oreb = "!git rebase origin/master" + oreb = "!f() { git rebase origin/${1:-$(git symbolic-ref --short HEAD)}; }; f" # Fetch and rebase current branch with upstream's master - ureb = "!git rebase upstream/master" + ureb = "!f() { git rebase upstream/${1:-$(git symbolic-ref --short HEAD)}; }; f" # Interactively rebase changes in current branch breb = "!git rebase -i `git merge-base master HEAD`" From ac59273c3995ae1070e07f7f42f149a025f89cb1 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 24 Feb 2019 10:04:50 -0500 Subject: [PATCH 096/141] Remove unnecessary brew installed packages --- .bashrc | 4 ++++ .exports | 3 +++ brew.sh | 15 ++++----------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.bashrc b/.bashrc index 4a9c771486c..f037a237188 100644 --- a/.bashrc +++ b/.bashrc @@ -2,3 +2,7 @@ # Load RVM into a shell session *as a function* [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" + +# Load NVM and enable its bash completion +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" diff --git a/.exports b/.exports index 798567207e1..242809ec5d4 100644 --- a/.exports +++ b/.exports @@ -27,3 +27,6 @@ export MANPAGER='less -X'; # Avoid issues with `gpg` as installed via Homebrew. # https://stackoverflow.com/a/42265848/96656 export GPG_TTY=$(tty); + +# NVM +export NVM_DIR="$HOME/.nvm" diff --git a/brew.sh b/brew.sh index b96d47b05bb..56a011c376f 100755 --- a/brew.sh +++ b/brew.sh @@ -18,8 +18,8 @@ brew install moreutils # Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed. brew install findutils -# Install GNU `sed`, overwriting the built-in `sed`. -brew install gnu-sed --with-default-names +# Install GNU `sed`. +brew install gnu-sed # Install Bash 4. # Note: don’t forget to add `/usr/local/bin/bash` to `/etc/shells` before @@ -33,8 +33,8 @@ if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then chsh -s /usr/local/bin/bash; fi; -# Install `wget` with IRI support. -brew install wget --with-iri +# Install `wget`. +brew install wget # Install more recent versions of some macOS tools. brew install vim @@ -43,8 +43,6 @@ brew install openssh # Install other useful binaries. brew install ack # Beyond `grep` -brew install dark-mode # Toggle Mac dark mode -brew install p7zip # 7zip for Mac brew install speedtest_cli # Test your internet connection speed brew install ssh-copy-id # Add ssh identity to remote host for easy login brew install testssl # Test ssl configuration strength @@ -60,9 +58,7 @@ brew install git # Source control brew install git-lfs # System for managing large files in source control via Git LFS brew install python # Python language brew install nginx # High performance load balancer, web server and reverse proxy -brew install mongodb # NoSQL document based database brew install node # Server-side JavaScript -brew install phantomjs # Headless browser brew install hub # GitHub CLI # Applications @@ -72,10 +68,7 @@ brew cask install firefox # Firefox browser brew cask install visual-studio-code # VS Code text editor brew cask install slack # IM team chat application brew cask install spotify # Music subsciption service/player -brew cask install dropbox # Cloud file storage brew cask install postman # API request compose/debugger -brew cask install filezilla # FTP Client -brew cask install disk-inventory-x # Harddrive disk space analysis brew cask install spectacle # Keyboard shortcuts for window sizing brew cask install vanilla # Hide menu bar icons brew cask install licecap # GIF screen capture From 57e8ebbaffec54d2e25d532d52764b91b8549144 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 24 Feb 2019 10:12:06 -0500 Subject: [PATCH 097/141] Remove old GPG key, as it should never have been here in the first place. --- .gitconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index d635e11671c..50886b47ee3 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,7 +1,6 @@ [user] name = Igor Barsi email = ibarsi92@gmail.com - signingKey = 2EEF83EC3F50C9158011DDD4276481F1B67133A4 [alias] From 88ea8e055052f3f7d62f8690d3fe5eb888d4b4ff Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 24 Feb 2019 10:14:57 -0500 Subject: [PATCH 098/141] Add new streamlined initialization script. Clean up README to reflect new script changes. --- README.md | 23 ++++++------------- init.sh | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 16 deletions(-) create mode 100644 init.sh diff --git a/README.md b/README.md index 88fbb7e2d0f..11e2b2bed53 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,11 @@ -# Igor's dotfiles +# Igor's `dotfiles` -Forked from Mathias Bynens' excellent repo! - -https://github.com/mathiasbynens/dotfiles.git +Forked from [Mathias Bynens' excellent repo](https://github.com/mathiasbynens/dotfiles.git)! ## Steps to Configure (OSX) Environment -1. Install Xcode -2. Install Homebrew. -3. `source brew.sh` -4. `source pip.sh` -5. `source bootstrap.sh` -6. `source vscode.sh` -7. Manually symlink nested files to their appropriate locations (I'll add these steps to `bootstrap.sh` eventually). -8. Manually install global npm packages listed in `npm-ls.txt` (hopefully, this can be automated at some point). -9. `source .macos` -10. Restart. -11. ???? -12. PROFIT!!! +1. Copy `init.sh` raw from repo and save it somewhere on your local machine. +2. `source init.sh` +3. Manually install global npm packages listed in `npm-ls.txt` (this will be automated at some point). +4. Restart. +5. Party! 🎉 diff --git a/init.sh b/init.sh new file mode 100644 index 00000000000..4c176ee1d87 --- /dev/null +++ b/init.sh @@ -0,0 +1,67 @@ +echo "Installing xcode" +xcode-select --install +sudo xcodebuild -license accept + +echo "Installing Homebrew" +if test ! $(which brew); then +echo "Installing homebrew..." + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +fi + +echo "Installing Git" +brew install git + +echo "Generating SSH key" +ssh-keygen -t rsa -f ~/.ssh/id_rsa +ssh-add +cat ~/.ssh/id_rsa.pub | pbcopy + +echo "Generated SSH public key has been copied. Please add it to Github before proceeding \n" +echo "https://github.com/account/ssh \n" +read -p "Press [Enter] once complete..." + +echo "Setup Dotfiles" +mkdir ~/Projects +git clone git@github.com:ibarsi/dotfiles.git ~/Projects/dotfiles + +echo "Installing Homebrew packages" +source ~/Projects/dotfiles/brew.sh + +echo "Generating GPG key" +gpg --gen-key +gpg --list-secret-keys --keyid-format LONG + +echo "Please copy the long key" +read -p "Press [Enter] once complete..." +pbpaste | gpg --armor --export | pbcopy + +echo "Generated GPG key has been copied. Please add it to Github before proceeding \n" +echo "https://github.com/account/ssh \n" +read -p "Press [Enter] once complete..." + +echo "Installing pip" +curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python + +echo "Installing Python packages" +source ~/Projects/dotfiles/pip.sh + +echo "Boostrapping file system" +cd ~/Projects/dotfiles +source bootstrap.sh +cd - + +echo "Configuring VS Code" +source ~/Projects/dotfiles/vscode.sh" +ln -s /Users/Igor/Projects/dotfiles/.vscode/settings.json /Users/Igor/Library/Application\ Support/Code/User +ln -s /Users/Igor/Projects/dotfiles/.vscode/keybindings.json /Users/Igor/Library/Application\ Support/Code/User +mkdir /Users/Igor/.config +ln -s /Users/Igor/Projects/dotfiles/.config/pep8 /Users/Igor/.config + +echo "Installing NVM" +curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash + +echo "Applying OSX configurations" +source ~/Projects/dotfiles/.macos + +echo "All done! Please restart to apply final changes :)" + From e84f04f57b8f7f2a9f65ddcf53f855d456fb2429 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 24 Feb 2019 11:09:30 -0500 Subject: [PATCH 099/141] Update npmls + npmst aliases to store only the names of globally installed Node modules. Update init script to install all stored Node modules. --- .aliases | 2 +- init.sh | 3 +++ npm-ls.txt | 27 +++++++++++---------------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.aliases b/.aliases index 60801ec5f57..f856e5f733d 100644 --- a/.aliases +++ b/.aliases @@ -141,7 +141,7 @@ alias reload="exec ${SHELL} -l" alias path='echo -e ${PATH//:/\\n}' # List all npm packages installed globally -alias npmls='npm ls -g --depth=0 --silent' +alias npmls='npm ls -g --depth=0 --silent --parseable | xargs basename | grep -v lib' # Store global npm packages in text file alias npmst='npmls > ~/npm-ls.txt' diff --git a/init.sh b/init.sh index 4c176ee1d87..0cf31607005 100644 --- a/init.sh +++ b/init.sh @@ -60,6 +60,9 @@ ln -s /Users/Igor/Projects/dotfiles/.config/pep8 /Users/Igor/.config echo "Installing NVM" curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash +echo "Installing Global Node modules" +cat npm-ls.txt | xargs npm -g i + echo "Applying OSX configurations" source ~/Projects/dotfiles/.macos diff --git a/npm-ls.txt b/npm-ls.txt index 634890b4cb9..1ad86f86d1f 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -1,16 +1,11 @@ -/Users/igorbarsi/.nvm/versions/node/v10.5.0/lib -├── babel-eslint@8.2.2 -├── create-react-app@1.5.2 -├── eslint@4.19.1 -├── eslint-config-prettier@2.9.0 -├── eslint-plugin-prettier@2.6.0 -├── eslint-plugin-react@7.7.0 -├── firebase-tools@4.2.1 -├── grunt@1.0.2 -├── htmlhint@0.9.13 -├── npm@6.3.0 -├── prettier@1.12.1 -├── stylelint@9.1.3 -├── stylelint-config-recommended@2.1.0 -└── yarn@1.5.1 - +babel-eslint +eslint +eslint-config-prettier +eslint-plugin-prettier +eslint-plugin-react +htmlhint +npm +prettier +stylelint +stylelint-config-recommended +yarn From 443f83a4f91085b9595683cb73137766e343390b Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 24 Feb 2019 11:11:06 -0500 Subject: [PATCH 100/141] Remove node from brew install script, since NVM will install it anyways. --- brew.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/brew.sh b/brew.sh index 56a011c376f..3cbee16e0a8 100755 --- a/brew.sh +++ b/brew.sh @@ -58,7 +58,6 @@ brew install git # Source control brew install git-lfs # System for managing large files in source control via Git LFS brew install python # Python language brew install nginx # High performance load balancer, web server and reverse proxy -brew install node # Server-side JavaScript brew install hub # GitHub CLI # Applications From da3f32dcaa575ee1711837680cac1b990ca09699 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 25 Feb 2019 18:59:09 -0500 Subject: [PATCH 101/141] Clean up VS Code extensions. --- vscode.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vscode.sh b/vscode.sh index 2f05070fb9d..8a4772194b9 100755 --- a/vscode.sh +++ b/vscode.sh @@ -17,6 +17,7 @@ code --install-extension ban.spellright code --install-extension bierner.markdown-preview-github-styles code --install-extension wayou.vscode-todo-highlight code --install-extension CoenraadS.bracket-pair-colorizer -code --install-extension yahya-gilany.vscode-terminal-launcher -code --install-extension eg2.tslint +code --install-extension ms-vscode.vscode-typescript-tslint-plugin code --install-extension davidanson.vscode-markdownlint +code --install-extension octref.vetur +code --install-extension wix.vscode-import-cost From c938d32eb5c785734af7707c3ce2c06d241a874d Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 11 Mar 2019 14:41:42 -0400 Subject: [PATCH 102/141] Make init.sh executable. --- init.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 init.sh diff --git a/init.sh b/init.sh old mode 100644 new mode 100755 From e2d1018408aba196405977277c0702d252edc639 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 11 Mar 2019 14:42:10 -0400 Subject: [PATCH 103/141] Clean up VS Code settings. --- .vscode/settings.json | 68 +++++-------------------------------------- 1 file changed, 7 insertions(+), 61 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 496c36a2b58..d50a3ae1bc9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -48,25 +48,6 @@ "extensions.autoUpdate": true, "git.promptToSaveFilesBeforeCommit": true, "search.showLineNumbers": true, - "search.exclude": { - // GENERAL - "**/.git": true, - "**/node_modules": true, - "**/build": true, - "**/dist": true, - // TESTS - "**/coverage": true, - // .NET - "**/bin": true, - "**/obj": true, - "**/packages": true, - // DJANGO - "**/migrations": true, - "**/south_migrations": true, - "**/lib": true, - // JEKYLL - "**/_site": true - }, "typescript.updateImportsOnFileMove.enabled": "always", //-------- Files configuration -------- "files.exclude": { @@ -86,10 +67,11 @@ //-------- ESLint configuration -------- "eslint.enable": true, "eslint.autoFixOnSave": true, + //-------- TSLint configuration -------- + "tslint.alwaysShowRuleFailuresAsWarnings": false, + "tslint.jsEnable": false, //-------- HTMLHint configuration -------- "htmlhint.enable": true, - //-------- StyleLint configuration -------- - "stylelint.enable": false, //-------- Python configuration -------- "python.linting.enabled": true, "python.linting.pylintEnabled": false, @@ -108,7 +90,9 @@ "suppressWelcomeNotice": true }, //-------- SpellRight configuration -------- - "spellright.language": ["en"], + "spellright.language": [ + "en" + ], "spellright.notificationClass": "warning", "spellright.documentTypes": [ "markdown", @@ -142,7 +126,6 @@ "javascript.validate.enable": false, "javascript.updateImportsOnFileMove.enabled": "always", //-------- CSS configuration -------- - // TODO: Noticed problems with these settings and stylelint, consider removing. "css.validate": true, // When using a vendor-specific prefix make sure to also include all other vendor-specific properties "css.lint.compatibleVendorPrefixes": "warning", @@ -181,42 +164,5 @@ // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. "css.lint.idSelector": "ignore", //-------- LESS configuration -------- - // TODO: Noticed problems with these settings and stylelint, consider removing. - "less.validate": false, - // When using a vendor-specific prefix make sure to also include all other vendor-specific properties - "less.lint.compatibleVendorPrefixes": "warning", - // When using a vendor-specific prefix also include the standard property - "less.lint.vendorPrefix": "warning", - // Do not use duplicate style definitions - "less.lint.duplicateProperties": "error", - // Do not use empty rulesets - "less.lint.emptyRules": "error", - // Import statements do not load in parallel - "less.lint.importStatement": "warning", - // Do not use width or height when using padding or border - "less.lint.boxModel": "ignore", - // The universal selector (*) is known to be slow - "less.lint.universalSelector": "ignore", - // No unit for zero needed - "less.lint.zeroUnits": "error", - // @font-face rule must define 'src' and 'font-family' properties - "less.lint.fontFaceProperties": "warning", - // Hex colors must consist of three or six hex numbers - "less.lint.hexColorLength": "error", - // Invalid number of parameters - "less.lint.argumentsInColorFunction": "error", - // Unknown property. - "less.lint.unknownProperties": "error", - // IE hacks are only necessary when supporting IE7 and older - "less.lint.ieHack": "warning", - // Unknown vendor specific property. - "less.lint.unknownVendorSpecificProperties": "warning", - // Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect - "less.lint.propertyIgnoredDueToDisplay": "error", - // Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. - "less.lint.important": "warning", - // Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. - "less.lint.float": "ignore", - // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. - "less.lint.idSelector": "ignore" + "less.validate": true, } From cd86f20c5f6b3ae4dcf4920a90bc0f18793346ad Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 12 Mar 2019 19:31:34 -0400 Subject: [PATCH 104/141] Fix git tab completion and remove extra NVM load. --- .bash_profile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.bash_profile b/.bash_profile index 61aa0e138dc..65072cc8794 100644 --- a/.bash_profile +++ b/.bash_profile @@ -32,10 +32,10 @@ elif [ -f /etc/bash_completion ]; then source /etc/bash_completion; fi; -# Enable tab completion for `g` by marking it as an alias for `git` -if type _git &> /dev/null && [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then - complete -o default -o nospace -F _git g; -fi; +# Add tab completion for git +if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then + source `brew --prefix`/etc/bash_completion.d/git-completion.bash +fi # Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards [ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh; @@ -55,8 +55,3 @@ if [[ $SSH_AUTH_SOCK && $(ssh-add -l | grep "The agent has no identities") ]]; t eval `ssh-agent -s` ssh-add fi - -# Load nvm -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" From 99f00df0e4c7a803694c3cafba9a7a68244b2efa Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 13 Mar 2019 12:47:56 -0400 Subject: [PATCH 105/141] Remove extra "u" character at the start of an auto generated PR. --- .gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index 50886b47ee3..818cc4ea39b 100644 --- a/.gitconfig +++ b/.gitconfig @@ -92,7 +92,7 @@ contrib = shortlog --summary --numbered # Create a PR with branch generated name. - mpr = "!git b | sed 's/-/ /g' | sed 's/.*/\\u&/' | awk '{ print \"\\\"\"$0\"\\\"\"}' | xargs hub pull-request -m | xargs open" + mpr = "!git b | sed 's/-/ /g' | sed 's/.*/&/' | awk '{ print \"\\\"\"$0\"\\\"\"}' | xargs hub pull-request -m | xargs open" # Push current branch to origin and set upstream pub = "!git push -u origin $(git b)" From 11b2905ea26379992665d23cb79e8cc69cacd535 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 19 Mar 2019 08:54:09 -0400 Subject: [PATCH 106/141] Fix NVM and add Clearbanc staging Cloud SQL Proxy command. --- .aliases | 8 +++++--- .bash_profile | 7 +++++++ .bashrc | 7 ------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.aliases b/.aliases index f856e5f733d..55edd82ca48 100644 --- a/.aliases +++ b/.aliases @@ -12,9 +12,6 @@ alias cdd="cd ~/Desktop" alias cdl="cd ~/Downloads" alias cdp="cd ~/Projects" alias cdot="cd ~/Projects/dotfiles" -alias g="git" -alias h="history" -alias j="jobs" # Detect which `ls` flavor is in use if ls --color > /dev/null 2>&1; then # GNU `ls` @@ -151,3 +148,8 @@ alias venv='source ${PWD##*/}/bin/activate' # Fix system time by matching Apple server time. alias fixtime='sudo ntpdate -u time.apple.com' + +# === CLEARBANC === # + +# Connect to staging CloudSQL in the background. +alias cbsql="nohup ~/.clearbanc/cloud_sql_proxy -instances=clearbanc-api-staging:us-central1:staging=tcp:5433 -credential_file=$HOME/.clearbanc/clearbanc-api-staging-3c6b89301c8e.json &>/dev/null &" diff --git a/.bash_profile b/.bash_profile index 65072cc8794..4f45ef80381 100644 --- a/.bash_profile +++ b/.bash_profile @@ -55,3 +55,10 @@ if [[ $SSH_AUTH_SOCK && $(ssh-add -l | grep "The agent has no identities") ]]; t eval `ssh-agent -s` ssh-add fi + +# Load RVM into a shell session *as a function* +[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" + +# Load NVM and enable its bash completion +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" diff --git a/.bashrc b/.bashrc index f037a237188..12570026634 100644 --- a/.bashrc +++ b/.bashrc @@ -1,8 +1 @@ [ -n "$PS1" ] && source ~/.bash_profile; - -# Load RVM into a shell session *as a function* -[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" - -# Load NVM and enable its bash completion -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" From 081817199a64af1a577111a387350ea480395d8f Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 19 Mar 2019 09:09:37 -0400 Subject: [PATCH 107/141] Extend make PR command to accept an optional emoji prefix (#1) --- .gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index 818cc4ea39b..ebdbc980c42 100644 --- a/.gitconfig +++ b/.gitconfig @@ -92,7 +92,7 @@ contrib = shortlog --summary --numbered # Create a PR with branch generated name. - mpr = "!git b | sed 's/-/ /g' | sed 's/.*/&/' | awk '{ print \"\\\"\"$0\"\\\"\"}' | xargs hub pull-request -m | xargs open" + mpr = "!f() { git b | sed 's/-/ /g' | sed 's/.*/&/' | awk '{ print \"\\\"\"$0\"\\\"\"}' | xargs -I{} hub pull-request -m \"$1 {}\" | xargs open; }; f" # Push current branch to origin and set upstream pub = "!git push -u origin $(git b)" From aba2a51ddb73e515d2b514444282d93d1d48b0c7 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 15 May 2019 08:51:38 -0400 Subject: [PATCH 108/141] Add Clearbanc commands, git alias for diffing branch changes and VS Code editor tweaks --- .aliases | 12 +++++++++--- .functions | 10 ++++++++++ .gitconfig | 5 ++++- .vscode/settings.json | 16 +++++++++------- vscode.sh | 2 +- 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/.aliases b/.aliases index 55edd82ca48..816005b9ed6 100644 --- a/.aliases +++ b/.aliases @@ -149,7 +149,13 @@ alias venv='source ${PWD##*/}/bin/activate' # Fix system time by matching Apple server time. alias fixtime='sudo ntpdate -u time.apple.com' -# === CLEARBANC === # +# === CLEARBANC === -# Connect to staging CloudSQL in the background. -alias cbsql="nohup ~/.clearbanc/cloud_sql_proxy -instances=clearbanc-api-staging:us-central1:staging=tcp:5433 -credential_file=$HOME/.clearbanc/clearbanc-api-staging-3c6b89301c8e.json &>/dev/null &" +# Connect to Cloud SQL Proxy. +alias cbsql='nohup ~/.clearbanc/cloud_sql_proxy -instances=clearbanc-api-staging:us-central1:staging=tcp:5433,clearbanc-api-dev:us-east1:dev=tcp:5434,clearbanc-api-production:us-central1:production=tcp:5431 &>/dev/null &' + +# Boot up PubSub emulator. +alias cbpsem='nohup gcloud beta emulators pubsub start &>/dev/null &' + +# Point environment to active PubSub emulator. +alias cbpsenv='$(gcloud beta emulators pubsub env-init)' diff --git a/.functions b/.functions index 8571f71f928..e2e7010fe07 100644 --- a/.functions +++ b/.functions @@ -194,3 +194,13 @@ function getcertnames() { function tre() { tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX; } + +# === CLEARBANC === + +function cbkmsd() { + gcloud kms decrypt --project clearbanc-api-${1} --keyring storage --key storage-key --location global --ciphertext-file ./config/clearbanc-api-${1}/${2}.yaml.encrypted --plaintext-file ${2}.yaml +} + +function cbkmse() { + gcloud kms encrypt --project clearbanc-api-${1} --keyring storage --key storage-key --location global --ciphertext-file ./config/clearbanc-api-${1}/${2}.yaml.encrypted --plaintext-file ${2}.yaml + } diff --git a/.gitconfig b/.gitconfig index ebdbc980c42..c06364289b0 100644 --- a/.gitconfig +++ b/.gitconfig @@ -19,9 +19,12 @@ # Show the diff between the latest commit and the current state d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" - # `git di $number` shows the diff between the state `$number` revisions ago and the current state + # Show the diff between the state `$number` revisions ago and the current state di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" + # Show the diff of all changes in the current branch. + db = !"git diff $(git merge-base master HEAD)" + # Pull in remote changes for the current repository and all its submodules p = !"git pull; git submodule foreach git pull origin master" diff --git a/.vscode/settings.json b/.vscode/settings.json index d50a3ae1bc9..af1ff6d4523 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,12 +5,12 @@ "window.newWindowDimensions": "maximized", "window.nativeTabs": false, "workbench.editor.labelFormat": "short", - "workbench.iconTheme": "vscode-icons", "workbench.editor.revealIfOpen": true, "workbench.startupEditor": "newUntitledFile", "workbench.colorTheme": "Abyss", "workbench.editor.enablePreviewFromQuickOpen": false, "workbench.editor.highlightModifiedTabs": true, + "workbench.iconTheme": "vscode-icons", "editor.tokenColorCustomizations": { "[Abyss]": { "comments": "#225588", @@ -37,9 +37,11 @@ "editor.codeActionsOnSave": { "source.organizeImports": false }, + "editor.gotoLocation.multiple": "goto", "terminal.integrated.confirmOnExit": true, "terminal.integrated.fontFamily": "Fira Code", "terminal.integrated.fontSize": 13, + "terminal.integrated.rendererType": "dom", "explorer.confirmDragAndDrop": false, "files.insertFinalNewline": true, "diffEditor.ignoreTrimWhitespace": false, @@ -55,10 +57,6 @@ "**/*.sublime*": true }, "files.trimTrailingWhitespace": true, - //-------- Icons -------- - "vsicons.dontShowNewVersionMessage": true, - "vsicons.projectDetection.disableDetect": true, - "vsicons.presets.angular": true, //-------- GitLens configuration -------- "gitlens.views.fileHistory.enabled": true, "gitlens.views.lineHistory.enabled": true, @@ -69,7 +67,11 @@ "eslint.autoFixOnSave": true, //-------- TSLint configuration -------- "tslint.alwaysShowRuleFailuresAsWarnings": false, - "tslint.jsEnable": false, + "tslint.jsEnable": true, + //-------- Markdownlint configuration -------- + "markdownlint.config": { + "MD007": false, + }, //-------- HTMLHint configuration -------- "htmlhint.enable": true, //-------- Python configuration -------- @@ -164,5 +166,5 @@ // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. "css.lint.idSelector": "ignore", //-------- LESS configuration -------- - "less.validate": true, + "less.validate": true } diff --git a/vscode.sh b/vscode.sh index 8a4772194b9..2952ae962ae 100755 --- a/vscode.sh +++ b/vscode.sh @@ -14,7 +14,7 @@ code --install-extension eamodio.gitlens code --install-extension EditorConfig.editorconfig code --install-extension esbenp.prettier-vscode code --install-extension ban.spellright -code --install-extension bierner.markdown-preview-github-styles +code --install-extension bierner.github-markdown-preview code --install-extension wayou.vscode-todo-highlight code --install-extension CoenraadS.bracket-pair-colorizer code --install-extension ms-vscode.vscode-typescript-tslint-plugin From 617c40992aa8769815b0851533f5b99de2dba33a Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 21 Jul 2019 16:10:42 -0400 Subject: [PATCH 109/141] Update settings and add gitmoji. --- .path | 1 + .vscode/settings.json | 16 ++++++++++++---- npm-ls.txt | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.path b/.path index 1d38545c17a..97443bf43eb 100644 --- a/.path +++ b/.path @@ -4,4 +4,5 @@ export PATH="/usr/local/sbin:$PATH" # RVM export PATH="$PATH:$HOME/.rvm/bin" +# Yarn export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" diff --git a/.vscode/settings.json b/.vscode/settings.json index af1ff6d4523..fa88f60bad4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -51,6 +51,14 @@ "git.promptToSaveFilesBeforeCommit": true, "search.showLineNumbers": true, "typescript.updateImportsOnFileMove.enabled": "always", + "vsicons.dontShowNewVersionMessage": true, + //-------- Language configuration -------- + "[json]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, //-------- Files configuration -------- "files.exclude": { "**/*.pyc": true, @@ -62,6 +70,8 @@ "gitlens.views.lineHistory.enabled": true, //-------- Prettier configuration -------- "prettier.requireConfig": true, + "prettier.eslintIntegration": true, + "prettier.tslintIntegration": true, //-------- ESLint configuration -------- "eslint.enable": true, "eslint.autoFixOnSave": true, @@ -70,7 +80,7 @@ "tslint.jsEnable": true, //-------- Markdownlint configuration -------- "markdownlint.config": { - "MD007": false, + "MD007": false }, //-------- HTMLHint configuration -------- "htmlhint.enable": true, @@ -92,9 +102,7 @@ "suppressWelcomeNotice": true }, //-------- SpellRight configuration -------- - "spellright.language": [ - "en" - ], + "spellright.language": ["en"], "spellright.notificationClass": "warning", "spellright.documentTypes": [ "markdown", diff --git a/npm-ls.txt b/npm-ls.txt index 1ad86f86d1f..d40fd1dd80b 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -2,7 +2,7 @@ babel-eslint eslint eslint-config-prettier eslint-plugin-prettier -eslint-plugin-react +gitmoji-cli htmlhint npm prettier From cae95800844a87b1210cb1d270bee1d7f840c65c Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 31 Dec 2019 10:03:24 -0500 Subject: [PATCH 110/141] Update things. --- .aliases | 2 +- .functions | 18 +++++++++--------- .gitconfig | 2 +- .vscode/settings.json | 44 +++++++++++++++++++++---------------------- vscode.sh | 5 ++--- 5 files changed, 35 insertions(+), 36 deletions(-) diff --git a/.aliases b/.aliases index 816005b9ed6..bb9747537df 100644 --- a/.aliases +++ b/.aliases @@ -152,7 +152,7 @@ alias fixtime='sudo ntpdate -u time.apple.com' # === CLEARBANC === # Connect to Cloud SQL Proxy. -alias cbsql='nohup ~/.clearbanc/cloud_sql_proxy -instances=clearbanc-api-staging:us-central1:staging=tcp:5433,clearbanc-api-dev:us-east1:dev=tcp:5434,clearbanc-api-production:us-central1:production=tcp:5431 &>/dev/null &' +alias cbsql='nohup ~/.clearbanc/cloud_sql_proxy -instances=clearbanc-api-production:us-central1:production=tcp:5431,clearbanc-api-staging:us-central1:staging-anon=tcp:5433,clearbanc-api-dev:us-east1:dev=tcp:5434,clearbanc-marketing-staging:us-central1:staging=tcp:5435,clearbanc-marketing-production:us-central1:production=tcp:5436,clearbanc-api-production:us-central1:production-replica=tcp:5437 &>/dev/null &' # Boot up PubSub emulator. alias cbpsem='nohup gcloud beta emulators pubsub start &>/dev/null &' diff --git a/.functions b/.functions index e2e7010fe07..254d10d580a 100644 --- a/.functions +++ b/.functions @@ -14,13 +14,6 @@ function killport() lsof -i tcp:$1 | awk 'FNR == 2 {print $2}' | xargs kill -9 } -# Touch and vim a file -function touchgo() -{ - touch $1; - vim $1; -} - # Toggle "focus mode" function focus() { osascript -e 'tell application "System Events" to keystroke "d" using {command down, option down}' @@ -198,9 +191,16 @@ function tre() { # === CLEARBANC === function cbkmsd() { - gcloud kms decrypt --project clearbanc-api-${1} --keyring storage --key storage-key --location global --ciphertext-file ./config/clearbanc-api-${1}/${2}.yaml.encrypted --plaintext-file ${2}.yaml + gcloud kms decrypt --project clearbanc-api-${1} --keyring storage --key storage-key --location global --ciphertext-file ./config/clearbanc-api-${1}/${2}.yaml.encrypted --plaintext-file ${2}.yaml } function cbkmse() { gcloud kms encrypt --project clearbanc-api-${1} --keyring storage --key storage-key --location global --ciphertext-file ./config/clearbanc-api-${1}/${2}.yaml.encrypted --plaintext-file ${2}.yaml - } +} + +function kubectx() { + export PROJECT_ID="clearbanc-api-${1}"; + export CLUSTER_NAME="k8s-${1}-live"; + gcloud config set project $PROJECT_ID; + gcloud container clusters get-credentials $CLUSTER_NAME --zone us-central1; +} diff --git a/.gitconfig b/.gitconfig index c06364289b0..3ec9cdaeaa4 100644 --- a/.gitconfig +++ b/.gitconfig @@ -70,7 +70,7 @@ ureb = "!f() { git rebase upstream/${1:-$(git symbolic-ref --short HEAD)}; }; f" # Interactively rebase changes in current branch - breb = "!git rebase -i `git merge-base master HEAD`" + breb = "!f() { git rebase -i `git merge-base $1 HEAD`; }; f" # Remove the old tag with this name and tag the latest commit with it. retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r" diff --git a/.vscode/settings.json b/.vscode/settings.json index fa88f60bad4..57e8133c8fc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,7 @@ "window.zoomLevel": 0, "window.newWindowDimensions": "maximized", "window.nativeTabs": false, + "window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}", "workbench.editor.labelFormat": "short", "workbench.editor.revealIfOpen": true, "workbench.startupEditor": "newUntitledFile", @@ -11,6 +12,7 @@ "workbench.editor.enablePreviewFromQuickOpen": false, "workbench.editor.highlightModifiedTabs": true, "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, "editor.tokenColorCustomizations": { "[Abyss]": { "comments": "#225588", @@ -25,30 +27,38 @@ "editor.scrollBeyondLastLine": true, "editor.mouseWheelZoom": false, "editor.cursorStyle": "line", - "editor.renderWhitespace": "boundary", - "editor.formatOnSave": true, + "editor.renderWhitespace": "all", "editor.minimap.enabled": false, + "editor.minimap.renderCharacters": false, + "editor.minimap.maxColumn": 200, + "editor.minimap.showSlider": "always", "editor.wordWrap": "off", "editor.fontLigatures": true, "editor.renderControlCharacters": true, - "editor.autoIndent": false, + "editor.autoIndent": "none", "editor.snippetSuggestions": "top", "editor.insertSpaces": true, "editor.codeActionsOnSave": { - "source.organizeImports": false + "source.organizeImports": false, + "source.fixAll.eslint": true }, - "editor.gotoLocation.multiple": "goto", + "editor.formatOnSave": true, + "editor.smoothScrolling": true, + "editor.cursorBlinking": "phase", + "editor.cursorSmoothCaretAnimation": false, "terminal.integrated.confirmOnExit": true, "terminal.integrated.fontFamily": "Fira Code", "terminal.integrated.fontSize": 13, "terminal.integrated.rendererType": "dom", + "telemetry.enableCrashReporter": false, + "telemetry.enableTelemetry": false, "explorer.confirmDragAndDrop": false, "files.insertFinalNewline": true, "diffEditor.ignoreTrimWhitespace": false, "debug.inlineValues": true, "debug.toolBarLocation": "docked", "extensions.autoUpdate": true, - "git.promptToSaveFilesBeforeCommit": true, + "git.promptToSaveFilesBeforeCommit": "staged", "search.showLineNumbers": true, "typescript.updateImportsOnFileMove.enabled": "always", "vsicons.dontShowNewVersionMessage": true, @@ -59,10 +69,12 @@ "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, //-------- Files configuration -------- "files.exclude": { - "**/*.pyc": true, - "**/*.sublime*": true + "**/*.pyc": true }, "files.trimTrailingWhitespace": true, //-------- GitLens configuration -------- @@ -70,11 +82,8 @@ "gitlens.views.lineHistory.enabled": true, //-------- Prettier configuration -------- "prettier.requireConfig": true, - "prettier.eslintIntegration": true, - "prettier.tslintIntegration": true, //-------- ESLint configuration -------- "eslint.enable": true, - "eslint.autoFixOnSave": true, //-------- TSLint configuration -------- "tslint.alwaysShowRuleFailuresAsWarnings": false, "tslint.jsEnable": true, @@ -87,7 +96,6 @@ //-------- Python configuration -------- "python.linting.enabled": true, "python.linting.pylintEnabled": false, - "python.linting.pep8Enabled": true, //-------- GitLens configuration -------- "gitlens.advanced.messages": { "suppressCommitHasNoPreviousCommitWarning": false, @@ -101,16 +109,8 @@ "suppressUpdateNotice": false, "suppressWelcomeNotice": true }, - //-------- SpellRight configuration -------- - "spellright.language": ["en"], - "spellright.notificationClass": "warning", - "spellright.documentTypes": [ - "markdown", - "latex", - "plaintext", - "javascript", - "typescript" - ], + //-------- CodeSpell configuration -------- + "cSpell.allowCompoundWords": true, //-------- HTML configuration -------- "emmet.showSuggestionsAsSnippets": true, // Maximum amount of characters per line (0 = disable). diff --git a/vscode.sh b/vscode.sh index 2952ae962ae..64b50521ec2 100755 --- a/vscode.sh +++ b/vscode.sh @@ -13,11 +13,10 @@ code --install-extension christian-kohler.npm-intellisense code --install-extension eamodio.gitlens code --install-extension EditorConfig.editorconfig code --install-extension esbenp.prettier-vscode -code --install-extension ban.spellright +code --install-extension streetsidesoftware.code-spell-checker code --install-extension bierner.github-markdown-preview code --install-extension wayou.vscode-todo-highlight code --install-extension CoenraadS.bracket-pair-colorizer -code --install-extension ms-vscode.vscode-typescript-tslint-plugin code --install-extension davidanson.vscode-markdownlint -code --install-extension octref.vetur code --install-extension wix.vscode-import-cost +code --install-extension ms-azuretools.vscode-docker From a5385ca924dec69582b16d511a89cfb1fe20ef82 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 10 Aug 2020 11:09:52 -0400 Subject: [PATCH 111/141] Updates --- .aliases | 11 +++++++---- .functions | 23 ++++++++++++----------- .gitconfig | 2 +- .vscode/settings.json | 5 ++++- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.aliases b/.aliases index bb9747537df..f253c300f38 100644 --- a/.aliases +++ b/.aliases @@ -64,9 +64,6 @@ alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[ # Show active network interfaces alias ifactive="ifconfig | pcregrep -M -o '^[^\t:]+:([^\n]|\n\t)*status: active'" -# Flush Directory Service cache -alias flush="dscacheutil -flushcache && killall -HUP mDNSResponder" - # Clean up LaunchServices to remove duplicates in the “Open With” menu alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder" @@ -149,13 +146,19 @@ alias venv='source ${PWD##*/}/bin/activate' # Fix system time by matching Apple server time. alias fixtime='sudo ntpdate -u time.apple.com' +# Clear DNS cache +alias flushdns='sudo killall -HUP mDNSResponder' + # === CLEARBANC === # Connect to Cloud SQL Proxy. -alias cbsql='nohup ~/.clearbanc/cloud_sql_proxy -instances=clearbanc-api-production:us-central1:production=tcp:5431,clearbanc-api-staging:us-central1:staging-anon=tcp:5433,clearbanc-api-dev:us-east1:dev=tcp:5434,clearbanc-marketing-staging:us-central1:staging=tcp:5435,clearbanc-marketing-production:us-central1:production=tcp:5436,clearbanc-api-production:us-central1:production-replica=tcp:5437 &>/dev/null &' +alias cbsql='nohup ~/.clearbanc/cloud_sql_proxy -instances=clearbanc-marketing-staging:us-central1:staging=tcp:5435,clearbanc-marketing-production:us-central1:production=tcp:5436 &>/dev/null &' # Boot up PubSub emulator. alias cbpsem='nohup gcloud beta emulators pubsub start &>/dev/null &' # Point environment to active PubSub emulator. alias cbpsenv='$(gcloud beta emulators pubsub env-init)' + +# Run local docker commands for code repo +alias cb='~/Projects/code/cb' diff --git a/.functions b/.functions index 254d10d580a..b11b4a04e63 100644 --- a/.functions +++ b/.functions @@ -141,11 +141,6 @@ function json() { fi; } -# Run `dig` and display the most useful info -function digga() { - dig +nocmd "$1" any +multiline +noall +answer; -} - # Show all the names (CNs and SANs) listed in the SSL certificate # for a given domain function getcertnames() { @@ -190,17 +185,23 @@ function tre() { # === CLEARBANC === -function cbkmsd() { +function kmsd() { gcloud kms decrypt --project clearbanc-api-${1} --keyring storage --key storage-key --location global --ciphertext-file ./config/clearbanc-api-${1}/${2}.yaml.encrypted --plaintext-file ${2}.yaml } -function cbkmse() { +function kmse() { gcloud kms encrypt --project clearbanc-api-${1} --keyring storage --key storage-key --location global --ciphertext-file ./config/clearbanc-api-${1}/${2}.yaml.encrypted --plaintext-file ${2}.yaml } function kubectx() { - export PROJECT_ID="clearbanc-api-${1}"; - export CLUSTER_NAME="k8s-${1}-live"; - gcloud config set project $PROJECT_ID; - gcloud container clusters get-credentials $CLUSTER_NAME --zone us-central1; + gcloud config set project clearbanc-api-${1}; + gcloud container clusters get-credentials k8s-${1}-live --zone us-central1; +} + +function cbl() { + gcloud builds list --filter "tags='${2}'" --project clearbanc-api-${1}; +} + +function dbssh() { + gcloud compute ssh sql-fwder --project=${1} --zone=us-central1-a -- -N -L ${2}:0.0.0.0:5532 } diff --git a/.gitconfig b/.gitconfig index 3ec9cdaeaa4..bb33e99e97c 100644 --- a/.gitconfig +++ b/.gitconfig @@ -23,7 +23,7 @@ di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" # Show the diff of all changes in the current branch. - db = !"git diff $(git merge-base master HEAD)" + db = !"f() { git diff $(git merge-base $1 HEAD); }; f" # Pull in remote changes for the current repository and all its submodules p = !"git pull; git submodule foreach git pull origin master" diff --git a/.vscode/settings.json b/.vscode/settings.json index 57e8133c8fc..67bf162ca3d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -174,5 +174,8 @@ // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. "css.lint.idSelector": "ignore", //-------- LESS configuration -------- - "less.validate": true + "less.validate": true, + "[jsonc]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + } } From 57eb0fa4ec92b15171f23a8a84c4b72d37808789 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sun, 3 Jan 2021 10:13:42 -0500 Subject: [PATCH 112/141] Slim down setup steps --- .aliases | 4 ++-- .eslintrc | 33 ++++----------------------------- .exports | 3 +++ .gitconfig | 2 +- .gitignore | 14 +++++--------- .htmlhintrc | 22 ---------------------- .path | 3 --- .stylelintrc | 6 ------ .vscode/settings.json | 6 +++--- README.md | 3 +-- brew.sh | 24 +++++++++++------------- init.sh | 12 ++++++------ npm-ls.txt | 7 ------- 13 files changed, 36 insertions(+), 103 deletions(-) delete mode 100644 .htmlhintrc delete mode 100644 .stylelintrc diff --git a/.aliases b/.aliases index f253c300f38..5eee2eb95f6 100644 --- a/.aliases +++ b/.aliases @@ -106,7 +106,7 @@ alias spoton="sudo mdutil -a -i on" # Ring the terminal bell, and put a badge on Terminal.app’s Dock icon # (useful when executing time-consuming commands) -alias badge="tput bel" +alias ding="tput bel" # Intuitive map function # For example, to list all directories that contain a certain file: @@ -152,7 +152,7 @@ alias flushdns='sudo killall -HUP mDNSResponder' # === CLEARBANC === # Connect to Cloud SQL Proxy. -alias cbsql='nohup ~/.clearbanc/cloud_sql_proxy -instances=clearbanc-marketing-staging:us-central1:staging=tcp:5435,clearbanc-marketing-production:us-central1:production=tcp:5436 &>/dev/null &' +alias cbsql='nohup ~/.clearbanc/cloud_sql_proxy -instances=clearbanc-marketing-staging:us-central1:staging=tcp:5435,clearbanc-marketing-production:us-central1:production=tcp:5436,clearbanc-marketing-dev:us-central1:dev=tcp:5437 &>/dev/null &' # Boot up PubSub emulator. alias cbpsem='nohup gcloud beta emulators pubsub start &>/dev/null &' diff --git a/.eslintrc b/.eslintrc index 0959b0d8e63..b5427e4e357 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,42 +1,17 @@ { - "parser": "babel-eslint", - "env": { "browser": true, "node": true, - "amd": true, - "mocha": true, - "jasmine": true, + "jest": true, "es6": true }, - - "plugins": ["react", "prettier"], - + "sourceType": "module", + "plugins": ["prettier"], "extends": [ - "eslint:all", - "plugin:react/recommended", + "eslint:recommended", "prettier", - "prettier/react" ], - - "parserOptions": { - "sourceType": "module" - }, - "rules": { - "one-var": "off", - "no-process-env": "off", - "no-ternary": "off", - "sort-imports": "off", - "sort-keys": "off", - "no-magic-numbers": "off", - - "react/prop-types": "off", - "prettier/prettier": "error" }, - - "settings": { - "compiler": "babel" - } } diff --git a/.exports b/.exports index 242809ec5d4..ea8c5409e79 100644 --- a/.exports +++ b/.exports @@ -30,3 +30,6 @@ export GPG_TTY=$(tty); # NVM export NVM_DIR="$HOME/.nvm" + +# Hide MacOS message saying the default shell is now zsh +export BASH_SILENCE_DEPRECATION_WARNING=1 diff --git a/.gitconfig b/.gitconfig index bb33e99e97c..b59d3eedcb1 100644 --- a/.gitconfig +++ b/.gitconfig @@ -69,7 +69,7 @@ # Fetch and rebase current branch with upstream's master ureb = "!f() { git rebase upstream/${1:-$(git symbolic-ref --short HEAD)}; }; f" - # Interactively rebase changes in current branch + # Interactively rebase changes in current branch against another branch used as the base breb = "!f() { git rebase -i `git merge-base $1 HEAD`; }; f" # Remove the old tag with this name and tag the latest commit with it. diff --git a/.gitignore b/.gitignore index 9cfe0e16e07..2d7f02d6efa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,19 @@ # Git **/.git -# Static files +# Node **/node_modules -**/bower_components +**/npm-debug.log* # Python **/*.pyc -**/*.sqlite3 - -# Node -**/npm-debug.log* # ESLint .eslintcache # Istanbul -/coverage -/.nyc_output +**/coverage +**/.nyc_output # Folder view configuration files **/.DS_Store @@ -26,7 +22,7 @@ # Thumbnail cache files **/._* **/Thumbs.db - + # Files that might appear on external disks **/.Spotlight-V100 **/.Trashes diff --git a/.htmlhintrc b/.htmlhintrc deleted file mode 100644 index 031bbdd3ff5..00000000000 --- a/.htmlhintrc +++ /dev/null @@ -1,22 +0,0 @@ -{ - "tagname-lowercase": true, - "attr-lowercase": true, - "attr-value-double-quotes": true, - "attr-value-not-empty": false, - "attr-no-duplication": true, - "doctype-first": false, - "tag-pair": true, - "tag-self-close": true, - "spec-char-escape": true, - "id-unique": true, - "src-not-empty": false, - "head-script-disabled": false, - "alt-require": true, - "doctype-html5": true, - "id-class-value": true, - "style-disabled": true, - "space-tab-mixed-disabled": true, - "id-class-ad-disabled": true, - "href-abs-or-rel": false, - "attr-unsafe-chars": true -} diff --git a/.path b/.path index 97443bf43eb..b675c7d40aa 100644 --- a/.path +++ b/.path @@ -3,6 +3,3 @@ export PATH="/usr/local/sbin:$PATH" # RVM export PATH="$PATH:$HOME/.rvm/bin" - -# Yarn -export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" diff --git a/.stylelintrc b/.stylelintrc deleted file mode 100644 index d60d2a3f528..00000000000 --- a/.stylelintrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "stylelint-config-recommended", - "rules": { - "indentation": 2 - } -} diff --git a/.vscode/settings.json b/.vscode/settings.json index 67bf162ca3d..fbe03a6c5e4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,8 +11,8 @@ "workbench.colorTheme": "Abyss", "workbench.editor.enablePreviewFromQuickOpen": false, "workbench.editor.highlightModifiedTabs": true, - "workbench.iconTheme": "vscode-icons", "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.iconTheme": "vscode-icons", "editor.tokenColorCustomizations": { "[Abyss]": { "comments": "#225588", @@ -82,8 +82,6 @@ "gitlens.views.lineHistory.enabled": true, //-------- Prettier configuration -------- "prettier.requireConfig": true, - //-------- ESLint configuration -------- - "eslint.enable": true, //-------- TSLint configuration -------- "tslint.alwaysShowRuleFailuresAsWarnings": false, "tslint.jsEnable": true, @@ -96,6 +94,8 @@ //-------- Python configuration -------- "python.linting.enabled": true, "python.linting.pylintEnabled": false, + //-------- Go configuration -------- + "go.formatTool": "goimports", //-------- GitLens configuration -------- "gitlens.advanced.messages": { "suppressCommitHasNoPreviousCommitWarning": false, diff --git a/README.md b/README.md index 11e2b2bed53..9e250e955dc 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,5 @@ Forked from [Mathias Bynens' excellent repo](https://github.com/mathiasbynens/do 1. Copy `init.sh` raw from repo and save it somewhere on your local machine. 2. `source init.sh` -3. Manually install global npm packages listed in `npm-ls.txt` (this will be automated at some point). -4. Restart. +4. Follow all command prompts throughout script execution. 5. Party! 🎉 diff --git a/brew.sh b/brew.sh index 3cbee16e0a8..917acb0a081 100755 --- a/brew.sh +++ b/brew.sh @@ -54,24 +54,22 @@ brew tap caskroom/fonts brew cask install font-fira-code # Fira (Ligatures) # Development -brew install git # Source control brew install git-lfs # System for managing large files in source control via Git LFS -brew install python # Python language brew install nginx # High performance load balancer, web server and reverse proxy brew install hub # GitHub CLI # Applications -brew cask install iterm2 # Improved Mac Terminal -brew cask install google-chrome # Chrome browser -brew cask install firefox # Firefox browser -brew cask install visual-studio-code # VS Code text editor -brew cask install slack # IM team chat application -brew cask install spotify # Music subsciption service/player -brew cask install postman # API request compose/debugger -brew cask install spectacle # Keyboard shortcuts for window sizing -brew cask install vanilla # Hide menu bar icons -brew cask install licecap # GIF screen capture -brew cask install caprine # Facebook Messenger desktop application +brew install --cask iterm2 \ # Improved Mac Terminal + brave-browser / # Brave browser + google-chrome / # Chrome browser + firefox / # Firefox browser + visual-studio-code / # VS Code text editor + slack / # IM team chat application + spotify / # Music subsciption service/player + postman / # API request compose/debugger + spectacle / # Keyboard shortcuts for window sizing + vanilla / # Hide menu bar icons + licecap # GIF screen capture # Remove outdated versions from the cellar. brew cleanup diff --git a/init.sh b/init.sh index 0cf31607005..c8aed9febba 100755 --- a/init.sh +++ b/init.sh @@ -52,13 +52,13 @@ cd - echo "Configuring VS Code" source ~/Projects/dotfiles/vscode.sh" -ln -s /Users/Igor/Projects/dotfiles/.vscode/settings.json /Users/Igor/Library/Application\ Support/Code/User -ln -s /Users/Igor/Projects/dotfiles/.vscode/keybindings.json /Users/Igor/Library/Application\ Support/Code/User -mkdir /Users/Igor/.config -ln -s /Users/Igor/Projects/dotfiles/.config/pep8 /Users/Igor/.config +ln -s ~/Projects/dotfiles/.vscode/settings.json ~/Library/Application\ Support/Code/User +ln -s ~/Projects/dotfiles/.vscode/keybindings.json ~/Library/Application\ Support/Code/User +mkdir ~/.config +ln -s ~/Projects/dotfiles/.config/pep8 ~/.config echo "Installing NVM" -curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash echo "Installing Global Node modules" cat npm-ls.txt | xargs npm -g i @@ -66,5 +66,5 @@ cat npm-ls.txt | xargs npm -g i echo "Applying OSX configurations" source ~/Projects/dotfiles/.macos -echo "All done! Please restart to apply final changes :)" +echo "All done! Please restart to apply final changes 💃" diff --git a/npm-ls.txt b/npm-ls.txt index d40fd1dd80b..079c6583b0a 100644 --- a/npm-ls.txt +++ b/npm-ls.txt @@ -1,11 +1,4 @@ -babel-eslint eslint eslint-config-prettier eslint-plugin-prettier -gitmoji-cli -htmlhint -npm prettier -stylelint -stylelint-config-recommended -yarn From 062b23ae01e37f08dbca2e27dcd8e85817fd23d9 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 20 Jul 2021 10:32:21 -0400 Subject: [PATCH 113/141] Last commit on Clearbanc machine --- .functions | 8 +++++--- .gitconfig | 3 +++ .vscode/settings.json | 18 ++++-------------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/.functions b/.functions index b11b4a04e63..aa08bb7c7f4 100644 --- a/.functions +++ b/.functions @@ -117,9 +117,7 @@ function dataurl() { function server() { local port="${1:-8000}"; sleep 1 && open "http://localhost:${port}/" & - # Set the default Content-Type to `text/plain` instead of `application/octet-stream` - # And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files) - 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"; + python -m http.server $port } # Compare original and gzipped file size @@ -183,6 +181,10 @@ function tre() { tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX; } +function loc() { + find $2 -name $1 | xargs wc -l | sort -nr +} + # === CLEARBANC === function kmsd() { diff --git a/.gitconfig b/.gitconfig index b59d3eedcb1..c48ab5394f7 100644 --- a/.gitconfig +++ b/.gitconfig @@ -13,6 +13,9 @@ # View abbreviated SHA, description, and history graph of the latest 20 commits l = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' + # View abbreviated SHAs between two branches, excluding cherry picks + lcp = l --no-merges --cherry-pick --right-only + # View the current working tree status using the short format s = status -s diff --git a/.vscode/settings.json b/.vscode/settings.json index fbe03a6c5e4..8331bab9fc2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,5 @@ // Place your settings in this file to overwrite the default settings { - //-------- Editor configuration -------- - "window.zoomLevel": 0, "window.newWindowDimensions": "maximized", "window.nativeTabs": false, "window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}", @@ -12,7 +10,7 @@ "workbench.editor.enablePreviewFromQuickOpen": false, "workbench.editor.highlightModifiedTabs": true, "workbench.settings.enableNaturalLanguageSearch": false, - "workbench.iconTheme": "vscode-icons", + "workbench.iconTheme": "material-icon-theme", "editor.tokenColorCustomizations": { "[Abyss]": { "comments": "#225588", @@ -49,7 +47,6 @@ "terminal.integrated.confirmOnExit": true, "terminal.integrated.fontFamily": "Fira Code", "terminal.integrated.fontSize": 13, - "terminal.integrated.rendererType": "dom", "telemetry.enableCrashReporter": false, "telemetry.enableTelemetry": false, "explorer.confirmDragAndDrop": false, @@ -77,14 +74,8 @@ "**/*.pyc": true }, "files.trimTrailingWhitespace": true, - //-------- GitLens configuration -------- - "gitlens.views.fileHistory.enabled": true, - "gitlens.views.lineHistory.enabled": true, //-------- Prettier configuration -------- "prettier.requireConfig": true, - //-------- TSLint configuration -------- - "tslint.alwaysShowRuleFailuresAsWarnings": false, - "tslint.jsEnable": true, //-------- Markdownlint configuration -------- "markdownlint.config": { "MD007": false @@ -96,6 +87,9 @@ "python.linting.pylintEnabled": false, //-------- Go configuration -------- "go.formatTool": "goimports", + "go.toolsManagement.autoUpdate": true, + //-------- Vue configuration -------- + "vetur.useWorkspaceDependencies": true, //-------- GitLens configuration -------- "gitlens.advanced.messages": { "suppressCommitHasNoPreviousCommitWarning": false, @@ -104,10 +98,6 @@ "suppressGitVersionWarning": false, "suppressLineUncommittedWarning": false, "suppressNoRepositoryWarning": false, - "suppressResultsExplorerNotice": false, - "suppressShowKeyBindingsNotice": true, - "suppressUpdateNotice": false, - "suppressWelcomeNotice": true }, //-------- CodeSpell configuration -------- "cSpell.allowCompoundWords": true, From 050cced68f7e35c3c21d8312cf521e903f429a1e Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 19 Aug 2021 10:00:26 -0400 Subject: [PATCH 114/141] Fixed script bugs after new machine setup --- .config/pep8 | 3 --- brew.sh | 10 ++++++---- init.sh | 18 +++++------------- pip.sh | 10 ---------- vscode.sh | 1 - 5 files changed, 11 insertions(+), 31 deletions(-) delete mode 100644 .config/pep8 delete mode 100755 pip.sh diff --git a/.config/pep8 b/.config/pep8 deleted file mode 100644 index 45e6b2f2b96..00000000000 --- a/.config/pep8 +++ /dev/null @@ -1,3 +0,0 @@ -[pep8] -ignore=E128 -max-line-length = 300 diff --git a/brew.sh b/brew.sh index 917acb0a081..ac6983a18c6 100755 --- a/brew.sh +++ b/brew.sh @@ -50,13 +50,16 @@ brew install tree # View tree list of folder/file structur brew install gnupg gnupg2 # Encrypt and sign data/communication via GnuPG # Fonts -brew tap caskroom/fonts -brew cask install font-fira-code # Fira (Ligatures) +brew tap homebrew/cask-fonts +brew install --cask font-fira-code # Fira (Ligatures) # Development brew install git-lfs # System for managing large files in source control via Git LFS +git lfs install + brew install nginx # High performance load balancer, web server and reverse proxy brew install hub # GitHub CLI +brew install --cask docker # Docker # Applications brew install --cask iterm2 \ # Improved Mac Terminal @@ -68,8 +71,7 @@ brew install --cask iterm2 \ # Improved Mac Terminal spotify / # Music subsciption service/player postman / # API request compose/debugger spectacle / # Keyboard shortcuts for window sizing - vanilla / # Hide menu bar icons - licecap # GIF screen capture + licecap # GIF screen capture # Remove outdated versions from the cellar. brew cleanup diff --git a/init.sh b/init.sh index c8aed9febba..8bd9d7c8681 100755 --- a/init.sh +++ b/init.sh @@ -1,11 +1,12 @@ +#!/bin/bash + echo "Installing xcode" xcode-select --install -sudo xcodebuild -license accept echo "Installing Homebrew" if test ! $(which brew); then echo "Installing homebrew..." - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi echo "Installing Git" @@ -39,26 +40,18 @@ echo "Generated GPG key has been copied. Please add it to Github before proceedi echo "https://github.com/account/ssh \n" read -p "Press [Enter] once complete..." -echo "Installing pip" -curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python - -echo "Installing Python packages" -source ~/Projects/dotfiles/pip.sh - echo "Boostrapping file system" cd ~/Projects/dotfiles source bootstrap.sh cd - echo "Configuring VS Code" -source ~/Projects/dotfiles/vscode.sh" +$HOME/Projects/dotfiles/vscode.sh ln -s ~/Projects/dotfiles/.vscode/settings.json ~/Library/Application\ Support/Code/User ln -s ~/Projects/dotfiles/.vscode/keybindings.json ~/Library/Application\ Support/Code/User -mkdir ~/.config -ln -s ~/Projects/dotfiles/.config/pep8 ~/.config echo "Installing NVM" -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash echo "Installing Global Node modules" cat npm-ls.txt | xargs npm -g i @@ -67,4 +60,3 @@ echo "Applying OSX configurations" source ~/Projects/dotfiles/.macos echo "All done! Please restart to apply final changes 💃" - diff --git a/pip.sh b/pip.sh deleted file mode 100755 index e3b6467f956..00000000000 --- a/pip.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -# Install pip packages. - -# Make sure we’re using the latest pip. -pip install --upgrade pip - -sudo pip install virtualenv # Python virtual environments -sudo pip install pep8 # Python Linter -sudo pip install pygments # Syntax highlighter diff --git a/vscode.sh b/vscode.sh index 64b50521ec2..b34f7b089cf 100755 --- a/vscode.sh +++ b/vscode.sh @@ -3,7 +3,6 @@ # Install VS Code Extensions. code --install-extension dbaeumer.vscode-eslint -code --install-extension ms-python.python code --install-extension mkaufman.HTMLHint code --install-extension robertohuertasm.vscode-icons code --install-extension shinnn.stylelint From 3adb8aca660bbc8c4de094e180cb329841dcbebb Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 19 Aug 2021 11:01:21 -0400 Subject: [PATCH 115/141] Remove hub in favour of gh --- .bash_profile | 3 --- .gitconfig | 3 --- brew.sh | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.bash_profile b/.bash_profile index 4f45ef80381..38b3e213284 100644 --- a/.bash_profile +++ b/.bash_profile @@ -47,9 +47,6 @@ complete -W "NSGlobalDomain" defaults; # Add `killall` tab completion for common apps complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall; -# Add hub commands to git -eval "$(hub alias -s)" - # Start ssh agent and add all relevant keys if no keys are currently available. if [[ $SSH_AUTH_SOCK && $(ssh-add -l | grep "The agent has no identities") ]]; then eval `ssh-agent -s` diff --git a/.gitconfig b/.gitconfig index c48ab5394f7..62fb3d70cb3 100644 --- a/.gitconfig +++ b/.gitconfig @@ -97,9 +97,6 @@ # List contributors with number of commits contrib = shortlog --summary --numbered - # Create a PR with branch generated name. - mpr = "!f() { git b | sed 's/-/ /g' | sed 's/.*/&/' | awk '{ print \"\\\"\"$0\"\\\"\"}' | xargs -I{} hub pull-request -m \"$1 {}\" | xargs open; }; f" - # Push current branch to origin and set upstream pub = "!git push -u origin $(git b)" diff --git a/brew.sh b/brew.sh index ac6983a18c6..e66dfe89182 100755 --- a/brew.sh +++ b/brew.sh @@ -58,7 +58,7 @@ brew install git-lfs # System for managing large files in sou git lfs install brew install nginx # High performance load balancer, web server and reverse proxy -brew install hub # GitHub CLI +brew install gh # GitHub CLI brew install --cask docker # Docker # Applications From 8f0cca5133df1acd8d51e9dd3ab4c44f592a84e3 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 19 Aug 2021 15:24:24 -0400 Subject: [PATCH 116/141] Add Signal to list of apps to install --- brew.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brew.sh b/brew.sh index e66dfe89182..87da5073a83 100755 --- a/brew.sh +++ b/brew.sh @@ -71,7 +71,8 @@ brew install --cask iterm2 \ # Improved Mac Terminal spotify / # Music subsciption service/player postman / # API request compose/debugger spectacle / # Keyboard shortcuts for window sizing - licecap # GIF screen capture + licecap / # GIF screen capture + signal # Private messenger # Remove outdated versions from the cellar. brew cleanup From 7b45034bf8d0ddf7347a52c9a2f6e35f482bfc64 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 19 Aug 2021 15:36:13 -0400 Subject: [PATCH 117/141] Add commitizen to list of brew installs --- brew.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brew.sh b/brew.sh index 87da5073a83..b1926c2f072 100755 --- a/brew.sh +++ b/brew.sh @@ -59,7 +59,8 @@ git lfs install brew install nginx # High performance load balancer, web server and reverse proxy brew install gh # GitHub CLI -brew install --cask docker # Docker +brew install --cask docker / # Docker + commitizen # Standardized commit messages # Applications brew install --cask iterm2 \ # Improved Mac Terminal From 8a946786a55512e39531e23c9e79152dac688ee5 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 20 Aug 2021 08:02:35 -0400 Subject: [PATCH 118/141] Update README to reflect that you need to execute init.sh in a new shell --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9e250e955dc..bf71f507c74 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ Forked from [Mathias Bynens' excellent repo](https://github.com/mathiasbynens/do ## Steps to Configure (OSX) Environment -1. Copy `init.sh` raw from repo and save it somewhere on your local machine. -2. `source init.sh` -4. Follow all command prompts throughout script execution. -5. Party! 🎉 +1. Copy `init.sh` raw from this repo and save it somewhere on your local machine +2. Add permission to execute the file via `chmod +x init.sh` +3. Execute the file via `./init.sh` +4. Follow all command prompts throughout script execution +5. Party! 🎉 From 9fe5e6962f06ff80432d001ebafed95e85a4d69a Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Sat, 4 Sep 2021 09:36:28 -0400 Subject: [PATCH 119/141] Refresh VS Code extensions --- .aliases | 1 - .functions | 11 ++++------- .vscode/settings.json | 7 ++++++- vscode.sh | 23 ++++++++++++----------- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.aliases b/.aliases index 5eee2eb95f6..1b8e5655b8b 100644 --- a/.aliases +++ b/.aliases @@ -11,7 +11,6 @@ alias -- -="cd -" alias cdd="cd ~/Desktop" alias cdl="cd ~/Downloads" alias cdp="cd ~/Projects" -alias cdot="cd ~/Projects/dotfiles" # Detect which `ls` flavor is in use if ls --color > /dev/null 2>&1; then # GNU `ls` diff --git a/.functions b/.functions index aa08bb7c7f4..26671f97e6f 100644 --- a/.functions +++ b/.functions @@ -1,12 +1,5 @@ #!/usr/bin/env bash -# Randomize desktop background image -function drand() { - path="${HOME}/Projects/desktop-randomizer" - source "${path}/desktop-randomizer/bin/activate"; - python "${path}/main.py" - deactivate; -} # Kill process by port function killport() @@ -185,6 +178,10 @@ function loc() { find $2 -name $1 | xargs wc -l | sort -nr } +function mhttp() { + while true; do echo "Hello, World!" | nc -l $1; done +} + # === CLEARBANC === function kmsd() { diff --git a/.vscode/settings.json b/.vscode/settings.json index 8331bab9fc2..fcb12698644 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,6 +11,7 @@ "workbench.editor.highlightModifiedTabs": true, "workbench.settings.enableNaturalLanguageSearch": false, "workbench.iconTheme": "material-icon-theme", + "editor.bracketPairColorization.enabled": true, "editor.tokenColorCustomizations": { "[Abyss]": { "comments": "#225588", @@ -97,7 +98,7 @@ "suppressFileNotUnderSourceControlWarning": false, "suppressGitVersionWarning": false, "suppressLineUncommittedWarning": false, - "suppressNoRepositoryWarning": false, + "suppressNoRepositoryWarning": false }, //-------- CodeSpell configuration -------- "cSpell.allowCompoundWords": true, @@ -167,5 +168,9 @@ "less.validate": true, "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "vs-kubernetes": { + "vscode-kubernetes.helm-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/helm/darwin-amd64/helm", + "vscode-kubernetes.minikube-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/minikube/darwin-amd64/minikube" } } diff --git a/vscode.sh b/vscode.sh index b34f7b089cf..e33a03d4aef 100755 --- a/vscode.sh +++ b/vscode.sh @@ -2,20 +2,21 @@ # Install VS Code Extensions. +code --install-extension streetsidesoftware.code-spell-checker +code --install-extension ms-azuretools.vscode-docker +code --install-extension oouo-diogo-perdigao.docthis +code --install-extension EditorConfig.editorconfig code --install-extension dbaeumer.vscode-eslint +code --install-extension bierner.github-markdown-preview +code --install-extension eamodio.gitlens code --install-extension mkaufman.HTMLHint -code --install-extension robertohuertasm.vscode-icons -code --install-extension shinnn.stylelint -code --install-extension joelday.docthis +code --install-extension ms-kubernetes-tools.vscode-kubernetes-tools +code --install-extension davidanson.vscode-markdownlint +code --install-extension pkief.material-icon-theme code --install-extension eg2.vscode-npm-script code --install-extension christian-kohler.npm-intellisense -code --install-extension eamodio.gitlens -code --install-extension EditorConfig.editorconfig code --install-extension esbenp.prettier-vscode -code --install-extension streetsidesoftware.code-spell-checker -code --install-extension bierner.github-markdown-preview +code --install-extension ms-python.python +code --install-extension ms-vscode-remote.remote-containers code --install-extension wayou.vscode-todo-highlight -code --install-extension CoenraadS.bracket-pair-colorizer -code --install-extension davidanson.vscode-markdownlint -code --install-extension wix.vscode-import-cost -code --install-extension ms-azuretools.vscode-docker +code --install-extension redhat.vscode-yaml From 65fc3fb85876b7d7cd48ce03b999928c49566243 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 30 Dec 2021 09:50:29 -0500 Subject: [PATCH 120/141] Add changes from HomeX computer --- .functions | 10 ---------- .gitconfig | 2 ++ .vscode/settings.json | 6 ++++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.functions b/.functions index 26671f97e6f..a592b287add 100644 --- a/.functions +++ b/.functions @@ -122,16 +122,6 @@ function gz() { printf "gzip: %d bytes (%2.2f%%)\n" "$gzipsize" "$ratio"; } -# Syntax-highlight JSON strings or files -# Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json` -function json() { - if [ -t 0 ]; then # argument - python -mjson.tool <<< "$*" | pygmentize -l javascript; - else # pipe - python -mjson.tool | pygmentize -l javascript; - fi; -} - # Show all the names (CNs and SANs) listed in the SSL certificate # for a given domain function getcertnames() { diff --git a/.gitconfig b/.gitconfig index 62fb3d70cb3..32e41bd2800 100644 --- a/.gitconfig +++ b/.gitconfig @@ -213,3 +213,5 @@ clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f required = true +[init] + defaultBranch = main diff --git a/.vscode/settings.json b/.vscode/settings.json index fcb12698644..fd483f884c1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,6 +12,7 @@ "workbench.settings.enableNaturalLanguageSearch": false, "workbench.iconTheme": "material-icon-theme", "editor.bracketPairColorization.enabled": true, + "editor.guides.bracketPairs": true, "editor.tokenColorCustomizations": { "[Abyss]": { "comments": "#225588", @@ -68,7 +69,7 @@ "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "vscode.typescript-language-features" }, //-------- Files configuration -------- "files.exclude": { @@ -172,5 +173,6 @@ "vs-kubernetes": { "vscode-kubernetes.helm-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/helm/darwin-amd64/helm", "vscode-kubernetes.minikube-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/minikube/darwin-amd64/minikube" - } + }, + "redhat.telemetry.enabled": false } From ead9349707f9898e4a0052c735271752c3fc5ee3 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 30 Dec 2021 12:59:23 -0500 Subject: [PATCH 121/141] Fix install issues on new machine --- .path | 3 +++ brew.sh | 31 ++++++++++++++----------------- init.sh | 7 +++++++ 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.path b/.path index b675c7d40aa..ad8f7ff94ee 100644 --- a/.path +++ b/.path @@ -1,3 +1,6 @@ +# Homebrew (all shells) +eval "$(/opt/homebrew/bin/brew shellenv)" + # Homebrew's sbin (`brew doctor` suggestion) export PATH="/usr/local/sbin:$PATH" diff --git a/brew.sh b/brew.sh index b1926c2f072..e8a573faad7 100755 --- a/brew.sh +++ b/brew.sh @@ -25,7 +25,7 @@ brew install gnu-sed # Note: don’t forget to add `/usr/local/bin/bash` to `/etc/shells` before # running `chsh`. brew install bash -brew install bash-completion2 +brew install bash-completion # Switch to using brew-installed bash as default shell if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then @@ -44,8 +44,6 @@ brew install openssh # Install other useful binaries. brew install ack # Beyond `grep` brew install speedtest_cli # Test your internet connection speed -brew install ssh-copy-id # Add ssh identity to remote host for easy login -brew install testssl # Test ssl configuration strength brew install tree # View tree list of folder/file structures brew install gnupg gnupg2 # Encrypt and sign data/communication via GnuPG @@ -59,22 +57,21 @@ git lfs install brew install nginx # High performance load balancer, web server and reverse proxy brew install gh # GitHub CLI -brew install --cask docker / # Docker - commitizen # Standardized commit messages +brew commitizen # Standardized commit messages +brew install --cask docker # Docker # Applications -brew install --cask iterm2 \ # Improved Mac Terminal - brave-browser / # Brave browser - google-chrome / # Chrome browser - firefox / # Firefox browser - visual-studio-code / # VS Code text editor - slack / # IM team chat application - spotify / # Music subsciption service/player - postman / # API request compose/debugger - spectacle / # Keyboard shortcuts for window sizing - licecap / # GIF screen capture - signal # Private messenger +brew install --cask iterm2 \ + brave-browser \ + google-chrome \ + firefox \ + visual-studio-code \ + slack \ + spotify \ + postman \ + spectacle \ + licecap \ + signal # Remove outdated versions from the cellar. brew cleanup -brew cask cleanup diff --git a/init.sh b/init.sh index 8bd9d7c8681..bec615e918f 100755 --- a/init.sh +++ b/init.sh @@ -1,5 +1,9 @@ #!/bin/bash +echo "Set default shell to bash" +chsh -s /bin/bash +exec bash + echo "Installing xcode" xcode-select --install @@ -7,6 +11,8 @@ echo "Installing Homebrew" if test ! $(which brew); then echo "Installing homebrew..." /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/igorbarsi/.zprofile + eval "$(/opt/homebrew/bin/brew shellenv)" fi echo "Installing Git" @@ -14,6 +20,7 @@ brew install git echo "Generating SSH key" ssh-keygen -t rsa -f ~/.ssh/id_rsa +eval "$(ssh-agent -s)" ssh-add cat ~/.ssh/id_rsa.pub | pbcopy From 51fb769fa565819fd9aab58563c7eb1d3c27243e Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 31 Dec 2021 09:59:16 -0500 Subject: [PATCH 122/141] Fix deprecated VS Code settings --- .vscode/settings.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index fd483f884c1..84054110266 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -46,11 +46,10 @@ "editor.smoothScrolling": true, "editor.cursorBlinking": "phase", "editor.cursorSmoothCaretAnimation": false, - "terminal.integrated.confirmOnExit": true, + "terminal.integrated.confirmOnExit": "hasChildProcesses", "terminal.integrated.fontFamily": "Fira Code", "terminal.integrated.fontSize": 13, - "telemetry.enableCrashReporter": false, - "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", "explorer.confirmDragAndDrop": false, "files.insertFinalNewline": true, "diffEditor.ignoreTrimWhitespace": false, From d025a3c62e91cb0ce7178956469ace0bedd74922 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 27 Jan 2022 10:17:25 -0500 Subject: [PATCH 123/141] Random changes after setting up new machine --- .aliases | 15 ++------------- .bash_profile | 8 +++++--- .exports | 3 --- .functions | 1 - .gitconfig | 1 + .vscode/settings.json | 8 +++++++- init.sh | 2 +- 7 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.aliases b/.aliases index 1b8e5655b8b..f7190fc9962 100644 --- a/.aliases +++ b/.aliases @@ -148,16 +148,5 @@ alias fixtime='sudo ntpdate -u time.apple.com' # Clear DNS cache alias flushdns='sudo killall -HUP mDNSResponder' -# === CLEARBANC === - -# Connect to Cloud SQL Proxy. -alias cbsql='nohup ~/.clearbanc/cloud_sql_proxy -instances=clearbanc-marketing-staging:us-central1:staging=tcp:5435,clearbanc-marketing-production:us-central1:production=tcp:5436,clearbanc-marketing-dev:us-central1:dev=tcp:5437 &>/dev/null &' - -# Boot up PubSub emulator. -alias cbpsem='nohup gcloud beta emulators pubsub start &>/dev/null &' - -# Point environment to active PubSub emulator. -alias cbpsenv='$(gcloud beta emulators pubsub env-init)' - -# Run local docker commands for code repo -alias cb='~/Projects/code/cb' +# Gitmoji +alias gm='gitmoji' diff --git a/.bash_profile b/.bash_profile index 38b3e213284..27e85166adc 100644 --- a/.bash_profile +++ b/.bash_profile @@ -56,6 +56,8 @@ fi # Load RVM into a shell session *as a function* [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" -# Load NVM and enable its bash completion -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" + # Load NVM and enable its bash completion + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + diff --git a/.exports b/.exports index ea8c5409e79..4c89e38d049 100644 --- a/.exports +++ b/.exports @@ -28,8 +28,5 @@ export MANPAGER='less -X'; # https://stackoverflow.com/a/42265848/96656 export GPG_TTY=$(tty); -# NVM -export NVM_DIR="$HOME/.nvm" - # Hide MacOS message saying the default shell is now zsh export BASH_SILENCE_DEPRECATION_WARNING=1 diff --git a/.functions b/.functions index a592b287add..178a4449557 100644 --- a/.functions +++ b/.functions @@ -1,6 +1,5 @@ #!/usr/bin/env bash - # Kill process by port function killport() { diff --git a/.gitconfig b/.gitconfig index 32e41bd2800..47a1e59ad17 100644 --- a/.gitconfig +++ b/.gitconfig @@ -128,6 +128,7 @@ precomposeunicode = false autocrlf = false + ignorecase = false [color] diff --git a/.vscode/settings.json b/.vscode/settings.json index 84054110266..399960e9a9f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -173,5 +173,11 @@ "vscode-kubernetes.helm-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/helm/darwin-amd64/helm", "vscode-kubernetes.minikube-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/minikube/darwin-amd64/minikube" }, - "redhat.telemetry.enabled": false + "redhat.telemetry.enabled": false, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[html]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + } } diff --git a/init.sh b/init.sh index bec615e918f..256f1a4f2cc 100755 --- a/init.sh +++ b/init.sh @@ -58,7 +58,7 @@ ln -s ~/Projects/dotfiles/.vscode/settings.json ~/Library/Application\ Support/C ln -s ~/Projects/dotfiles/.vscode/keybindings.json ~/Library/Application\ Support/Code/User echo "Installing NVM" -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash echo "Installing Global Node modules" cat npm-ls.txt | xargs npm -g i From f5a1ace3975759b01759a4445a4f5e9d51b6e2e3 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Thu, 27 Jan 2022 10:18:10 -0500 Subject: [PATCH 124/141] Remove global ESLint and Prettier since these should really be configured on a per project basis --- .eslintignore | 6 ------ .eslintrc | 17 ----------------- .prettierignore | 6 ------ .prettierrc | 4 ---- 4 files changed, 33 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc delete mode 100644 .prettierignore delete mode 100644 .prettierrc diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 6f77fc271d4..00000000000 --- a/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -**/.git/**/* -**/node_modules/**/* -**/bower_components/**/* -**/coverage/**/* -**/dist/**/* -**/build/**/* diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index b5427e4e357..00000000000 --- a/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "jest": true, - "es6": true - }, - "sourceType": "module", - "plugins": ["prettier"], - "extends": [ - "eslint:recommended", - "prettier", - ], - "rules": { - "prettier/prettier": "error" - }, -} diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 92383e15e0e..00000000000 --- a/.prettierignore +++ /dev/null @@ -1,6 +0,0 @@ -.*/ -node_modules/ -dist/ -package.json -package-lock.json - diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 6e778b4fb9c..00000000000 --- a/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "trailingComma": "all", - "singleQuote": true -} From f03b293cdde621112bf8ab9e52319d516882385b Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Mon, 31 Jan 2022 14:34:58 -0500 Subject: [PATCH 125/141] Remove bootstrapping step to install global npm moules --- init.sh | 3 --- npm-ls.txt | 4 ---- 2 files changed, 7 deletions(-) delete mode 100644 npm-ls.txt diff --git a/init.sh b/init.sh index 256f1a4f2cc..c0c6b4ad2a0 100755 --- a/init.sh +++ b/init.sh @@ -60,9 +60,6 @@ ln -s ~/Projects/dotfiles/.vscode/keybindings.json ~/Library/Application\ Suppor echo "Installing NVM" curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash -echo "Installing Global Node modules" -cat npm-ls.txt | xargs npm -g i - echo "Applying OSX configurations" source ~/Projects/dotfiles/.macos diff --git a/npm-ls.txt b/npm-ls.txt deleted file mode 100644 index 079c6583b0a..00000000000 --- a/npm-ls.txt +++ /dev/null @@ -1,4 +0,0 @@ -eslint -eslint-config-prettier -eslint-plugin-prettier -prettier From f3f93cd246c37ae1877a2fc208bfa1c4acd75ec3 Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 8 Mar 2022 09:34:23 -0500 Subject: [PATCH 126/141] Clean up functions and VS Code settings --- .functions | 34 ++++++++++------------------------ .vscode/settings.json | 41 +++++++++++++++++++---------------------- 2 files changed, 29 insertions(+), 46 deletions(-) diff --git a/.functions b/.functions index 178a4449557..c2c26e66067 100644 --- a/.functions +++ b/.functions @@ -163,33 +163,19 @@ function tre() { tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX; } -function loc() { - find $2 -name $1 | xargs wc -l | sort -nr -} - +# Spin up a mock HTTP server, listening to the given port, that echos back any POSTed data function mhttp() { while true; do echo "Hello, World!" | nc -l $1; done } -# === CLEARBANC === - -function kmsd() { - gcloud kms decrypt --project clearbanc-api-${1} --keyring storage --key storage-key --location global --ciphertext-file ./config/clearbanc-api-${1}/${2}.yaml.encrypted --plaintext-file ${2}.yaml -} - -function kmse() { - gcloud kms encrypt --project clearbanc-api-${1} --keyring storage --key storage-key --location global --ciphertext-file ./config/clearbanc-api-${1}/${2}.yaml.encrypted --plaintext-file ${2}.yaml -} - -function kubectx() { - gcloud config set project clearbanc-api-${1}; - gcloud container clusters get-credentials k8s-${1}-live --zone us-central1; -} - -function cbl() { - gcloud builds list --filter "tags='${2}'" --project clearbanc-api-${1}; -} +# POWER -function dbssh() { - gcloud compute ssh sql-fwder --project=${1} --zone=us-central1-a -- -N -L ${2}:0.0.0.0:5532 +# Find all public IPs for the tasks of a given ECS service +function ecsip() { + AWS_CMD_BASE="aws --profile development-admin --region us-east-2" + GET_TASKS_BY_SERVICE="$AWS_CMD_BASE ecs list-tasks --cluster card-service --service-name $1 | jq -c '.taskArns[] | \"\\(.)\"'" + GET_ENI_ATTACHMENTS_BY_TASKS="$AWS_CMD_BASE ecs describe-tasks --cluster card-service --tasks | jq -c '.tasks[].attachments[] | select(.type==\"ElasticNetworkInterface\") | .details[] | select(.name==\"networkInterfaceId\") | .value'" + GET_PUBLIC_IPS_BY_ENIS="$AWS_CMD_BASE ec2 describe-network-interfaces --network-interface-ids | jq -c '.NetworkInterfaces[].Association.PublicIp'" + CMD="$GET_TASKS_BY_SERVICE | xargs $GET_ENI_ATTACHMENTS_BY_TASKS | xargs $GET_PUBLIC_IPS_BY_ENIS" + eval "$CMD" } diff --git a/.vscode/settings.json b/.vscode/settings.json index 399960e9a9f..47b7b5ef4f9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,7 +22,6 @@ "editor.fontFamily": "Fira Code", "editor.fontSize": 13, "editor.tabSize": 2, - "editor.renderIndentGuides": true, "editor.glyphMargin": true, "editor.scrollBeyondLastLine": true, "editor.mouseWheelZoom": false, @@ -57,19 +56,36 @@ "debug.toolBarLocation": "docked", "extensions.autoUpdate": true, "git.promptToSaveFilesBeforeCommit": "staged", + "git.closeDiffOnOperation": true, "search.showLineNumbers": true, "typescript.updateImportsOnFileMove.enabled": "always", - "vsicons.dontShowNewVersionMessage": true, + "redhat.telemetry.enabled": false, + "vs-kubernetes": { + "vscode-kubernetes.helm-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/helm/darwin-amd64/helm", + "vscode-kubernetes.minikube-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/minikube/darwin-amd64/minikube" + }, //-------- Language configuration -------- "[json]": { "editor.defaultFormatter": "vscode.json-language-features" }, + "[jsonc]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescript]": { "editor.defaultFormatter": "vscode.typescript-language-features" }, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[html]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[markdown]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, //-------- Files configuration -------- "files.exclude": { "**/*.pyc": true @@ -86,11 +102,6 @@ //-------- Python configuration -------- "python.linting.enabled": true, "python.linting.pylintEnabled": false, - //-------- Go configuration -------- - "go.formatTool": "goimports", - "go.toolsManagement.autoUpdate": true, - //-------- Vue configuration -------- - "vetur.useWorkspaceDependencies": true, //-------- GitLens configuration -------- "gitlens.advanced.messages": { "suppressCommitHasNoPreviousCommitWarning": false, @@ -165,19 +176,5 @@ // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. "css.lint.idSelector": "ignore", //-------- LESS configuration -------- - "less.validate": true, - "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "vs-kubernetes": { - "vscode-kubernetes.helm-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/helm/darwin-amd64/helm", - "vscode-kubernetes.minikube-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/minikube/darwin-amd64/minikube" - }, - "redhat.telemetry.enabled": false, - "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[html]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - } + "less.validate": true } From 5434ee3cc6803923fbfb2fd6135a8afd9c67610c Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Tue, 12 Jul 2022 15:12:23 -0400 Subject: [PATCH 127/141] Remove unused commands --- .aliases | 24 ++++++++---------------- .functions | 11 +++-------- .vscode/settings.json | 4 ++-- 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/.aliases b/.aliases index f7190fc9962..803c4c38ed2 100644 --- a/.aliases +++ b/.aliases @@ -52,9 +52,6 @@ alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date # TODO: Should also prune un-needed packages, but note that brew cleanup blows away npm for some reason... alias update='sudo softwareupdate -i -a; brew update; brew upgrade; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update; sudo gem cleanup' -# Google Chrome -alias chrome='open -a Google\ Chrome' - # IP addresses alias ip="dig +short myip.opendns.com @resolver1.opendns.com" alias lip="ipconfig getifaddr en0" @@ -117,13 +114,6 @@ for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do alias "${method}"="lwp-request -m '${method}'" done -# Make Grunt print stack traces by default -command -v grunt > /dev/null && alias grunt="grunt --stack" - -# Kill all the tabs in Chrome to free up memory -# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description -alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill" - # Lock the screen (when going AFK) alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend" @@ -136,12 +126,6 @@ alias path='echo -e ${PATH//:/\\n}' # List all npm packages installed globally alias npmls='npm ls -g --depth=0 --silent --parseable | xargs basename | grep -v lib' -# Store global npm packages in text file -alias npmst='npmls > ~/npm-ls.txt' - -# Activate local virtualenv -alias venv='source ${PWD##*/}/bin/activate' - # Fix system time by matching Apple server time. alias fixtime='sudo ntpdate -u time.apple.com' @@ -150,3 +134,11 @@ alias flushdns='sudo killall -HUP mDNSResponder' # Gitmoji alias gm='gitmoji' + +# See what's listening on a given port +alias whichport='sudo lsof -i -P | grep LISTEN | grep' + +# POWER + +# Open in IntelliJ +alias intellij='open -a "IntelliJ IDEA CE.app"' diff --git a/.functions b/.functions index c2c26e66067..fae86db5bb7 100644 --- a/.functions +++ b/.functions @@ -170,12 +170,7 @@ function mhttp() { # POWER -# Find all public IPs for the tasks of a given ECS service -function ecsip() { - AWS_CMD_BASE="aws --profile development-admin --region us-east-2" - GET_TASKS_BY_SERVICE="$AWS_CMD_BASE ecs list-tasks --cluster card-service --service-name $1 | jq -c '.taskArns[] | \"\\(.)\"'" - GET_ENI_ATTACHMENTS_BY_TASKS="$AWS_CMD_BASE ecs describe-tasks --cluster card-service --tasks | jq -c '.tasks[].attachments[] | select(.type==\"ElasticNetworkInterface\") | .details[] | select(.name==\"networkInterfaceId\") | .value'" - GET_PUBLIC_IPS_BY_ENIS="$AWS_CMD_BASE ec2 describe-network-interfaces --network-interface-ids | jq -c '.NetworkInterfaces[].Association.PublicIp'" - CMD="$GET_TASKS_BY_SERVICE | xargs $GET_ENI_ATTACHMENTS_BY_TASKS | xargs $GET_PUBLIC_IPS_BY_ENIS" - eval "$CMD" +# Find CF request details by ray id +function cflogs() { + curl -H "Authorization: Bearer ${CLOUDFLARE_TOKEN}" https://api.cloudflare.com/client/v4/zones/e8900cc9c0e8dc2ade675327b3f634fa/logs/rayids/$1 } diff --git a/.vscode/settings.json b/.vscode/settings.json index 47b7b5ef4f9..c6792c5b237 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -66,7 +66,7 @@ }, //-------- Language configuration -------- "[json]": { - "editor.defaultFormatter": "vscode.json-language-features" + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" @@ -75,7 +75,7 @@ "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescript]": { - "editor.defaultFormatter": "vscode.typescript-language-features" + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" From d243fe707182c787fc5d9814f4647d8aaa89b82d Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Fri, 7 Mar 2025 16:48:27 -0500 Subject: [PATCH 128/141] =?UTF-8?q?=F0=9F=94=A7=20(mq):=20Add=20things?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .aliases | 7 ++++++- .bash_profile | 2 ++ .bashrc | 6 ++++++ .functions | 1 + .gitconfig | 1 + .vscode/settings.json | 16 ++++++++++------ 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.aliases b/.aliases index 803c4c38ed2..cb7cd505e4c 100644 --- a/.aliases +++ b/.aliases @@ -141,4 +141,9 @@ alias whichport='sudo lsof -i -P | grep LISTEN | grep' # POWER # Open in IntelliJ -alias intellij='open -a "IntelliJ IDEA CE.app"' +alias intellij='open -a "IntelliJ IDEA.app"' + +# MQ + +# Bootstrap marqeta-jpos +alias mq-bootstrap='target/bin/stop ; mvn clean install -Denv=ci -DskipTests ; tar -xvf target/mqpay-jcard-1.0.0-SNAPSHOT.tar --directory target ; AWS_PROFILE=marqeta-jpos target/bin/start' diff --git a/.bash_profile b/.bash_profile index 27e85166adc..66c5f1244fb 100644 --- a/.bash_profile +++ b/.bash_profile @@ -61,3 +61,5 @@ fi [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +. "$HOME/.local/bin/env" diff --git a/.bashrc b/.bashrc index 12570026634..b4086b73380 100644 --- a/.bashrc +++ b/.bashrc @@ -1 +1,7 @@ [ -n "$PS1" ] && source ~/.bash_profile; + +# tabtab source for packages +# uninstall by removing these lines +[ -f ~/.config/tabtab/__tabtab.bash ] && . ~/.config/tabtab/__tabtab.bash || true + +. "$HOME/.local/bin/env" diff --git a/.functions b/.functions index fae86db5bb7..7d3135d7ed6 100644 --- a/.functions +++ b/.functions @@ -174,3 +174,4 @@ function mhttp() { function cflogs() { curl -H "Authorization: Bearer ${CLOUDFLARE_TOKEN}" https://api.cloudflare.com/client/v4/zones/e8900cc9c0e8dc2ade675327b3f634fa/logs/rayids/$1 } + diff --git a/.gitconfig b/.gitconfig index 47a1e59ad17..3e612a7b7eb 100644 --- a/.gitconfig +++ b/.gitconfig @@ -214,5 +214,6 @@ clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f required = true + process = git-lfs filter-process [init] defaultBranch = main diff --git a/.vscode/settings.json b/.vscode/settings.json index c6792c5b237..90dc4716aab 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,6 @@ "workbench.editor.labelFormat": "short", "workbench.editor.revealIfOpen": true, "workbench.startupEditor": "newUntitledFile", - "workbench.colorTheme": "Abyss", "workbench.editor.enablePreviewFromQuickOpen": false, "workbench.editor.highlightModifiedTabs": true, "workbench.settings.enableNaturalLanguageSearch": false, @@ -38,13 +37,12 @@ "editor.snippetSuggestions": "top", "editor.insertSpaces": true, "editor.codeActionsOnSave": { - "source.organizeImports": false, - "source.fixAll.eslint": true + "source.organizeImports": "never", + "source.fixAll": "explicit" }, - "editor.formatOnSave": true, "editor.smoothScrolling": true, "editor.cursorBlinking": "phase", - "editor.cursorSmoothCaretAnimation": false, + "editor.cursorSmoothCaretAnimation": "off", "terminal.integrated.confirmOnExit": "hasChildProcesses", "terminal.integrated.fontFamily": "Fira Code", "terminal.integrated.fontSize": 13, @@ -176,5 +174,11 @@ // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. "css.lint.idSelector": "ignore", //-------- LESS configuration -------- - "less.validate": true + "less.validate": true, + "editor.accessibilitySupport": "off", + + //------- MARQETA -------- + + "github-actions.use-enterprise": true, + "github-enterprise.uri": "https://github.marqeta.com" } From cc9d767ea1dd439356a048adfb76cc8f641c2f7a Mon Sep 17 00:00:00 2001 From: Igor Barsi Date: Wed, 3 Dec 2025 08:32:03 -0500 Subject: [PATCH 129/141] =?UTF-8?q?=F0=9F=94=A7=20(mq):=20Add=20copy=20AI?= =?UTF-8?q?=20config=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bash_profile | 6 +++ .bashrc | 6 +++ .vscode/settings.json | 107 +++++++++++------------------------------- 3 files changed, 40 insertions(+), 79 deletions(-) diff --git a/.bash_profile b/.bash_profile index 66c5f1244fb..86fd34d509c 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,3 +1,6 @@ +# Kiro CLI pre block. Keep at the top of this file. +[[ -f "${HOME}/Library/Application Support/kiro-cli/shell/bash_profile.pre.bash" ]] && builtin source "${HOME}/Library/Application Support/kiro-cli/shell/bash_profile.pre.bash" + # Add `~/bin` to the `$PATH` export PATH="$HOME/bin:$PATH"; @@ -63,3 +66,6 @@ fi . "$HOME/.local/bin/env" + +# Kiro CLI post block. Keep at the bottom of this file. +[[ -f "${HOME}/Library/Application Support/kiro-cli/shell/bash_profile.post.bash" ]] && builtin source "${HOME}/Library/Application Support/kiro-cli/shell/bash_profile.post.bash" diff --git a/.bashrc b/.bashrc index b4086b73380..5c8d8e4d877 100644 --- a/.bashrc +++ b/.bashrc @@ -1,3 +1,6 @@ +# Kiro CLI pre block. Keep at the top of this file. +[[ -f "${HOME}/Library/Application Support/kiro-cli/shell/bashrc.pre.bash" ]] && builtin source "${HOME}/Library/Application Support/kiro-cli/shell/bashrc.pre.bash" + [ -n "$PS1" ] && source ~/.bash_profile; # tabtab source for packages @@ -5,3 +8,6 @@ [ -f ~/.config/tabtab/__tabtab.bash ] && . ~/.config/tabtab/__tabtab.bash || true . "$HOME/.local/bin/env" + +# Kiro CLI post block. Keep at the bottom of this file. +[[ -f "${HOME}/Library/Application Support/kiro-cli/shell/bashrc.post.bash" ]] && builtin source "${HOME}/Library/Application Support/kiro-cli/shell/bashrc.post.bash" diff --git a/.vscode/settings.json b/.vscode/settings.json index 90dc4716aab..9ea8784abfb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -58,10 +58,6 @@ "search.showLineNumbers": true, "typescript.updateImportsOnFileMove.enabled": "always", "redhat.telemetry.enabled": false, - "vs-kubernetes": { - "vscode-kubernetes.helm-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/helm/darwin-amd64/helm", - "vscode-kubernetes.minikube-path.mac": "/Users/igorbarsi/.vs-kubernetes/tools/minikube/darwin-amd64/minikube" - }, //-------- Language configuration -------- "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" @@ -85,9 +81,6 @@ "editor.defaultFormatter": "esbenp.prettier-vscode" }, //-------- Files configuration -------- - "files.exclude": { - "**/*.pyc": true - }, "files.trimTrailingWhitespace": true, //-------- Prettier configuration -------- "prettier.requireConfig": true, @@ -95,11 +88,6 @@ "markdownlint.config": { "MD007": false }, - //-------- HTMLHint configuration -------- - "htmlhint.enable": true, - //-------- Python configuration -------- - "python.linting.enabled": true, - "python.linting.pylintEnabled": false, //-------- GitLens configuration -------- "gitlens.advanced.messages": { "suppressCommitHasNoPreviousCommitWarning": false, @@ -111,74 +99,35 @@ }, //-------- CodeSpell configuration -------- "cSpell.allowCompoundWords": true, - //-------- HTML configuration -------- - "emmet.showSuggestionsAsSnippets": true, - // Maximum amount of characters per line (0 = disable). - "html.format.wrapLineLength": 120, - // List of tags, comma separated, that shouldn't be reformatted. 'null' defaults to all tags listed at https://www.w3.org/TR/html5/dom.html#phrasing-content. - "html.format.unformatted": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, script, select, small, span, strong, sub, sup, textarea, tt, var", - // Indent and sections. - "html.format.indentInnerHtml": false, - // Whether existing line breaks before elements should be preserved. Only works before elements, not inside tags or for text. - "html.format.preserveNewLines": true, - // Maximum number of line breaks to be preserved in one chunk. Use 'null' for unlimited. - "html.format.maxPreserveNewLines": null, - // Format and indent {{#foo}} and {{/foo}}. - "html.format.indentHandlebars": false, - // End with a newline. - "html.format.endWithNewline": false, - // List of tags, comma separated, that should have an extra newline before them. 'null' defaults to "head, body, /html". - "html.format.extraLiners": "head, body, /html", - // Wrap attributes. - "html.format.wrapAttributes": "force", - //-------- JavaScript configuration -------- - // TODO: Noticed problems with these settings and eslint, consider removing. - "javascript.validate.enable": false, - "javascript.updateImportsOnFileMove.enabled": "always", - //-------- CSS configuration -------- - "css.validate": true, - // When using a vendor-specific prefix make sure to also include all other vendor-specific properties - "css.lint.compatibleVendorPrefixes": "warning", - // When using a vendor-specific prefix also include the standard property - "css.lint.vendorPrefix": "warning", - // Do not use duplicate style definitions - "css.lint.duplicateProperties": "error", - // Do not use empty rulesets - "css.lint.emptyRules": "error", - // Import statements do not load in parallel - "css.lint.importStatement": "warning", - // Do not use width or height when using padding or border - "css.lint.boxModel": "ignore", - // The universal selector (*) is known to be slow - "css.lint.universalSelector": "ignore", - // No unit for zero needed - "css.lint.zeroUnits": "error", - // @font-face rule must define 'src' and 'font-family' properties - "css.lint.fontFaceProperties": "warning", - // Hex colors must consist of three or six hex numbers - "css.lint.hexColorLength": "error", - // Invalid number of parameters - "css.lint.argumentsInColorFunction": "error", - // Unknown property. - "css.lint.unknownProperties": "error", - // IE hacks are only necessary when supporting IE7 and older - "css.lint.ieHack": "warning", - // Unknown vendor specific property. - "css.lint.unknownVendorSpecificProperties": "error", - // Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect - "css.lint.propertyIgnoredDueToDisplay": "error", - // Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. - "css.lint.important": "warning", - // Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. - "css.lint.float": "ignore", - // Selectors should not contain IDs because these rules are too tightly coupled with the HTML. - "css.lint.idSelector": "ignore", - //-------- LESS configuration -------- - "less.validate": true, - "editor.accessibilitySupport": "off", //------- MARQETA -------- - "github-actions.use-enterprise": true, - "github-enterprise.uri": "https://github.marqeta.com" + "github-enterprise.uri": "https://github.marqeta.com", + "chat.agent.enabled": true, + "terminal.integrated.env.osx": { + "Q_NEW_SESSION": "1" + }, + "[dockercompose]": { + "editor.insertSpaces": true, + "editor.tabSize": 2, + "editor.autoIndent": "advanced", + "editor.quickSuggestions": { + "other": true, + "comments": false, + "strings": true + }, + "editor.defaultFormatter": "redhat.vscode-yaml" + }, + "[github-actions-workflow]": { + "editor.defaultFormatter": "redhat.vscode-yaml" + }, + "amazonQ.telemetry": false, + "amazonQ.suppressPrompts": { + "amazonQChatDisclaimer": true, + "amazonQChatPairProgramming": true, + "amazonQSessionConfigurationMessage": true + }, + "chat.disableAIFeatures": true, + "editor.accessibilitySupport": "off", + "eslint.lintTask.enable": true } From 1e02c88ea8ea04d797ba22bca3d58d2c0d12c611 Mon Sep 17 00:00:00 2001 From: Claw Date: Tue, 3 Feb 2026 07:34:25 -0500 Subject: [PATCH 130/141] feat: modernize dotfiles for Apple Silicon and Zsh (#2) - Switch from Bash to Zsh - Replace brew.sh with Brewfile - Use mise for version management (replaces nvm/rvm) - Add modern CLI tools (fzf, zoxide, bat, eza, starship) - Replace Spectacle with Rectangle - Add Raycast - Clean up obsolete macOS settings - Automatic path handling for Apple Silicon Co-authored-by: ibarsi-claw --- .aliases | 42 ++++++++--------- .bash_profile | 71 ----------------------------- .bash_prompt | 122 -------------------------------------------------- .bashrc | 13 ------ .gvimrc | 9 ---- .macos | 74 +----------------------------- .path | 24 +++++++--- .zshrc | 57 +++++++++++++++++++++++ Brewfile | 47 +++++++++++++++++++ bootstrap.sh | 55 +++++++++++++---------- brew.sh | 77 ------------------------------- init.sh | 66 --------------------------- vscode.sh | 22 --------- 13 files changed, 174 insertions(+), 505 deletions(-) delete mode 100644 .bash_profile delete mode 100644 .bash_prompt delete mode 100644 .bashrc delete mode 100644 .gvimrc create mode 100644 .zshrc create mode 100644 Brewfile delete mode 100755 brew.sh delete mode 100755 init.sh delete mode 100755 vscode.sh diff --git a/.aliases b/.aliases index cb7cd505e4c..1154cd01e58 100644 --- a/.aliases +++ b/.aliases @@ -13,23 +13,27 @@ alias cdl="cd ~/Downloads" alias cdp="cd ~/Projects" # Detect which `ls` flavor is in use -if ls --color > /dev/null 2>&1; then # GNU `ls` +if command -v eza > /dev/null; then + alias ls="eza --icons" + alias l="eza -lF --icons" + alias la="eza -laF --icons" +elif ls --color > /dev/null 2>&1; then # GNU `ls` colorflag="--color" + alias l="ls -lF ${colorflag}" + alias la="ls -laF ${colorflag}" + alias ls="command ls ${colorflag}" else # macOS `ls` colorflag="-G" + alias l="ls -lF ${colorflag}" + alias la="ls -laF ${colorflag}" + alias ls="command ls ${colorflag}" fi -# List all files colorized in long format -alias l="ls -lF ${colorflag}" - -# List all files colorized in long format, including dot files -alias la="ls -laF ${colorflag}" - -# List only directories -alias lsd="ls -lF ${colorflag} | grep --color=never '^d'" +# Always use bat instead of cat if available +if command -v bat > /dev/null; then + alias cat="bat" +fi -# Always use color output for `ls` -alias ls="command ls ${colorflag}" 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:' @@ -42,19 +46,13 @@ alias egrep='egrep --color=auto' # Enable aliases to be sudo’ed alias sudo='sudo ' -# Get week number -alias week='date +%V' - -# Stopwatch -alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' - -# Get macOS Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages. -# TODO: Should also prune un-needed packages, but note that brew cleanup blows away npm for some reason... -alias update='sudo softwareupdate -i -a; brew update; brew upgrade; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update; sudo gem cleanup' +# Get macOS Software Updates, and update installed Homebrew, npm, and their installed packages. +alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew bundle; brew cleanup; npm install npm -g; npm update -g' # IP addresses -alias ip="dig +short myip.opendns.com @resolver1.opendns.com" +alias ip="curl -s https://ifconfig.me" alias lip="ipconfig getifaddr en0" + alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" # Show active network interfaces @@ -88,8 +86,6 @@ alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && kil alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder" alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder" -# URL-encode strings -alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);"' # Merge PDF files # Usage: `mergepdf -o output.pdf input{1,2,3}.pdf` diff --git a/.bash_profile b/.bash_profile deleted file mode 100644 index 86fd34d509c..00000000000 --- a/.bash_profile +++ /dev/null @@ -1,71 +0,0 @@ -# Kiro CLI pre block. Keep at the top of this file. -[[ -f "${HOME}/Library/Application Support/kiro-cli/shell/bash_profile.pre.bash" ]] && builtin source "${HOME}/Library/Application Support/kiro-cli/shell/bash_profile.pre.bash" - -# Add `~/bin` to the `$PATH` -export PATH="$HOME/bin:$PATH"; - -# Load the shell dotfiles, and then some: -# * ~/.path can be used to extend `$PATH`. -# * ~/.extra can be used for other settings you don’t want to commit. -for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do - [ -r "$file" ] && [ -f "$file" ] && source "$file"; -done; -unset file; - -# Case-insensitive globbing (used in pathname expansion) -shopt -s nocaseglob; - -# Append to the Bash history file, rather than overwriting it -shopt -s histappend; - -# Autocorrect typos in path names when using `cd` -shopt -s cdspell; - -# Enable some Bash 4 features when possible: -# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux` -# * Recursive globbing, e.g. `echo **/*.txt` -for option in autocd globstar; do - shopt -s "$option" 2> /dev/null; -done; - -# Add tab completion for many Bash commands -if which brew &> /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then - source "$(brew --prefix)/share/bash-completion/bash_completion"; -elif [ -f /etc/bash_completion ]; then - source /etc/bash_completion; -fi; - -# Add tab completion for git -if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then - source `brew --prefix`/etc/bash_completion.d/git-completion.bash -fi - -# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards -[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh; - -# Add tab completion for `defaults read|write NSGlobalDomain` -# You could just use `-g` instead, but I like being explicit -complete -W "NSGlobalDomain" defaults; - -# Add `killall` tab completion for common apps -complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall; - -# Start ssh agent and add all relevant keys if no keys are currently available. -if [[ $SSH_AUTH_SOCK && $(ssh-add -l | grep "The agent has no identities") ]]; then - eval `ssh-agent -s` - ssh-add -fi - -# Load RVM into a shell session *as a function* -[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" - - # Load NVM and enable its bash completion - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm - [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion - - -. "$HOME/.local/bin/env" - -# Kiro CLI post block. Keep at the bottom of this file. -[[ -f "${HOME}/Library/Application Support/kiro-cli/shell/bash_profile.post.bash" ]] && builtin source "${HOME}/Library/Application Support/kiro-cli/shell/bash_profile.post.bash" diff --git a/.bash_prompt b/.bash_prompt deleted file mode 100644 index ebf0cad94fe..00000000000 --- a/.bash_prompt +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env bash - -# Shell prompt based on the Solarized Dark theme. -# Screenshot: http://i.imgur.com/EkEtphC.png -# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles -# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. - -if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then - export TERM='gnome-256color'; -elif infocmp xterm-256color >/dev/null 2>&1; then - export TERM='xterm-256color'; -fi; - -prompt_git() { - local s=''; - local branchName=''; - - # Check if the current directory is in a Git repository. - if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") == '0' ]; then - - # check if the current directory is in .git before running git checks - if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then - - # Ensure the index is up to date. - git update-index --really-refresh -q &>/dev/null; - - # Check for uncommitted changes in the index. - if ! $(git diff --quiet --ignore-submodules --cached); then - s+='+'; - fi; - - # Check for unstaged changes. - if ! $(git diff-files --quiet --ignore-submodules --); then - s+='!'; - fi; - - # Check for untracked files. - if [ -n "$(git ls-files --others --exclude-standard)" ]; then - s+='?'; - fi; - - # Check for stashed files. - if $(git rev-parse --verify refs/stash &>/dev/null); then - s+='$'; - fi; - - fi; - - # Get the short symbolic ref. - # If HEAD isn’t a symbolic ref, get the short SHA for the latest commit - # Otherwise, just give up. - branchName="$(git symbolic-ref --quiet --short HEAD 2> /dev/null || \ - git rev-parse --short HEAD 2> /dev/null || \ - echo '(unknown)')"; - - [ -n "${s}" ] && s=" [${s}]"; - - echo -e "${1}${branchName}${2}${s}"; - else - return; - fi; -} - -if tput setaf 1 &> /dev/null; then - tput sgr0; # reset colors - bold=$(tput bold); - reset=$(tput sgr0); - # Solarized colors, taken from http://git.io/solarized-colors. - black=$(tput setaf 0); - blue=$(tput setaf 33); - cyan=$(tput setaf 37); - green=$(tput setaf 64); - orange=$(tput setaf 166); - purple=$(tput setaf 125); - red=$(tput setaf 124); - violet=$(tput setaf 61); - white=$(tput setaf 15); - yellow=$(tput setaf 136); -else - bold=''; - reset="\e[0m"; - black="\e[1;30m"; - blue="\e[1;34m"; - cyan="\e[1;36m"; - green="\e[1;32m"; - orange="\e[1;33m"; - purple="\e[1;35m"; - red="\e[1;31m"; - violet="\e[1;35m"; - white="\e[1;37m"; - yellow="\e[1;33m"; -fi; - -# Highlight the user name when logged in as root. -if [[ "${USER}" == "root" ]]; then - userStyle="${red}"; -else - userStyle="${orange}"; -fi; - -# Highlight the hostname when connected via SSH. -if [[ "${SSH_TTY}" ]]; then - hostStyle="${bold}${red}"; -else - hostStyle="${yellow}"; -fi; - -# Set the terminal title and prompt. -PS1="\[\033]0;\W\007\]"; # working directory base name -PS1+="\[${bold}\]\n"; # newline -PS1+="\[${userStyle}\]\u"; # username -PS1+="\[${white}\] at "; -PS1+="\[${hostStyle}\]\h"; # host -PS1+="\[${white}\] in "; -PS1+="\[${green}\]\w"; # working directory full path -PS1+="\$(prompt_git \"\[${white}\] on \[${violet}\]\" \"\[${blue}\]\")"; # Git repository details -PS1+="\n"; -PS1+="\[${white}\]🌀 \[${reset}\]"; # `Emoji > $!` (and reset color) -export PS1; - -PS2="\[${yellow}\]→ \[${reset}\]"; -export PS2; diff --git a/.bashrc b/.bashrc deleted file mode 100644 index 5c8d8e4d877..00000000000 --- a/.bashrc +++ /dev/null @@ -1,13 +0,0 @@ -# Kiro CLI pre block. Keep at the top of this file. -[[ -f "${HOME}/Library/Application Support/kiro-cli/shell/bashrc.pre.bash" ]] && builtin source "${HOME}/Library/Application Support/kiro-cli/shell/bashrc.pre.bash" - -[ -n "$PS1" ] && source ~/.bash_profile; - -# tabtab source for packages -# uninstall by removing these lines -[ -f ~/.config/tabtab/__tabtab.bash ] && . ~/.config/tabtab/__tabtab.bash || true - -. "$HOME/.local/bin/env" - -# Kiro CLI post block. Keep at the bottom of this file. -[[ -f "${HOME}/Library/Application Support/kiro-cli/shell/bashrc.post.bash" ]] && builtin source "${HOME}/Library/Application Support/kiro-cli/shell/bashrc.post.bash" diff --git a/.gvimrc b/.gvimrc deleted file mode 100644 index d2044d001d2..00000000000 --- a/.gvimrc +++ /dev/null @@ -1,9 +0,0 @@ -" Use the Solarized Dark theme -set background=dark -colorscheme solarized -" Use 14pt Monaco -set guifont=Monaco:h14 -" Don’t blink cursor in normal mode -set guicursor=n:blinkon0 -" Better line-height -set linespace=8 diff --git a/.macos b/.macos index 76c9e46f9c0..097702855cf 100644 --- a/.macos +++ b/.macos @@ -71,38 +71,11 @@ defaults write com.apple.LaunchServices LSQuarantine -bool false # in the login window sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName -# Restart automatically if the computer freezes -# sudo systemsetup -setrestartfreeze on - -# Disable smart quotes as they’re annoying when typing code -# defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false - -# Disable smart dashes as they’re annoying when typing code -# defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false - -# Disable automatic period substitution as it’s annoying when typing code -# defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false - -# Disable automatic capitalization as it’s annoying when typing code -# defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false - -# Disable auto-correct -# defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false - -############################################################################### -# SSD-specific tweaks # -############################################################################### - -# Disable hibernation (speeds up entering sleep mode) -sudo pmset -a hibernatemode 0 - -# Disable the sudden motion sensor as it’s not useful for SSDs -sudo pmset -a sms 0 - ############################################################################### # Trackpad, mouse, keyboard, Bluetooth accessories, and input # ############################################################################### + # Trackpad: enable tap to click for this user and for the login screen defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 @@ -317,51 +290,6 @@ defaults write com.googlecode.iterm2 PromptOnQuit -bool false # Activity Monitor # ############################################################################### -# Show the main window when launching Activity Monitor -defaults write com.apple.ActivityMonitor OpenMainWindow -bool true - -# Visualize CPU usage in the Activity Monitor Dock icon -defaults write com.apple.ActivityMonitor IconType -int 5 - -# Show all processes in Activity Monitor -defaults write com.apple.ActivityMonitor ShowCategory -int 0 - -# Sort Activity Monitor results by CPU usage -defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" -defaults write com.apple.ActivityMonitor SortDirection -int 0 - -############################################################################### -# Address Book, Dashboard, iCal, TextEdit, and Disk Utility # -############################################################################### - -# Enable the debug menu in Address Book -defaults write com.apple.addressbook ABShowDebugMenu -bool true - -# Enable Dashboard dev mode (allows keeping widgets on the desktop) -defaults write com.apple.dashboard devmode -bool true - -# Enable the debug menu in iCal (pre-10.8) -defaults write com.apple.iCal IncludeDebugMenu -bool true - -# Use plain text mode for new TextEdit documents -defaults write com.apple.TextEdit RichText -int 0 -# Open and save files as UTF-8 in TextEdit -defaults write com.apple.TextEdit PlainTextEncoding -int 4 -defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 - -# Enable the debug menu in Disk Utility -defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true -defaults write com.apple.DiskUtility advanced-image-options -bool true - -############################################################################### -# Mac App Store # -############################################################################### - -# Enable the WebKit Developer Tools in the Mac App Store -defaults write com.apple.appstore WebKitDeveloperExtras -bool true - -# Enable Debug Menu in the Mac App Store -defaults write com.apple.appstore ShowDebugMenu -bool true # Enable the automatic update check defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true diff --git a/.path b/.path index ad8f7ff94ee..d28757cc4db 100644 --- a/.path +++ b/.path @@ -1,8 +1,22 @@ -# Homebrew (all shells) -eval "$(/opt/homebrew/bin/brew shellenv)" +# .path - Path extensions -# Homebrew's sbin (`brew doctor` suggestion) +# Local binaries +export PATH="$HOME/bin:$PATH" export PATH="/usr/local/sbin:$PATH" -# RVM -export PATH="$PATH:$HOME/.rvm/bin" +# Go +if [ -d "$HOME/go/bin" ]; then + export PATH="$HOME/go/bin:$PATH" +fi + +# Rust +if [ -f "$HOME/.cargo/env" ]; then + source "$HOME/.cargo/env" +fi + +# Add Homebrew's sbin +if [[ $(uname -m) == "arm64" ]]; then + export PATH="/opt/homebrew/sbin:$PATH" +else + export PATH="/usr/local/sbin:$PATH" +fi diff --git a/.zshrc b/.zshrc new file mode 100644 index 00000000000..064edf1c508 --- /dev/null +++ b/.zshrc @@ -0,0 +1,57 @@ +# .zshrc - Modern Zsh configuration for ibarsi + +# --- Path & Environment --- +# Handle Apple Silicon (opt/homebrew) vs Intel (usr/local) +if [[ $(uname -m) == "arm64" ]]; then + export HOMEBREW_PREFIX="/opt/homebrew" +else + export HOMEBREW_PREFIX="/usr/local" +fi +export PATH="$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin:$PATH" + +# Load generic path extensions +[ -f "$HOME/.path" ] && source "$HOME/.path" + +# --- Plugin & Tool Init --- +# mise (replaces nvm/rvm) +if command -v mise >/dev/null; then + eval "$(mise activate zsh)" +fi + +# zoxide (better cd) +if command -v zoxide >/dev/null; then + eval "$(zoxide init zsh)" +fi + +# starship (prompt) +if command -v starship >/dev/null; then + eval "$(starship init zsh)" +fi + +# fzf (fuzzy finder) +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + +# --- Load modular dotfiles --- +for file in ~/.{exports,aliases,functions,extra}; do + [ -r "$file" ] && [ -f "$file" ] && source "$file" +done +unset file + +# --- Zsh Specifics --- +HISTFILE=~/.zsh_history +HISTSIZE=10000 +SAVEHIST=10000 +setopt APPEND_HISTORY +setopt SHARE_HISTORY +setopt HIST_IGNORE_ALL_DUPS +setopt HIST_REDUCE_BLANKS + +# Completion +autoload -Uz compinit && compinit +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' + +# Case-insensitive globbing +setopt nocaseglob + +# --- Keybindings --- +bindkey -e # Use emacs keybindings diff --git a/Brewfile b/Brewfile new file mode 100644 index 00000000000..8302bfdcd16 --- /dev/null +++ b/Brewfile @@ -0,0 +1,47 @@ +# Brewfile - Modernized Setup for ibarsi + +# Taps +tap "homebrew/bundle" +tap "homebrew/cask-versions" + +# CLI Tools +brew "coreutils" +brew "moreutils" +brew "findutils" +brew "gnu-sed" +brew "wget" +brew "vim" +brew "grep" +brew "openssh" +brew "ack" +brew "tree" +brew "gnupg" +brew "git" +brew "git-lfs" +brew "gh" +brew "commitizen" +brew "fzf" # Fuzzy finder +brew "zoxide" # Better 'cd' +brew "bat" # Better 'cat' +brew "eza" # Better 'ls' +brew "mise" # Universal version manager (Node, Ruby, Python, etc.) +brew "starship" # Fast, minimal shell prompt +brew "speedtest-cli" + +# Casks (Apps) +cask "iterm2" +cask "brave-browser" +cask "google-chrome" +cask "visual-studio-code" +cask "slack" +cask "spotify" +cask "postman" +cask "rectangle" # Modern window manager (replaces Spectacle) +cask "signal" +cask "docker" +cask "raycast" # Productivity launcher (Spotlight replacement) +cask "font-fira-code" + +# Mac App Store (requires 'mas' CLI, but keeping commented for now) +# brew "mas" +# mas "Xcode", id: 497799835 diff --git a/bootstrap.sh b/bootstrap.sh index 49025d9fb77..d85445557bb 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,31 +1,38 @@ #!/usr/bin/env bash -git pull; +# bootstrap.sh - Modern setup for ibarsi -# Remove all files that exist in current directory from root and create symlinks to replace them. -function doIt() { - DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" +# 1. Install Homebrew if not present +if ! command -v brew >/dev/null; then + echo "Installing Homebrew..." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + + if [[ $(uname -m) == "arm64" ]]; then + eval "$(/opt/homebrew/bin/brew shellenv)" + else + eval "$(/usr/local/bin/brew shellenv)" + fi +fi - # Currently only links one level deep :( - find . -mindepth 1 -maxdepth 1 -type f \( -iname "*" ! -iname ".DS_Store" ! -iname "README.md" ! -iname "bootstrap.sh" ! -iname "brew.sh" \) -not -path "./.git/*" | sed 's#.*/##' | while read file; do - echo "Removing $file from $HOME." - rm "$HOME/$file" +# 2. Install all tools and apps from Brewfile +echo "Syncing tools from Brewfile..." +brew bundle - # TODO: Does not create directory for link if it is missing. - echo "Linking $file from $DIR to $HOME." - ln -s "$DIR/$file" $HOME/. - done +# 3. Create symlinks for dotfiles +echo "Creating symlinks..." +files=(.zshrc .aliases .exports .functions .path .macos .gitconfig .gitignore .editorconfig) +for file in "${files[@]}"; do + ln -sf "$(pwd)/$file" "$HOME/$file" +done - source ~/.bash_profile; -} +# 4. Set Zsh as default shell +if [ "$SHELL" != "$(which zsh)" ]; then + echo "Setting Zsh as default shell..." + chsh -s "$(which zsh)" +fi -if [ "$1" == "--force" -o "$1" == "-f" ]; then - doIt; -else - read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1; - echo ""; - if [[ $REPLY =~ ^[Yy]$ ]]; then - doIt; - fi; -fi; -unset doIt; +# 5. Apply macOS defaults +echo "Applying macOS defaults (requires sudo)..." +./.macos + +echo "Setup complete! Restart your terminal to see changes." diff --git a/brew.sh b/brew.sh deleted file mode 100755 index e8a573faad7..00000000000 --- a/brew.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bash - -# Install command-line tools using Homebrew. - -# Make sure we’re using the latest Homebrew. -brew update - -# Upgrade any already-installed formulae. -brew upgrade - -# Install GNU core utilities (those that come with macOS are outdated). -# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`. -brew install coreutils - -# Install some other useful utilities like `sponge`. -brew install moreutils - -# Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed. -brew install findutils - -# Install GNU `sed`. -brew install gnu-sed - -# Install Bash 4. -# Note: don’t forget to add `/usr/local/bin/bash` to `/etc/shells` before -# running `chsh`. -brew install bash -brew install bash-completion - -# Switch to using brew-installed bash as default shell -if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then - echo '/usr/local/bin/bash' | sudo tee -a /etc/shells; - chsh -s /usr/local/bin/bash; -fi; - -# Install `wget`. -brew install wget - -# Install more recent versions of some macOS tools. -brew install vim -brew install grep -brew install openssh - -# Install other useful binaries. -brew install ack # Beyond `grep` -brew install speedtest_cli # Test your internet connection speed -brew install tree # View tree list of folder/file structures -brew install gnupg gnupg2 # Encrypt and sign data/communication via GnuPG - -# Fonts -brew tap homebrew/cask-fonts -brew install --cask font-fira-code # Fira (Ligatures) - -# Development -brew install git-lfs # System for managing large files in source control via Git LFS -git lfs install - -brew install nginx # High performance load balancer, web server and reverse proxy -brew install gh # GitHub CLI -brew commitizen # Standardized commit messages -brew install --cask docker # Docker - -# Applications -brew install --cask iterm2 \ - brave-browser \ - google-chrome \ - firefox \ - visual-studio-code \ - slack \ - spotify \ - postman \ - spectacle \ - licecap \ - signal - -# Remove outdated versions from the cellar. -brew cleanup diff --git a/init.sh b/init.sh deleted file mode 100755 index c0c6b4ad2a0..00000000000 --- a/init.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -echo "Set default shell to bash" -chsh -s /bin/bash -exec bash - -echo "Installing xcode" -xcode-select --install - -echo "Installing Homebrew" -if test ! $(which brew); then -echo "Installing homebrew..." - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/igorbarsi/.zprofile - eval "$(/opt/homebrew/bin/brew shellenv)" -fi - -echo "Installing Git" -brew install git - -echo "Generating SSH key" -ssh-keygen -t rsa -f ~/.ssh/id_rsa -eval "$(ssh-agent -s)" -ssh-add -cat ~/.ssh/id_rsa.pub | pbcopy - -echo "Generated SSH public key has been copied. Please add it to Github before proceeding \n" -echo "https://github.com/account/ssh \n" -read -p "Press [Enter] once complete..." - -echo "Setup Dotfiles" -mkdir ~/Projects -git clone git@github.com:ibarsi/dotfiles.git ~/Projects/dotfiles - -echo "Installing Homebrew packages" -source ~/Projects/dotfiles/brew.sh - -echo "Generating GPG key" -gpg --gen-key -gpg --list-secret-keys --keyid-format LONG - -echo "Please copy the long key" -read -p "Press [Enter] once complete..." -pbpaste | gpg --armor --export | pbcopy - -echo "Generated GPG key has been copied. Please add it to Github before proceeding \n" -echo "https://github.com/account/ssh \n" -read -p "Press [Enter] once complete..." - -echo "Boostrapping file system" -cd ~/Projects/dotfiles -source bootstrap.sh -cd - - -echo "Configuring VS Code" -$HOME/Projects/dotfiles/vscode.sh -ln -s ~/Projects/dotfiles/.vscode/settings.json ~/Library/Application\ Support/Code/User -ln -s ~/Projects/dotfiles/.vscode/keybindings.json ~/Library/Application\ Support/Code/User - -echo "Installing NVM" -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash - -echo "Applying OSX configurations" -source ~/Projects/dotfiles/.macos - -echo "All done! Please restart to apply final changes 💃" diff --git a/vscode.sh b/vscode.sh deleted file mode 100755 index e33a03d4aef..00000000000 --- a/vscode.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -# Install VS Code Extensions. - -code --install-extension streetsidesoftware.code-spell-checker -code --install-extension ms-azuretools.vscode-docker -code --install-extension oouo-diogo-perdigao.docthis -code --install-extension EditorConfig.editorconfig -code --install-extension dbaeumer.vscode-eslint -code --install-extension bierner.github-markdown-preview -code --install-extension eamodio.gitlens -code --install-extension mkaufman.HTMLHint -code --install-extension ms-kubernetes-tools.vscode-kubernetes-tools -code --install-extension davidanson.vscode-markdownlint -code --install-extension pkief.material-icon-theme -code --install-extension eg2.vscode-npm-script -code --install-extension christian-kohler.npm-intellisense -code --install-extension esbenp.prettier-vscode -code --install-extension ms-python.python -code --install-extension ms-vscode-remote.remote-containers -code --install-extension wayou.vscode-todo-highlight -code --install-extension redhat.vscode-yaml From b2c9e832699109a1ec232fcb17b829539ff2bc31 Mon Sep 17 00:00:00 2001 From: Claw Date: Tue, 3 Feb 2026 13:52:14 -0500 Subject: [PATCH 131/141] Advanced Modernization: Topic-based Structure & Zsh Power-ups (#3) * feat: implement topic-based organization and modern productivity tools - Restructured files into topic directories (git, macos, system, vim, zsh) - Implemented modular .zshrc that auto-loads topic configurations - Added Zsh power-ups: syntax-highlighting and autosuggestions - Added auto-update check script - Updated Brewfile with chezmoi, gh-dash, and modern shell tools - Added advanced Git log and browse aliases - Updated README with new installation flow and feature list * chore: remove unused chezmoi from Brewfile --------- Co-authored-by: ibarsi-claw --- Brewfile | 17 +++++------ README.md | 33 +++++++++++++++----- bootstrap.sh | 28 ++++++++++++----- .gitattributes => git/.gitattributes | 0 .gitconfig => git/.gitconfig | 10 ++++++ .gitignore => git/.gitignore | 0 .macos => macos/.macos | 0 .aliases => system/.aliases | 0 .curlrc => system/.curlrc | 0 .editorconfig => system/.editorconfig | 0 .exports => system/.exports | 0 .functions => system/.functions | 8 +++++ .path => system/.path | 0 system/auto-update.zsh | 34 +++++++++++++++++++++ .spellignore => vim/.spellignore | 0 .vimrc => vim/.vimrc | 0 .zshrc => zsh/.zshrc | 44 ++++++++++++++++++--------- zsh/aliases.zsh | 7 +++++ zsh/plugins.zsh | 16 ++++++++++ 19 files changed, 159 insertions(+), 38 deletions(-) rename .gitattributes => git/.gitattributes (100%) rename .gitconfig => git/.gitconfig (95%) rename .gitignore => git/.gitignore (100%) rename .macos => macos/.macos (100%) rename .aliases => system/.aliases (100%) rename .curlrc => system/.curlrc (100%) rename .editorconfig => system/.editorconfig (100%) rename .exports => system/.exports (100%) rename .functions => system/.functions (96%) rename .path => system/.path (100%) create mode 100644 system/auto-update.zsh rename .spellignore => vim/.spellignore (100%) rename .vimrc => vim/.vimrc (100%) rename .zshrc => zsh/.zshrc (52%) create mode 100644 zsh/aliases.zsh create mode 100644 zsh/plugins.zsh diff --git a/Brewfile b/Brewfile index 8302bfdcd16..36b924e8f99 100644 --- a/Brewfile +++ b/Brewfile @@ -4,7 +4,7 @@ tap "homebrew/bundle" tap "homebrew/cask-versions" -# CLI Tools +# CLI Tools (Core) brew "coreutils" brew "moreutils" brew "findutils" @@ -20,13 +20,16 @@ brew "git" brew "git-lfs" brew "gh" brew "commitizen" + +# Modern CLI Enhancements brew "fzf" # Fuzzy finder brew "zoxide" # Better 'cd' brew "bat" # Better 'cat' brew "eza" # Better 'ls' -brew "mise" # Universal version manager (Node, Ruby, Python, etc.) +brew "mise" # Universal version manager brew "starship" # Fast, minimal shell prompt brew "speedtest-cli" +brew "gh-dash" # GitHub CLI dashboard extension # Casks (Apps) cask "iterm2" @@ -36,12 +39,8 @@ cask "visual-studio-code" cask "slack" cask "spotify" cask "postman" -cask "rectangle" # Modern window manager (replaces Spectacle) +cask "rectangle" # Window manager cask "signal" cask "docker" -cask "raycast" # Productivity launcher (Spotlight replacement) -cask "font-fira-code" - -# Mac App Store (requires 'mas' CLI, but keeping commented for now) -# brew "mas" -# mas "Xcode", id: 497799835 +cask "raycast" # Productivity launcher +cask "font-fira-code-nerd-font" # Nerd font for icons (eza/starship) diff --git a/README.md b/README.md index bf71f507c74..b6123525b0c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,30 @@ # Igor's `dotfiles` -Forked from [Mathias Bynens' excellent repo](https://github.com/mathiasbynens/dotfiles.git)! +A modern, topic-based dotfile configuration for macOS. Optimized for Apple Silicon and productivity. -## Steps to Configure (OSX) Environment +## Installation -1. Copy `init.sh` raw from this repo and save it somewhere on your local machine -2. Add permission to execute the file via `chmod +x init.sh` -3. Execute the file via `./init.sh` -4. Follow all command prompts throughout script execution -5. Party! 🎉 +```bash +git clone https://github.com/ibarsi/dotfiles.git ~/dotfiles +cd ~/dotfiles +./bootstrap.sh +``` + +## Structure + +The repository is organized into **topics**, making it easy to modularize your configuration: + +- `git/`: Git configuration and aliases. +- `macos/`: macOS system defaults and UI/UX settings. +- `system/`: Global environment variables, paths, and generic aliases. +- `vim/`: Vim configuration. +- `zsh/`: Zsh configuration, plugins, and modular initialization. + +## Features + +- **Topic-based organization**: Modular and easy to maintain. +- **Modern CLI tools**: Integrated with `eza`, `bat`, `fzf`, `zoxide`, and `starship`. +- **Zsh Power-ups**: Syntax highlighting and autosuggestions out of the box. +- **Auto-update**: Automatically checks for updates to your dotfiles once a day. +- **Mise integration**: Blazing fast management for Node, Ruby, Python, and more. +- **Advanced Git**: Includes `gh-dash` and powerful log visualization. diff --git a/bootstrap.sh b/bootstrap.sh index d85445557bb..ef462392898 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash -# bootstrap.sh - Modern setup for ibarsi +# bootstrap.sh - Topic-based setup for ibarsi + +DOTFILES_ROOT=$(pwd -P) # 1. Install Homebrew if not present if ! command -v brew >/dev/null; then @@ -18,12 +20,24 @@ fi echo "Syncing tools from Brewfile..." brew bundle -# 3. Create symlinks for dotfiles +# 3. Create symlinks +# We use a simple loop to find files we want to link to $HOME echo "Creating symlinks..." -files=(.zshrc .aliases .exports .functions .path .macos .gitconfig .gitignore .editorconfig) -for file in "${files[@]}"; do - ln -sf "$(pwd)/$file" "$HOME/$file" -done + +# Zsh +ln -sf "$DOTFILES_ROOT/zsh/.zshrc" "$HOME/.zshrc" + +# Git +ln -sf "$DOTFILES_ROOT/git/.gitconfig" "$HOME/.gitconfig" +ln -sf "$DOTFILES_ROOT/git/.gitignore" "$HOME/.gitignore" +ln -sf "$DOTFILES_ROOT/git/.gitattributes" "$HOME/.gitattributes" + +# System +ln -sf "$DOTFILES_ROOT/system/.editorconfig" "$HOME/.editorconfig" +ln -sf "$DOTFILES_ROOT/system/.curlrc" "$HOME/.curlrc" + +# Vim +ln -sf "$DOTFILES_ROOT/vim/.vimrc" "$HOME/.vimrc" # 4. Set Zsh as default shell if [ "$SHELL" != "$(which zsh)" ]; then @@ -33,6 +47,6 @@ fi # 5. Apply macOS defaults echo "Applying macOS defaults (requires sudo)..." -./.macos +./macos/.macos echo "Setup complete! Restart your terminal to see changes." diff --git a/.gitattributes b/git/.gitattributes similarity index 100% rename from .gitattributes rename to git/.gitattributes diff --git a/.gitconfig b/git/.gitconfig similarity index 95% rename from .gitconfig rename to git/.gitconfig index 3e612a7b7eb..d0fb46b41d0 100644 --- a/.gitconfig +++ b/git/.gitconfig @@ -103,6 +103,16 @@ # Delete current branch from origin unpub = "!git push origin :$(git b)" + # Advanced visualization + lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit + + # Root directory + root = rev-parse --show-toplevel + + # Browse on GitHub + browse = !gh repo view --web + + [apply] # Detect whitespace errors when applying a patch diff --git a/.gitignore b/git/.gitignore similarity index 100% rename from .gitignore rename to git/.gitignore diff --git a/.macos b/macos/.macos similarity index 100% rename from .macos rename to macos/.macos diff --git a/.aliases b/system/.aliases similarity index 100% rename from .aliases rename to system/.aliases diff --git a/.curlrc b/system/.curlrc similarity index 100% rename from .curlrc rename to system/.curlrc diff --git a/.editorconfig b/system/.editorconfig similarity index 100% rename from .editorconfig rename to system/.editorconfig diff --git a/.exports b/system/.exports similarity index 100% rename from .exports rename to system/.exports diff --git a/.functions b/system/.functions similarity index 96% rename from .functions rename to system/.functions index 7d3135d7ed6..7d73b800842 100644 --- a/.functions +++ b/system/.functions @@ -40,6 +40,14 @@ function cdf() { # short for `cdfinder` cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')"; } +# Reload dotfiles +function reload-dotfiles() { + if [ -d "$HOME/dotfiles" ]; then + (cd "$HOME/dotfiles" && git pull origin master && ./bootstrap.sh) + source "$HOME/.zshrc" + fi +} + # Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression function targz() { local tmpFile="${@%/}.tar"; diff --git a/.path b/system/.path similarity index 100% rename from .path rename to system/.path diff --git a/system/auto-update.zsh b/system/auto-update.zsh new file mode 100644 index 00000000000..4ff2dce9f03 --- /dev/null +++ b/system/auto-update.zsh @@ -0,0 +1,34 @@ +# system/auto-update.zsh - Keep dotfiles in sync + +function check_dotfiles_update() { + # Only check once every 24 hours + local last_check_file="$HOME/.dotfiles_last_update" + local current_time=$(date +%s) + local one_day=86400 + + if [ -f "$last_check_file" ]; then + local last_check=$(cat "$last_check_file") + if (( current_time - last_check < one_day )); then + return + fi + fi + + echo -n "Checking for dotfiles updates... " + # Assuming the repo is at ~/dotfiles + if [ -d "$HOME/dotfiles" ]; then + (cd "$HOME/dotfiles" && git fetch origin master -q) + local local_hash=$(cd "$HOME/dotfiles" && git rev-parse HEAD) + local remote_hash=$(cd "$HOME/dotfiles" && git rev-parse origin/master) + + if [ "$local_hash" != "$remote_hash" ]; then + echo "New version available! Run 'reload-dotfiles' to update." + else + echo "Up to date." + fi + fi + + echo "$current_time" > "$last_check_file" +} + +# Run check in background (non-blocking) +check_dotfiles_update &! diff --git a/.spellignore b/vim/.spellignore similarity index 100% rename from .spellignore rename to vim/.spellignore diff --git a/.vimrc b/vim/.vimrc similarity index 100% rename from .vimrc rename to vim/.vimrc diff --git a/.zshrc b/zsh/.zshrc similarity index 52% rename from .zshrc rename to zsh/.zshrc index 064edf1c508..c247cd73c4f 100644 --- a/.zshrc +++ b/zsh/.zshrc @@ -1,7 +1,6 @@ -# .zshrc - Modern Zsh configuration for ibarsi +# .zshrc - Modular Zsh configuration for ibarsi # --- Path & Environment --- -# Handle Apple Silicon (opt/homebrew) vs Intel (usr/local) if [[ $(uname -m) == "arm64" ]]; then export HOMEBREW_PREFIX="/opt/homebrew" else @@ -9,15 +8,36 @@ else fi export PATH="$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin:$PATH" -# Load generic path extensions -[ -f "$HOME/.path" ] && source "$HOME/.path" +# Define dotfiles location +export DOTFILES="$HOME/dotfiles" -# --- Plugin & Tool Init --- -# mise (replaces nvm/rvm) +# --- Load Topics --- +# Load order: path -> everything else -> plugins +# This finds all *.zsh files in the topic directories and sources them. + +# 1. First, load all .path files +for file in $DOTFILES/**/*.path; do + source "$file" +done + +# 2. Load mise (version manager) if command -v mise >/dev/null; then eval "$(mise activate zsh)" fi +# 3. Load all other .zsh files (except plugins/completion) +for file in $DOTFILES/**/*.zsh(N); do + if [[ "$file" != *"plugins.zsh"* && "$file" != *"completion.zsh"* ]]; then + source "$file" + fi +done + +# 4. Load legacy bash-style files from system topic +for file in $DOTFILES/system/.{exports,aliases,functions,extra}; do + [ -r "$file" ] && [ -f "$file" ] && source "$file" +done + +# --- Tool Init --- # zoxide (better cd) if command -v zoxide >/dev/null; then eval "$(zoxide init zsh)" @@ -28,14 +48,8 @@ if command -v starship >/dev/null; then eval "$(starship init zsh)" fi -# fzf (fuzzy finder) -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh - -# --- Load modular dotfiles --- -for file in ~/.{exports,aliases,functions,extra}; do - [ -r "$file" ] && [ -f "$file" ] && source "$file" -done -unset file +# plugins +source "$DOTFILES/zsh/plugins.zsh" # --- Zsh Specifics --- HISTFILE=~/.zsh_history @@ -54,4 +68,4 @@ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' setopt nocaseglob # --- Keybindings --- -bindkey -e # Use emacs keybindings +bindkey -e diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh new file mode 100644 index 00000000000..4283689d832 --- /dev/null +++ b/zsh/aliases.zsh @@ -0,0 +1,7 @@ +# zsh/aliases.zsh + +# Navigation +alias dtf="cd $DOTFILES" + +# Reload shell +alias reload="exec zsh -l" diff --git a/zsh/plugins.zsh b/zsh/plugins.zsh new file mode 100644 index 00000000000..2c84e2dfe69 --- /dev/null +++ b/zsh/plugins.zsh @@ -0,0 +1,16 @@ +# zsh/plugins.zsh - Zsh Productivity Power-ups + +# 1. zsh-autosuggestions +if [ -d "$HOMEBREW_PREFIX/share/zsh-autosuggestions" ]; then + source "$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh" +fi + +# 2. zsh-syntax-highlighting +if [ -d "$HOMEBREW_PREFIX/share/zsh-syntax-highlighting" ]; then + source "$HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" +fi + +# 3. fzf-tab (if installed via brew or manually) +# Note: Usually requires cloning or a specific brew tap. +# For now, we'll assume standard fzf integration which brew handles. +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh From 1c05fcf283071502ed543c07e74366015640b727 Mon Sep 17 00:00:00 2001 From: Claw Date: Wed, 4 Feb 2026 08:59:03 -0500 Subject: [PATCH 132/141] Add Catppuccin Theme Integration (#4) * Add Catppuccin theme integration - Create theme/ topic with Catppuccin Mocha configuration - Configure iTerm2, Starship, VS Code, Vim, Bat, FZF, eza - Add automated install script for one-command setup - Update Vim to use Catppuccin colorscheme with fallback - Document theme switching and customization * Add Catppuccin theme installation to bootstrap script --------- Co-authored-by: ibarsi-claw --- Brewfile | 4 + bootstrap.sh | 12 ++- theme/README.md | 91 +++++++++++++++++++ theme/catppuccin.zsh | 63 ++++++++++++++ theme/install.sh | 46 ++++++++++ theme/iterm2-catppuccin.json | 163 +++++++++++++++++++++++++++++++++++ theme/starship.toml | 129 +++++++++++++++++++++++++++ theme/vim-colors.vim | 12 +++ theme/vscode-settings.json | 14 +++ vim/.vimrc | 5 +- 10 files changed, 536 insertions(+), 3 deletions(-) create mode 100644 theme/README.md create mode 100644 theme/catppuccin.zsh create mode 100644 theme/install.sh create mode 100644 theme/iterm2-catppuccin.json create mode 100644 theme/starship.toml create mode 100644 theme/vim-colors.vim create mode 100644 theme/vscode-settings.json diff --git a/Brewfile b/Brewfile index 36b924e8f99..279e6e8cd0a 100644 --- a/Brewfile +++ b/Brewfile @@ -44,3 +44,7 @@ cask "signal" cask "docker" cask "raycast" # Productivity launcher cask "font-fira-code-nerd-font" # Nerd font for icons (eza/starship) + +# Catppuccin Theme Tools +brew "starship" # Prompt theming (already listed above) +# VS Code extension: Catppuccin for VSCode (install via marketplace) diff --git a/bootstrap.sh b/bootstrap.sh index ef462392898..654fc4d898d 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -39,13 +39,21 @@ ln -sf "$DOTFILES_ROOT/system/.curlrc" "$HOME/.curlrc" # Vim ln -sf "$DOTFILES_ROOT/vim/.vimrc" "$HOME/.vimrc" -# 4. Set Zsh as default shell +# 4. Install Catppuccin theme +if [ -f "$DOTFILES_ROOT/theme/install.sh" ]; then + echo "Installing Catppuccin theme..." + bash "$DOTFILES_ROOT/theme/install.sh" +else + echo "Theme install script not found, skipping..." +fi + +# 5. Set Zsh as default shell if [ "$SHELL" != "$(which zsh)" ]; then echo "Setting Zsh as default shell..." chsh -s "$(which zsh)" fi -# 5. Apply macOS defaults +# 6. Apply macOS defaults echo "Applying macOS defaults (requires sudo)..." ./macos/.macos diff --git a/theme/README.md b/theme/README.md new file mode 100644 index 00000000000..9db311b92c2 --- /dev/null +++ b/theme/README.md @@ -0,0 +1,91 @@ +# Catppuccin Theme Integration + +Soothing pastel theme for your entire development environment. + +## Flavors + +- **Mocha** (default): Dark, cozy, color-rich +- **Macchiato**: Medium contrast, gentle +- **Frappé**: Subdued, muted aesthetic +- **Latte**: Light theme (solarized-style) + +To switch flavors, edit `catppuccin.zsh` and change `CATPPUCCIN_FLAVOR`. + +## Installation + +Run the install script: + +```bash +./theme/install.sh +``` + +Or apply manually to each tool: + +### Terminal (iTerm2) +1. Open iTerm2 → Preferences → Profiles → Colors +2. Color Presets → Import → Select `theme/iterm2-catppuccin.json` +3. Select "Catppuccin Mocha" + +### VS Code +1. Install extension: **Catppuccin for VSCode** +2. Command Palette → `Color Theme` → `Catppuccin Mocha` +3. Settings sync will handle the rest + +### Vim +Install the colorscheme: + +```bash +git clone https://github.com/catppuccin/vim.git ~/.vim/pack/catppuccin/start/vim +``` + +### Bat (syntax highlighting) + +```bash +mkdir -p "$(bat --config-dir)/themes" +wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme +bat cache --build +``` + +### Starship +Already configured in `starship.toml`. Ensure your `.zshrc` loads it: + +```zsh +eval "$(starship init zsh)" +``` + +## Tools Integrated + +- ✅ iTerm2 terminal colors +- ✅ Starship prompt +- ✅ VS Code editor theme +- ✅ Vim colorscheme +- ✅ Bat syntax highlighting +- ✅ FZF fuzzy finder +- ✅ eza directory listings +- ✅ Less/man page colors + +## File Structure + +``` +theme/ +├── catppuccin.zsh # Shell env vars & FZF/bat/eza config +├── starship.toml # Prompt theme configuration +├── iterm2-catppuccin.json # iTerm2 color preset +├── install.sh # One-command setup +├── vim-colors.vim # Vim colorscheme config +├── vscode-settings.json # VS Code theme settings +└── README.md # This file +``` + +## Switching Flavors + +To use a different flavor (e.g., Macchiato): + +1. Edit `catppuccin.zsh`: Change `CATPPUCCIN_FLAVOR="mocha"` to `"macchiato"` +2. Update colors in the export statements +3. For VS Code: Command Palette → Color Theme → Catppuccin Macchiato +4. For iTerm2: Import the Macchiato variant (see catppuccin.org for downloads) + +## Credits + +[Catppuccin](https://catppuccin.com) - Soothing pastel theme for the high-spirited! diff --git a/theme/catppuccin.zsh b/theme/catppuccin.zsh new file mode 100644 index 00000000000..a02603747fa --- /dev/null +++ b/theme/catppuccin.zsh @@ -0,0 +1,63 @@ +# Catppuccin Theme Configuration +# Mocha (dark) flavor - easy to switch to others + +# Flavor selection +export CATPPUCCIN_FLAVOR="mocha" + +# Core Colors (Mocha) +export CATPPUCCIN_ROSEWATER="#f5e0dc" +export CATPPUCCIN_FLAMINGO="#f2cdcd" +export CATPPUCCIN_PINK="#f5c2e7" +export CATPPUCCIN_MAUVE="#cba6f7" +export CATPPUCCIN_RED="#f38ba8" +export CATPPUCCIN_MAROON="#eba0ac" +export CATPPUCCIN_PEACH="#fab387" +export CATPPUCCIN_YELLOW="#f9e2af" +export CATPPUCCIN_GREEN="#a6e3a1" +export CATPPUCCIN_TEAL="#94e2d5" +export CATPPUCCIN_SKY="#89dceb" +export CATPPUCCIN_SAPPHIRE="#74c7ec" +export CATPPUCCIN_BLUE="#89b4fa" +export CATPPUCCIN_LAVENDER="#b4befe" +export CATPPUCCIN_TEXT="#cdd6f4" +export CATPPUCCIN_SUBTEXT1="#bac2de" +export CATPPUCCIN_SUBTEXT0="#a6adc8" +export CATPPUCCIN_OVERLAY2="#9399b2" +export CATPPUCCIN_OVERLAY1="#7f849c" +export CATPPUCCIN_OVERLAY0="#6c7086" +export CATPPUCCIN_SURFACE2="#585b70" +export CATPPUCCIN_SURFACE1="#45475a" +export CATPPUCCIN_SURFACE0="#313244" +export CATPPUCCIN_BASE="#1e1e2e" +export CATPPUCCIN_MANTLE="#181825" +export CATPPUCCIN_CRUST="#11111b" + +# FZF Catppuccin Theme +export FZF_DEFAULT_OPTS=" + --color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 + --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc + --color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 + --color=selected-bg:#585b70 +" + +# Bat theme +export BAT_THEME="Catppuccin Mocha" + +# eza colors +export EZA_COLORS=" + di=38;2;180;190;254: + fi=38;2;205;214;244: + ex=38;2;166;227;161: + ln=38;2;137;180;250: + or=38;2;243;139;168: + mi=38;2;243;139;168: +" + +# Less/man pages +export LESS_TERMCAP_mb="\e[1;38;2;243;139;168m" +export LESS_TERMCAP_md="\e[1;38;2;137;180;250m" +export LESS_TERMCAP_me="\e[0m" +export LESS_TERMCAP_se="\e[0m" +export LESS_TERMCAP_so="\e[1;38;2;30;30;46;48;2;69;71;90m" +export LESS_TERMCAP_ue="\e[0m" +export LESS_TERMCAP_us="\e[1;38;2;180;190;254m" diff --git a/theme/install.sh b/theme/install.sh new file mode 100644 index 00000000000..9414f54962d --- /dev/null +++ b/theme/install.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +# Install Catppuccin theme configurations + +set -e + +DOTFILES="$HOME/dotfiles" + +echo "🎨 Installing Catppuccin theme..." + +# Symlink starship config +echo "→ Symlinking Starship config..." +mkdir -p "$HOME/.config" +ln -sf "$DOTFILES/theme/starship.toml" "$HOME/.config/starship.toml" + +# Install bat themes +echo "→ Installing bat themes..." +mkdir -p "$(bat --config-dir)/themes" +wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme +bat cache --build + +# Install iTerm2 color preset +echo "→ Installing iTerm2 color preset..." +if [[ -d "$HOME/Library/Application Support/iTerm2/DynamicProfiles" ]]; then + mkdir -p "$HOME/Library/Application Support/iTerm2/DynamicProfiles" + ln -sf "$DOTFILES/theme/iterm2-catppuccin.json" "$HOME/Library/Application Support/iTerm2/DynamicProfiles/catppuccin.json" +fi + +# VS Code settings - manual note +echo "→ VS Code: Install 'Catppuccin for VSCode' extension from marketplace" +echo " Then set theme to 'Catppuccin Mocha' in settings" + +# Vim setup +echo "→ Setting up Vim Catppuccin..." +mkdir -p "$HOME/.vim/pack/catppuccin/start" +if [[ ! -d "$HOME/.vim/pack/catppuccin/start/vim" ]]; then + git clone https://github.com/catppuccin/vim.git "$HOME/.vim/pack/catppuccin/start/vim" +else + echo " Catppuccin vim already installed" +fi + +echo "✅ Catppuccin theme installed!" +echo "" +echo "Manual steps:" +echo " 1. Install VS Code extension: 'Catppuccin for VSCode'" +echo " 2. In iTerm2: Preferences → Profiles → Colors → Color Presets → Catppuccin Mocha" +echo " 3. Restart your terminal" diff --git a/theme/iterm2-catppuccin.json b/theme/iterm2-catppuccin.json new file mode 100644 index 00000000000..f99cc806685 --- /dev/null +++ b/theme/iterm2-catppuccin.json @@ -0,0 +1,163 @@ +{ + "Profiles": [ + { + "Name": "Catppuccin Mocha", + "Guid": "catppuccin-mocha", + "Dynamic Profile Parent Name": "Default", + "Ansi 0 Color": { + "Red Component": 0.28627450980392155, + "Color Space": "sRGB", + "Blue Component": 0.28627450980392155, + "Alpha Component": 1, + "Green Component": 0.28627450980392155 + }, + "Ansi 1 Color": { + "Red Component": 0.9529411764705882, + "Color Space": "sRGB", + "Blue Component": 0.6588235294117647, + "Alpha Component": 1, + "Green Component": 0.5450980392156862 + }, + "Ansi 2 Color": { + "Red Component": 0.6509803921568628, + "Color Space": "sRGB", + "Blue Component": 0.6313725490196078, + "Alpha Component": 1, + "Green Component": 0.8901960784313725 + }, + "Ansi 3 Color": { + "Red Component": 0.9764705882352941, + "Color Space": "sRGB", + "Blue Component": 0.6862745098039216, + "Alpha Component": 1, + "Green Component": 0.8862745098039215 + }, + "Ansi 4 Color": { + "Red Component": 0.5372549019607843, + "Color Space": "sRGB", + "Blue Component": 0.9803921568627451, + "Alpha Component": 1, + "Green Component": 0.7058823529411765 + }, + "Ansi 5 Color": { + "Red Component": 0.796078431372549, + "Color Space": "sRGB", + "Blue Component": 0.9686274509803922, + "Alpha Component": 1, + "Green Component": 0.6509803921568628 + }, + "Ansi 6 Color": { + "Red Component": 0.5803921568627451, + "Color Space": "sRGB", + "Blue Component": 0.8352941176470589, + "Alpha Component": 1, + "Green Component": 0.8862745098039215 + }, + "Ansi 7 Color": { + "Red Component": 0.7058823529411765, + "Color Space": "sRGB", + "Blue Component": 0.7843137254901961, + "Alpha Component": 1, + "Green Component": 0.6784313725490196 + }, + "Ansi 8 Color": { + "Red Component": 0.34509803921568627, + "Color Space": "sRGB", + "Blue Component": 0.4392156862745098, + "Alpha Component": 1, + "Green Component": 0.3607843137254902 + }, + "Ansi 9 Color": { + "Red Component": 0.9529411764705882, + "Color Space": "sRGB", + "Blue Component": 0.6588235294117647, + "Alpha Component": 1, + "Green Component": 0.5450980392156862 + }, + "Ansi 10 Color": { + "Red Component": 0.6509803921568628, + "Color Space": "sRGB", + "Blue Component": 0.6313725490196078, + "Alpha Component": 1, + "Green Component": 0.8901960784313725 + }, + "Ansi 11 Color": { + "Red Component": 0.9764705882352941, + "Color Space": "sRGB", + "Blue Component": 0.6862745098039216, + "Alpha Component": 1, + "Green Component": 0.8862745098039215 + }, + "Ansi 12 Color": { + "Red Component": 0.5372549019607843, + "Color Space": "sRGB", + "Blue Component": 0.9803921568627451, + "Alpha Component": 1, + "Green Component": 0.7058823529411765 + }, + "Ansi 13 Color": { + "Red Component": 0.796078431372549, + "Color Space": "sRGB", + "Blue Component": 0.9686274509803922, + "Alpha Component": 1, + "Green Component": 0.6509803921568628 + }, + "Ansi 14 Color": { + "Red Component": 0.5803921568627451, + "Color Space": "sRGB", + "Blue Component": 0.8352941176470589, + "Alpha Component": 1, + "Green Component": 0.8862745098039215 + }, + "Ansi 15 Color": { + "Red Component": 0.803921568627451, + "Color Space": "sRGB", + "Blue Component": 0.9568627450980393, + "Alpha Component": 1, + "Green Component": 0.8392156862745098 + }, + "Background Color": { + "Red Component": 0.11764705882352941, + "Color Space": "sRGB", + "Blue Component": 0.1803921568627451, + "Alpha Component": 1, + "Green Component": 0.11764705882352941 + }, + "Foreground Color": { + "Red Component": 0.803921568627451, + "Color Space": "sRGB", + "Blue Component": 0.9568627450980393, + "Alpha Component": 1, + "Green Component": 0.8392156862745098 + }, + "Cursor Color": { + "Red Component": 0.9607843137254902, + "Color Space": "sRGB", + "Blue Component": 0.9921568627450981, + "Alpha Component": 1, + "Green Component": 0.9411764705882353 + }, + "Cursor Text Color": { + "Red Component": 0.11764705882352941, + "Color Space": "sRGB", + "Blue Component": 0.1803921568627451, + "Alpha Component": 1, + "Green Component": 0.11764705882352941 + }, + "Selection Color": { + "Red Component": 0.34509803921568627, + "Color Space": "sRGB", + "Blue Component": 0.4392156862745098, + "Alpha Component": 1, + "Green Component": 0.3607843137254902 + }, + "Selected Text Color": { + "Red Component": 0.803921568627451, + "Color Space": "sRGB", + "Blue Component": 0.9568627450980393, + "Alpha Component": 1, + "Green Component": 0.8392156862745098 + } + } + ] +} diff --git a/theme/starship.toml b/theme/starship.toml new file mode 100644 index 00000000000..4bbccdd8f42 --- /dev/null +++ b/theme/starship.toml @@ -0,0 +1,129 @@ +# Starship Prompt - Catppuccin Mocha Theme + +format = """ +[](#cba6f7)\ +$os\ +$username\ +[](bg:#89b4fa fg:#cba6f7)\ +$directory\ +[](fg:#89b4fa bg:#74c7ec)\ +$git_branch\ +$git_status\ +[](fg:#74c7ec bg:#94e2d5)\ +$nodejs\ +$rust\ +$golang\ +$python\ +$ruby\ +[](fg:#94e2d5 bg:#313244)\ +$time\ +[ ](fg:#313244)\ +$line_break$character""" + +palette = 'catppuccin_mocha' + +[palettes.catppuccin_mocha] +rosewater = "#f5e0dc" +flamingo = "#f2cdcd" +pink = "#f5c2e7" +mauve = "#cba6f7" +red = "#f38ba8" +maroon = "#eba0ac" +peach = "#fab387" +yellow = "#f9e2af" +green = "#a6e3a1" +teal = "#94e2d5" +sky = "#89dceb" +sapphire = "#74c7ec" +blue = "#89b4fa" +lavender = "#b4befe" +text = "#cdd6f4" +subtext1 = "#bac2de" +subtext0 = "#a6adc8" +overlay2 = "#9399b2" +overlay1 = "#7f849c" +overlay0 = "#6c7086" +surface2 = "#585b70" +surface1 = "#45475a" +surface0 = "#313244" +base = "#1e1e2e" +mantle = "#181825" +crust = "#11111b" + +[os] +disabled = false +style = "bg:#cba6f7 fg:#1e1e2e" + +[os.symbols] +Macos = "󰀵 " + +[username] +show_always = true +style_user = "bg:#cba6f7 fg:#1e1e2e" +style_root = "bg:#cba6f7 fg:#1e1e2e" +format = '[ $user ]($style)' + +[directory] +style = "fg:#1e1e2e bg:#89b4fa" +format = "[ $path ]($style)" +truncation_length = 3 +truncation_symbol = "…/" + +[directory.substitutions] +"Documents" = "󰈙 " +"Downloads" = " " +"Music" = "󰝚 " +"Pictures" = " " +"Developer" = "󰲋 " + +[git_branch] +symbol = "" +style = "bg:#74c7ec fg:#1e1e2e" +format = '[ $symbol $branch ]($style)' + +[git_status] +style = "bg:#74c7ec fg:#1e1e2e" +format = '[$all_status$ahead_behind ]($style)' + +[nodejs] +symbol = "" +style = "bg:#94e2d5 fg:#1e1e2e" +format = '[ $symbol ($version) ]($style)' + +[rust] +symbol = "" +style = "bg:#94e2d5 fg:#1e1e2e" +format = '[ $symbol ($version) ]($style)' + +[golang] +symbol = "" +style = "bg:#94e2d5 fg:#1e1e2e" +format = '[ $symbol ($version) ]($style)' + +[python] +symbol = "" +style = "bg:#94e2d5 fg:#1e1e2e" +format = '[ $symbol ($version) ]($style)' + +[ruby] +symbol = "" +style = "bg:#94e2d5 fg:#1e1e2e" +format = '[ $symbol ($version) ]($style)' + +[time] +disabled = false +time_format = "%R" +style = "bg:#313244 fg:#cdd6f4" +format = '[ ♥ $time ]($style)' + +[line_break] +disabled = false + +[character] +disabled = false +success_symbol = '[➜](bold green)' +error_symbol = '[➜](bold red)' +vimcmd_symbol = '[](bold green)' +vimcmd_replace_one_symbol = '[](bold purple)' +vimcmd_replace_symbol = '[](bold purple)' +vimcmd_visual_symbol = '[](bold yellow)' diff --git a/theme/vim-colors.vim b/theme/vim-colors.vim new file mode 100644 index 00000000000..d0a24e07e71 --- /dev/null +++ b/theme/vim-colors.vim @@ -0,0 +1,12 @@ +" Catppuccin Color Scheme for Vim +" Add this to your .vimrc or source it separately + +try + set termguicolors + colorscheme catppuccin_mocha +catch + " Fallback if catppuccin not installed yet + colorscheme desert +endtry + +set background=dark diff --git a/theme/vscode-settings.json b/theme/vscode-settings.json new file mode 100644 index 00000000000..d9b7f4a2563 --- /dev/null +++ b/theme/vscode-settings.json @@ -0,0 +1,14 @@ +{ + "workbench.colorTheme": "Catppuccin Mocha", + "workbench.preferredDarkColorTheme": "Catppuccin Mocha", + "workbench.preferredLightColorTheme": "Catppuccin Latte", + "catppuccin.accentColor": "mauve", + "editor.fontFamily": "Fira Code", + "editor.fontSize": 13, + "terminal.integrated.fontFamily": "Fira Code", + "terminal.integrated.fontSize": 13, + "editor.bracketPairColorization.enabled": true, + "editor.guides.bracketPairs": true, + "terminal.integrated.cursorStyle": "line", + "terminal.integrated.cursorBlinking": true +} diff --git a/vim/.vimrc b/vim/.vimrc index 27460085368..ef64408146b 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -141,9 +141,12 @@ set foldcolumn=1 " Enable syntax highlighting syntax enable +" Try Catppuccin first, fall back to desert try - colorscheme desert + set termguicolors + colorscheme catppuccin_mocha catch + colorscheme desert endtry set background=dark From e098b1a31f63bdaf2a0ff7a0e7860ffda9f488be Mon Sep 17 00:00:00 2001 From: Claw Date: Tue, 17 Feb 2026 12:37:51 -0500 Subject: [PATCH 133/141] feat: add Zed as primary editor, replacing VS Code (#5) * feat: add Zed as primary editor, replacing VS Code * chore: remove comments from keymap.json for strict JSON compatibility * chore: remove commented-out lines from Brewfile * chore: remove duplicate starship entry and empty Catppuccin section from Brewfile * theme: remove Zed echo statements from install.sh * style: remove comments from zed/settings.json --------- Co-authored-by: ibarsi-claw Co-authored-by: ibarsi-claw --- Brewfile | 6 +- README.md | 27 +++++++++ bootstrap.sh | 5 ++ theme/install.sh | 9 +-- zed/keymap.json | 22 +++++++ zed/settings.json | 149 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 206 insertions(+), 12 deletions(-) create mode 100644 zed/keymap.json create mode 100644 zed/settings.json diff --git a/Brewfile b/Brewfile index 279e6e8cd0a..4e63a366e37 100644 --- a/Brewfile +++ b/Brewfile @@ -35,7 +35,7 @@ brew "gh-dash" # GitHub CLI dashboard extension cask "iterm2" cask "brave-browser" cask "google-chrome" -cask "visual-studio-code" +cask "zed" cask "slack" cask "spotify" cask "postman" @@ -44,7 +44,3 @@ cask "signal" cask "docker" cask "raycast" # Productivity launcher cask "font-fira-code-nerd-font" # Nerd font for icons (eza/starship) - -# Catppuccin Theme Tools -brew "starship" # Prompt theming (already listed above) -# VS Code extension: Catppuccin for VSCode (install via marketplace) diff --git a/README.md b/README.md index b6123525b0c..056f21811aa 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ The repository is organized into **topics**, making it easy to modularize your c - `macos/`: macOS system defaults and UI/UX settings. - `system/`: Global environment variables, paths, and generic aliases. - `vim/`: Vim configuration. +- `zed/`: Zed editor settings and keybindings (symlinked to `~/.config/zed/`). - `zsh/`: Zsh configuration, plugins, and modular initialization. ## Features @@ -28,3 +29,29 @@ The repository is organized into **topics**, making it easy to modularize your c - **Auto-update**: Automatically checks for updates to your dotfiles once a day. - **Mise integration**: Blazing fast management for Node, Ruby, Python, and more. - **Advanced Git**: Includes `gh-dash` and powerful log visualization. +- **Zed editor**: Primary editor with Catppuccin theme, Fira Code font, Prettier formatting, and custom keybindings — all managed as dotfiles. + +## Zed Editor + +[Zed](https://zed.dev) is configured as the primary editor. Config files live in `zed/` and are symlinked to `~/.config/zed/` by `bootstrap.sh`. + +| File | Destination | Purpose | +|------|-------------|---------| +| `zed/settings.json` | `~/.config/zed/settings.json` | Editor settings, theme, formatting | +| `zed/keymap.json` | `~/.config/zed/keymap.json` | Custom keybindings | + +**Key settings:** +- **Theme**: Catppuccin Mocha (dark) / Catppuccin Latte (light), follows system appearance +- **Font**: Fira Code 13px with ligatures +- **Formatting**: Prettier on save for JS/TS/TSX/JSON/HTML/Markdown +- **Extensions**: Auto-installed on first launch (Catppuccin, Prettier, ESLint, Dockerfile, etc.) +- **Telemetry**: Disabled + +**Keybindings (ported from VS Code):** + +| Shortcut | Action | +|----------|--------| +| `cmd+]` / `cmd+[` | Next / previous terminal pane | +| `cmd+d` | New terminal | +| `cmd+w` | Close active item | +| `cmd+k cmd+z` | Toggle centered layout (zen mode) | diff --git a/bootstrap.sh b/bootstrap.sh index 654fc4d898d..bda775a6dea 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -39,6 +39,11 @@ ln -sf "$DOTFILES_ROOT/system/.curlrc" "$HOME/.curlrc" # Vim ln -sf "$DOTFILES_ROOT/vim/.vimrc" "$HOME/.vimrc" +# Zed +mkdir -p "$HOME/.config/zed" +ln -sf "$DOTFILES_ROOT/zed/settings.json" "$HOME/.config/zed/settings.json" +ln -sf "$DOTFILES_ROOT/zed/keymap.json" "$HOME/.config/zed/keymap.json" + # 4. Install Catppuccin theme if [ -f "$DOTFILES_ROOT/theme/install.sh" ]; then echo "Installing Catppuccin theme..." diff --git a/theme/install.sh b/theme/install.sh index 9414f54962d..6da9925c634 100644 --- a/theme/install.sh +++ b/theme/install.sh @@ -25,10 +25,6 @@ if [[ -d "$HOME/Library/Application Support/iTerm2/DynamicProfiles" ]]; then ln -sf "$DOTFILES/theme/iterm2-catppuccin.json" "$HOME/Library/Application Support/iTerm2/DynamicProfiles/catppuccin.json" fi -# VS Code settings - manual note -echo "→ VS Code: Install 'Catppuccin for VSCode' extension from marketplace" -echo " Then set theme to 'Catppuccin Mocha' in settings" - # Vim setup echo "→ Setting up Vim Catppuccin..." mkdir -p "$HOME/.vim/pack/catppuccin/start" @@ -41,6 +37,5 @@ fi echo "✅ Catppuccin theme installed!" echo "" echo "Manual steps:" -echo " 1. Install VS Code extension: 'Catppuccin for VSCode'" -echo " 2. In iTerm2: Preferences → Profiles → Colors → Color Presets → Catppuccin Mocha" -echo " 3. Restart your terminal" +echo " 1. In iTerm2: Preferences → Profiles → Colors → Color Presets → Catppuccin Mocha" +echo " 2. Restart your terminal" diff --git a/zed/keymap.json b/zed/keymap.json new file mode 100644 index 00000000000..127ca4b8710 --- /dev/null +++ b/zed/keymap.json @@ -0,0 +1,22 @@ +[ + { + "context": "Terminal", + "bindings": { + "cmd-]": "terminal_panel::MoveTerminalRight", + "cmd-[": "terminal_panel::MoveTerminalLeft" + } + }, + { + "context": "Terminal", + "bindings": { + "cmd-d": "workspace::NewTerminal", + "cmd-w": "pane::CloseActiveItem" + } + }, + { + "context": "Workspace", + "bindings": { + "cmd-k cmd-z": "workspace::ToggleCenteredLayout" + } + } +] diff --git a/zed/settings.json b/zed/settings.json new file mode 100644 index 00000000000..da125f479f6 --- /dev/null +++ b/zed/settings.json @@ -0,0 +1,149 @@ +{ + "theme": { + "mode": "system", + "dark": "Catppuccin Mocha", + "light": "Catppuccin Latte" + }, + "buffer_font_family": "Fira Code", + "buffer_font_size": 13, + "buffer_font_features": { + "calt": true + }, + "ui_font_family": "Fira Code", + "ui_font_size": 14, + "tab_size": 2, + "hard_tabs": false, + "word_wrap": "none", + "show_whitespaces": "all", + "scrollbar": { + "show": "never" + }, + "minimap": { + "enabled": false + }, + "scroll_beyond_last_line": "one_page", + "autosave": "off", + "format_on_save": "on", + "auto_indent": "none", + "ensure_final_newline_on_save": true, + "remove_trailing_whitespace_on_save": true, + "restore_on_startup": "last_session", + "indent_guides": { + "enabled": true, + "coloring": "indent_aware" + }, + "auto_close_brackets": "always", + "git": { + "enabled": true, + "git_gutter": "tracked_files", + "inline_blame": { + "enabled": true, + "delay_ms": 600 + } + }, + "telemetry": { + "diagnostics": false, + "metrics": false + }, + "terminal": { + "font_family": "Fira Code", + "font_size": 13, + "cursor_shape": "bar", + "blinking": "on" + }, + "languages": { + "JavaScript": { + "tab_size": 2, + "format_on_save": "on", + "formatter": { + "external": { + "command": "prettier", + "arguments": ["--stdin-filepath", "{buffer_path}"] + } + } + }, + "TypeScript": { + "tab_size": 2, + "format_on_save": "on", + "formatter": { + "external": { + "command": "prettier", + "arguments": ["--stdin-filepath", "{buffer_path}"] + } + } + }, + "TSX": { + "tab_size": 2, + "format_on_save": "on", + "formatter": { + "external": { + "command": "prettier", + "arguments": ["--stdin-filepath", "{buffer_path}"] + } + } + }, + "JSON": { + "tab_size": 2, + "format_on_save": "on", + "formatter": { + "external": { + "command": "prettier", + "arguments": ["--stdin-filepath", "{buffer_path}"] + } + } + }, + "HTML": { + "tab_size": 2, + "format_on_save": "on", + "formatter": { + "external": { + "command": "prettier", + "arguments": ["--stdin-filepath", "{buffer_path}"] + } + } + }, + "Markdown": { + "tab_size": 2, + "format_on_save": "on", + "formatter": { + "external": { + "command": "prettier", + "arguments": ["--stdin-filepath", "{buffer_path}"] + } + } + }, + "YAML": { + "tab_size": 2 + }, + "Dockerfile": { + "tab_size": 2 + } + }, + "auto_install_extensions": { + "catppuccin": true, + "prettier": true, + "eslint": true, + "dockerfile": true, + "docker-compose": true, + "html": true, + "toml": true, + "env": true + }, + "features": { + "edit_prediction_provider": "none" + }, + "search": { + "line_numbers_in_results": true + }, + "project_panel": { + "dock": "left", + "file_icons": true, + "folder_icons": true, + "git_status": true, + "indent_size": 20, + "auto_reveal_entries": true + }, + "collaboration_panel": { + "dock": "left" + } +} From 5a68a9048db8de3f8dbc591de765d2325a321938 Mon Sep 17 00:00:00 2001 From: Claw Date: Tue, 17 Feb 2026 16:36:04 -0500 Subject: [PATCH 134/141] feat: replace iTerm2 with Ghostty terminal (#6) * feat: replace iTerm2 with Ghostty terminal * chore: remove unnecessary comment in theme/install.sh * review: remove Ghostty comment in install.sh; delete iterm2-catppuccin.json --------- Co-authored-by: ibarsi-claw Co-authored-by: ibarsi-claw --- Brewfile | 2 +- README.md | 30 +++++++ bootstrap.sh | 4 + ghostty/config | 87 +++++++++++++++++++ theme/install.sh | 9 +- theme/iterm2-catppuccin.json | 163 ----------------------------------- 6 files changed, 124 insertions(+), 171 deletions(-) create mode 100644 ghostty/config delete mode 100644 theme/iterm2-catppuccin.json diff --git a/Brewfile b/Brewfile index 4e63a366e37..6a48f4da190 100644 --- a/Brewfile +++ b/Brewfile @@ -32,7 +32,7 @@ brew "speedtest-cli" brew "gh-dash" # GitHub CLI dashboard extension # Casks (Apps) -cask "iterm2" +cask "ghostty" # GPU-accelerated terminal (replaces iTerm2) cask "brave-browser" cask "google-chrome" cask "zed" diff --git a/README.md b/README.md index 056f21811aa..10430e9ed6b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ The repository is organized into **topics**, making it easy to modularize your c - `macos/`: macOS system defaults and UI/UX settings. - `system/`: Global environment variables, paths, and generic aliases. - `vim/`: Vim configuration. +- `ghostty/`: Ghostty terminal configuration (symlinked to `~/.config/ghostty/`). - `zed/`: Zed editor settings and keybindings (symlinked to `~/.config/zed/`). - `zsh/`: Zsh configuration, plugins, and modular initialization. @@ -29,8 +30,37 @@ The repository is organized into **topics**, making it easy to modularize your c - **Auto-update**: Automatically checks for updates to your dotfiles once a day. - **Mise integration**: Blazing fast management for Node, Ruby, Python, and more. - **Advanced Git**: Includes `gh-dash` and powerful log visualization. +- **Ghostty terminal**: GPU-accelerated terminal with Catppuccin theme, Fira Code font, and custom keybindings — fully configured as dotfiles. - **Zed editor**: Primary editor with Catppuccin theme, Fira Code font, Prettier formatting, and custom keybindings — all managed as dotfiles. +## Ghostty Terminal + +[Ghostty](https://ghostty.org) is configured as the primary terminal. Config lives in `ghostty/` and is symlinked to `~/.config/ghostty/` by `bootstrap.sh`. + +| File | Destination | Purpose | +|------|-------------|---------| +| `ghostty/config` | `~/.config/ghostty/config` | Terminal settings, theme, keybindings | + +**Key settings:** +- **Theme**: Catppuccin Mocha (dark) / Catppuccin Latte (light), follows system appearance — built-in to Ghostty, no extra install needed +- **Font**: Fira Code 13px with ligatures (`calt`, `liga`) +- **Cursor**: Blinking bar (ported from iTerm2) +- **Shell integration**: Auto-detected — enables semantic zones, prompt detection, sudo passthrough +- **Privacy**: Crash reporting disabled + +**Keybindings (ported from iTerm2 / VS Code terminal):** + +| Shortcut | Action | +|----------|--------| +| `cmd+]` / `cmd+[` | Next / previous tab | +| `cmd+d` | Split pane right | +| `cmd+w` | Close pane / tab | +| `cmd+k cmd+z` | Toggle fullscreen (zen mode) | +| `cmd+=` / `cmd+-` | Increase / decrease font size | +| `cmd+0` | Reset font size | + +> **Note:** `theme/iterm2-catppuccin.json` is preserved in the repo for historical reference but is no longer used. + ## Zed Editor [Zed](https://zed.dev) is configured as the primary editor. Config files live in `zed/` and are symlinked to `~/.config/zed/` by `bootstrap.sh`. diff --git a/bootstrap.sh b/bootstrap.sh index bda775a6dea..56ef9b04469 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -44,6 +44,10 @@ mkdir -p "$HOME/.config/zed" ln -sf "$DOTFILES_ROOT/zed/settings.json" "$HOME/.config/zed/settings.json" ln -sf "$DOTFILES_ROOT/zed/keymap.json" "$HOME/.config/zed/keymap.json" +# Ghostty +mkdir -p "$HOME/.config/ghostty" +ln -sf "$DOTFILES_ROOT/ghostty/config" "$HOME/.config/ghostty/config" + # 4. Install Catppuccin theme if [ -f "$DOTFILES_ROOT/theme/install.sh" ]; then echo "Installing Catppuccin theme..." diff --git a/ghostty/config b/ghostty/config new file mode 100644 index 00000000000..117f723dd6c --- /dev/null +++ b/ghostty/config @@ -0,0 +1,87 @@ +# Ghostty Configuration +# Symlinked to ~/.config/ghostty/config by bootstrap.sh + +# ============================================================================= +# Appearance +# ============================================================================= + +# Catppuccin Mocha (dark) / Latte (light) — both built-in to Ghostty +theme = dark:Catppuccin Mocha,light:Catppuccin Latte + +# Font — Fira Code with ligatures +font-family = Fira Code +font-size = 13 +font-feature = calt +font-feature = liga + +# Window +window-decoration = true +window-padding-x = 8 +window-padding-y = 8 +window-padding-balance = true + +# Cursor +cursor-style = bar +cursor-style-blink = true + +# ============================================================================= +# Behavior +# ============================================================================= + +# Keep native macOS title bar +macos-titlebar-style = native + +# Option key as Alt (useful for shell shortcuts) +macos-option-as-alt = left + +# Confirm before closing a window with running processes +confirm-close-surface = true + +# Undo close timeout +undo-timeout = 10s + +# Shell integration (enables features like semantic zones, prompt detection) +shell-integration = detect +shell-integration-features = cursor,sudo,title + +# ============================================================================= +# Tabs & Splits +# ============================================================================= + +tab-overview = false +window-new-tab-position = end + +# ============================================================================= +# Keybindings +# ============================================================================= + +# Navigate tabs (mirrors former iTerm2 / VS Code terminal bindings) +keybind = cmd+right_bracket=next_tab +keybind = cmd+left_bracket=previous_tab + +# Split pane (replaces cmd+d in VS Code terminal) +keybind = cmd+d=new_split:right + +# Close pane / tab +keybind = cmd+w=close_surface + +# Zen / distraction-free (toggle fullscreen) +keybind = cmd+k>cmd+z=toggle_fullscreen + +# Quick font size adjustments +keybind = cmd+equal=increase_font_size:1 +keybind = cmd+minus=decrease_font_size:1 +keybind = cmd+zero=reset_font_size + +# ============================================================================= +# Performance & Privacy +# ============================================================================= + +# Disable telemetry / crash reporting +crash-report = false + +# Scrollback lines +scrollback-limit = 10000 + +# Copy on select (like iTerm2 default) +copy-on-select = clipboard diff --git a/theme/install.sh b/theme/install.sh index 6da9925c634..2877478bcab 100644 --- a/theme/install.sh +++ b/theme/install.sh @@ -18,12 +18,7 @@ mkdir -p "$(bat --config-dir)/themes" wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme bat cache --build -# Install iTerm2 color preset -echo "→ Installing iTerm2 color preset..." -if [[ -d "$HOME/Library/Application Support/iTerm2/DynamicProfiles" ]]; then - mkdir -p "$HOME/Library/Application Support/iTerm2/DynamicProfiles" - ln -sf "$DOTFILES/theme/iterm2-catppuccin.json" "$HOME/Library/Application Support/iTerm2/DynamicProfiles/catppuccin.json" -fi +echo "→ Ghostty: Catppuccin theme is built-in (configured via ghostty/config)" # Vim setup echo "→ Setting up Vim Catppuccin..." @@ -37,5 +32,5 @@ fi echo "✅ Catppuccin theme installed!" echo "" echo "Manual steps:" -echo " 1. In iTerm2: Preferences → Profiles → Colors → Color Presets → Catppuccin Mocha" +echo " 1. Ghostty: Catppuccin Mocha theme is applied automatically via config symlink" echo " 2. Restart your terminal" diff --git a/theme/iterm2-catppuccin.json b/theme/iterm2-catppuccin.json deleted file mode 100644 index f99cc806685..00000000000 --- a/theme/iterm2-catppuccin.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "Profiles": [ - { - "Name": "Catppuccin Mocha", - "Guid": "catppuccin-mocha", - "Dynamic Profile Parent Name": "Default", - "Ansi 0 Color": { - "Red Component": 0.28627450980392155, - "Color Space": "sRGB", - "Blue Component": 0.28627450980392155, - "Alpha Component": 1, - "Green Component": 0.28627450980392155 - }, - "Ansi 1 Color": { - "Red Component": 0.9529411764705882, - "Color Space": "sRGB", - "Blue Component": 0.6588235294117647, - "Alpha Component": 1, - "Green Component": 0.5450980392156862 - }, - "Ansi 2 Color": { - "Red Component": 0.6509803921568628, - "Color Space": "sRGB", - "Blue Component": 0.6313725490196078, - "Alpha Component": 1, - "Green Component": 0.8901960784313725 - }, - "Ansi 3 Color": { - "Red Component": 0.9764705882352941, - "Color Space": "sRGB", - "Blue Component": 0.6862745098039216, - "Alpha Component": 1, - "Green Component": 0.8862745098039215 - }, - "Ansi 4 Color": { - "Red Component": 0.5372549019607843, - "Color Space": "sRGB", - "Blue Component": 0.9803921568627451, - "Alpha Component": 1, - "Green Component": 0.7058823529411765 - }, - "Ansi 5 Color": { - "Red Component": 0.796078431372549, - "Color Space": "sRGB", - "Blue Component": 0.9686274509803922, - "Alpha Component": 1, - "Green Component": 0.6509803921568628 - }, - "Ansi 6 Color": { - "Red Component": 0.5803921568627451, - "Color Space": "sRGB", - "Blue Component": 0.8352941176470589, - "Alpha Component": 1, - "Green Component": 0.8862745098039215 - }, - "Ansi 7 Color": { - "Red Component": 0.7058823529411765, - "Color Space": "sRGB", - "Blue Component": 0.7843137254901961, - "Alpha Component": 1, - "Green Component": 0.6784313725490196 - }, - "Ansi 8 Color": { - "Red Component": 0.34509803921568627, - "Color Space": "sRGB", - "Blue Component": 0.4392156862745098, - "Alpha Component": 1, - "Green Component": 0.3607843137254902 - }, - "Ansi 9 Color": { - "Red Component": 0.9529411764705882, - "Color Space": "sRGB", - "Blue Component": 0.6588235294117647, - "Alpha Component": 1, - "Green Component": 0.5450980392156862 - }, - "Ansi 10 Color": { - "Red Component": 0.6509803921568628, - "Color Space": "sRGB", - "Blue Component": 0.6313725490196078, - "Alpha Component": 1, - "Green Component": 0.8901960784313725 - }, - "Ansi 11 Color": { - "Red Component": 0.9764705882352941, - "Color Space": "sRGB", - "Blue Component": 0.6862745098039216, - "Alpha Component": 1, - "Green Component": 0.8862745098039215 - }, - "Ansi 12 Color": { - "Red Component": 0.5372549019607843, - "Color Space": "sRGB", - "Blue Component": 0.9803921568627451, - "Alpha Component": 1, - "Green Component": 0.7058823529411765 - }, - "Ansi 13 Color": { - "Red Component": 0.796078431372549, - "Color Space": "sRGB", - "Blue Component": 0.9686274509803922, - "Alpha Component": 1, - "Green Component": 0.6509803921568628 - }, - "Ansi 14 Color": { - "Red Component": 0.5803921568627451, - "Color Space": "sRGB", - "Blue Component": 0.8352941176470589, - "Alpha Component": 1, - "Green Component": 0.8862745098039215 - }, - "Ansi 15 Color": { - "Red Component": 0.803921568627451, - "Color Space": "sRGB", - "Blue Component": 0.9568627450980393, - "Alpha Component": 1, - "Green Component": 0.8392156862745098 - }, - "Background Color": { - "Red Component": 0.11764705882352941, - "Color Space": "sRGB", - "Blue Component": 0.1803921568627451, - "Alpha Component": 1, - "Green Component": 0.11764705882352941 - }, - "Foreground Color": { - "Red Component": 0.803921568627451, - "Color Space": "sRGB", - "Blue Component": 0.9568627450980393, - "Alpha Component": 1, - "Green Component": 0.8392156862745098 - }, - "Cursor Color": { - "Red Component": 0.9607843137254902, - "Color Space": "sRGB", - "Blue Component": 0.9921568627450981, - "Alpha Component": 1, - "Green Component": 0.9411764705882353 - }, - "Cursor Text Color": { - "Red Component": 0.11764705882352941, - "Color Space": "sRGB", - "Blue Component": 0.1803921568627451, - "Alpha Component": 1, - "Green Component": 0.11764705882352941 - }, - "Selection Color": { - "Red Component": 0.34509803921568627, - "Color Space": "sRGB", - "Blue Component": 0.4392156862745098, - "Alpha Component": 1, - "Green Component": 0.3607843137254902 - }, - "Selected Text Color": { - "Red Component": 0.803921568627451, - "Color Space": "sRGB", - "Blue Component": 0.9568627450980393, - "Alpha Component": 1, - "Green Component": 0.8392156862745098 - } - } - ] -} From b7ce8efc8d85dc14cff4b8a888c599b2f3fc8767 Mon Sep 17 00:00:00 2001 From: ibarsi-claw Date: Sun, 22 Feb 2026 18:36:59 -0500 Subject: [PATCH 135/141] feat: improve dotfiles for Codex-first AI workflow --- README.md | 37 +++++++++++++++++++++++++++++++++++++ bootstrap.sh | 4 ++++ codex/config.toml | 28 ++++++++++++++++++++++++++++ zsh/.zshrc | 5 +++++ zsh/aliases.zsh | 7 +++++++ 5 files changed, 81 insertions(+) create mode 100644 codex/config.toml diff --git a/README.md b/README.md index 10430e9ed6b..8aaff1bbec0 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ The repository is organized into **topics**, making it easy to modularize your c - `vim/`: Vim configuration. - `ghostty/`: Ghostty terminal configuration (symlinked to `~/.config/ghostty/`). - `zed/`: Zed editor settings and keybindings (symlinked to `~/.config/zed/`). +- `codex/`: Codex CLI configuration (symlinked to `~/.codex/`). - `zsh/`: Zsh configuration, plugins, and modular initialization. ## Features @@ -32,6 +33,7 @@ The repository is organized into **topics**, making it easy to modularize your c - **Advanced Git**: Includes `gh-dash` and powerful log visualization. - **Ghostty terminal**: GPU-accelerated terminal with Catppuccin theme, Fira Code font, and custom keybindings — fully configured as dotfiles. - **Zed editor**: Primary editor with Catppuccin theme, Fira Code font, Prettier formatting, and custom keybindings — all managed as dotfiles. +- **Codex CLI workflow**: Safe-by-default Codex config, shell shortcuts, and completion for day-to-day AI coding. ## Ghostty Terminal @@ -61,6 +63,41 @@ The repository is organized into **topics**, making it easy to modularize your c > **Note:** `theme/iterm2-catppuccin.json` is preserved in the repo for historical reference but is no longer used. +## Codex CLI Workflow + +[Codex CLI](https://developers.openai.com/codex/cli/) is configured for a secure, fast terminal-first AI coding flow. + +| File | Destination | Purpose | +|------|-------------|---------| +| `codex/config.toml` | `~/.codex/config.toml` | Default model, approvals/sandbox, search mode, feature toggles | + +**Install Codex CLI:** + +```bash +npm i -g @openai/codex +``` + +**Key defaults in this repo:** +- `model = "gpt-5.3-codex"` +- `approval_policy = "on-request"` +- `sandbox_mode = "workspace-write"` +- `web_search = "cached"` (safer default than live web) +- `/review` uses `review_model = "gpt-5.3-codex"` + +**Enabled quality-of-life features:** +- `shell_snapshot` (faster repeated command runs) +- `unified_exec` (improved command execution path) +- `undo` (safer edit iteration) + +**Zsh shortcuts:** +- `cx` → `codex` +- `cxe` → `codex exec` +- `cxr` → `codex resume --last` +- `cxreview` → start Codex with `/review` +- `cxup` → upgrade Codex CLI + +> Security note: This setup intentionally avoids `danger-full-access` / `--yolo` defaults. + ## Zed Editor [Zed](https://zed.dev) is configured as the primary editor. Config files live in `zed/` and are symlinked to `~/.config/zed/` by `bootstrap.sh`. diff --git a/bootstrap.sh b/bootstrap.sh index 56ef9b04469..9bd7cf74d0f 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -48,6 +48,10 @@ ln -sf "$DOTFILES_ROOT/zed/keymap.json" "$HOME/.config/zed/keymap.json" mkdir -p "$HOME/.config/ghostty" ln -sf "$DOTFILES_ROOT/ghostty/config" "$HOME/.config/ghostty/config" +# Codex CLI +mkdir -p "$HOME/.codex" +ln -sf "$DOTFILES_ROOT/codex/config.toml" "$HOME/.codex/config.toml" + # 4. Install Catppuccin theme if [ -f "$DOTFILES_ROOT/theme/install.sh" ]; then echo "Installing Catppuccin theme..." diff --git a/codex/config.toml b/codex/config.toml new file mode 100644 index 00000000000..e1f34cd3a99 --- /dev/null +++ b/codex/config.toml @@ -0,0 +1,28 @@ +# Codex CLI defaults +# Symlinked to ~/.codex/config.toml by bootstrap.sh +# Docs: https://developers.openai.com/codex/config-basic + +# Keep a coding-focused default model. +model = "gpt-5.3-codex" + +# Safe-by-default execution posture. +approval_policy = "on-request" +sandbox_mode = "workspace-write" + +# Use cached web search results by default to reduce injection exposure. +web_search = "cached" + +# Keep responses direct for terminal workflows. +personality = "pragmatic" + +# Increase reasoning depth for non-trivial coding tasks. +model_reasoning_effort = "high" + +# Use a stronger model for /review runs. +review_model = "gpt-5.3-codex" + +# Experimental features that are useful for daily coding workflows. +[features] +shell_snapshot = true +unified_exec = true +undo = true diff --git a/zsh/.zshrc b/zsh/.zshrc index c247cd73c4f..2f8f018a80f 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -64,6 +64,11 @@ setopt HIST_REDUCE_BLANKS autoload -Uz compinit && compinit zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' +# Codex CLI completion (safe no-op when codex isn't installed yet) +if command -v codex >/dev/null; then + eval "$(codex completion zsh 2>/dev/null)" +fi + # Case-insensitive globbing setopt nocaseglob diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 4283689d832..0945db981f8 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -5,3 +5,10 @@ alias dtf="cd $DOTFILES" # Reload shell alias reload="exec zsh -l" + +# Codex CLI +alias cx="codex" +alias cxe="codex exec" +alias cxr="codex resume --last" +alias cxreview='codex "/review"' +alias cxup='npm i -g @openai/codex@latest' From c06cc010e49f4f048108eae3bf2935aa69fe08e5 Mon Sep 17 00:00:00 2001 From: ibarsi-claw Date: Sun, 22 Feb 2026 19:05:52 -0500 Subject: [PATCH 136/141] docs: clarify web_search cached behavior --- codex/config.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codex/config.toml b/codex/config.toml index e1f34cd3a99..0e249902eb5 100644 --- a/codex/config.toml +++ b/codex/config.toml @@ -9,7 +9,8 @@ model = "gpt-5.3-codex" approval_policy = "on-request" sandbox_mode = "workspace-write" -# Use cached web search results by default to reduce injection exposure. +# Use only cached/indexed web search snippets by default (no direct page fetches). +# This reduces prompt-injection risk from arbitrary live web content. web_search = "cached" # Keep responses direct for terminal workflows. From fe05a9a699c865c40e844085be5e72b04759294f Mon Sep 17 00:00:00 2001 From: ibarsi-claw Date: Sun, 22 Feb 2026 19:06:33 -0500 Subject: [PATCH 137/141] docs(codex): explain experimental feature flags in config --- codex/config.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codex/config.toml b/codex/config.toml index 0e249902eb5..3d04c2b64c7 100644 --- a/codex/config.toml +++ b/codex/config.toml @@ -24,6 +24,9 @@ review_model = "gpt-5.3-codex" # Experimental features that are useful for daily coding workflows. [features] +# Include a lightweight shell state snapshot with command/tool context when useful. shell_snapshot = true +# Route shell operations through the unified exec path for more consistent behavior. unified_exec = true +# Enable local undo support for reversible edit operations in the CLI. undo = true From 97ed3e1c0a58bdc3b7adff2a5d9fa89e5c345521 Mon Sep 17 00:00:00 2001 From: ibarsi-claw Date: Sun, 22 Feb 2026 19:07:43 -0500 Subject: [PATCH 138/141] docs(codex): clarify approval and sandbox settings --- codex/config.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codex/config.toml b/codex/config.toml index 3d04c2b64c7..f2de40fe7c3 100644 --- a/codex/config.toml +++ b/codex/config.toml @@ -5,7 +5,9 @@ # Keep a coding-focused default model. model = "gpt-5.3-codex" -# Safe-by-default execution posture. +# Safe-by-default execution posture: +# - approval_policy="on-request": prompt before running commands outside the sandbox or with elevated risk. +# - sandbox_mode="workspace-write": allow edits only in the workspace; block writes elsewhere by default. approval_policy = "on-request" sandbox_mode = "workspace-write" From db216c09ab58664bf88f9b147607f58f63577cc0 Mon Sep 17 00:00:00 2001 From: ibarsi-claw Date: Sun, 22 Feb 2026 19:08:21 -0500 Subject: [PATCH 139/141] docs(codex): clarify what /review mode uses --- codex/config.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codex/config.toml b/codex/config.toml index f2de40fe7c3..de1c5dc91f5 100644 --- a/codex/config.toml +++ b/codex/config.toml @@ -21,7 +21,8 @@ personality = "pragmatic" # Increase reasoning depth for non-trivial coding tasks. model_reasoning_effort = "high" -# Use a stronger model for /review runs. +# Used when running `codex /review` (PR/diff review mode). +# Normal coding/chat requests continue using `model` above. review_model = "gpt-5.3-codex" # Experimental features that are useful for daily coding workflows. From b90967d47f1bb27d810cc18b48a4612fd73d9ebf Mon Sep 17 00:00:00 2001 From: ibarsi-claw Date: Sun, 22 Feb 2026 19:09:45 -0500 Subject: [PATCH 140/141] docs(codex): prefer brew on macOS and make cxup install-aware --- README.md | 6 +++++- zsh/aliases.zsh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8aaff1bbec0..f939bbcec3d 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,10 @@ The repository is organized into **topics**, making it easy to modularize your c **Install Codex CLI:** ```bash +# macOS (preferred in this repo) +brew install --cask codex + +# cross-platform alternative npm i -g @openai/codex ``` @@ -94,7 +98,7 @@ npm i -g @openai/codex - `cxe` → `codex exec` - `cxr` → `codex resume --last` - `cxreview` → start Codex with `/review` -- `cxup` → upgrade Codex CLI +- `cxup` → upgrade Codex CLI (uses Homebrew cask when Codex was installed with brew; otherwise npm) > Security note: This setup intentionally avoids `danger-full-access` / `--yolo` defaults. diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 0945db981f8..05603cbdb0c 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -11,4 +11,4 @@ alias cx="codex" alias cxe="codex exec" alias cxr="codex resume --last" alias cxreview='codex "/review"' -alias cxup='npm i -g @openai/codex@latest' +alias cxup='if command -v brew >/dev/null && brew list --cask codex >/dev/null 2>&1; then brew upgrade --cask codex; else npm i -g @openai/codex@latest; fi' From 7aef5385c6f289be6840caaa8d40879745bf1b30 Mon Sep 17 00:00:00 2001 From: ibarsi-claw Date: Sun, 22 Feb 2026 19:14:16 -0500 Subject: [PATCH 141/141] chore: add codex to Brewfile and simplify README install block --- Brewfile | 1 + README.md | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Brewfile b/Brewfile index 6a48f4da190..04145fdb050 100644 --- a/Brewfile +++ b/Brewfile @@ -33,6 +33,7 @@ brew "gh-dash" # GitHub CLI dashboard extension # Casks (Apps) cask "ghostty" # GPU-accelerated terminal (replaces iTerm2) +cask "codex" # OpenAI Codex CLI cask "brave-browser" cask "google-chrome" cask "zed" diff --git a/README.md b/README.md index f939bbcec3d..f87239cc6a3 100644 --- a/README.md +++ b/README.md @@ -74,11 +74,8 @@ The repository is organized into **topics**, making it easy to modularize your c **Install Codex CLI:** ```bash -# macOS (preferred in this repo) brew install --cask codex - -# cross-platform alternative -npm i -g @openai/codex +npm i -g @openai/codex # cross-platform alternative ``` **Key defaults in this repo:**