From 3aec37074fd212485c35f4080b6d775f46f9a783 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 14 Oct 2016 21:59:34 +0200 Subject: [PATCH] updates --- aliases | 2 ++ bash_paths | 17 ++++++++++++--- bash_profile | 24 ++++----------------- bash_prompt | 5 +++-- bashrc | 4 +++- bin/colors.sh | 2 +- bin/install.sh | 2 +- bin/update-everything.sh | 12 +++++------ brew.sh | 9 +++++++- exports | 4 +++- gitconfig | 46 +++++++++++++++------------------------- inputrc | 4 +++- npm.sh | 2 +- ruby.sh | 2 +- tm_properties | 42 ------------------------------------ webstyle.css | 11 ++++++++++ 16 files changed, 78 insertions(+), 110 deletions(-) delete mode 100644 tm_properties diff --git a/aliases b/aliases index 8907e84..1131752 100644 --- a/aliases +++ b/aliases @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + # ---------------------------------------------------------------------- # ALIASES # ---------------------------------------------------------------------- diff --git a/bash_paths b/bash_paths index e40f4b5..c90f598 100644 --- a/bash_paths +++ b/bash_paths @@ -1,18 +1,19 @@ +#!/usr/bin/env bash + # adapted based on https://github.com/necolas/dotfiles/blob/master/shell/bash_paths # Directories to be prepended to PATH declare -a dirs_to_prepend=( "/usr/local/sbin" "/usr/local/bin" # Ensure that this bin always takes precedence over `/usr/bin` - "$HOME/.bin" ) # Directories to be appended to PATH declare -a dirs_to_append=( "/usr/bin" - "$(brew --prefix coreutils)/libexec/gnubin" # Add brew-installed GNU core utilities bin - "$(brew --prefix)/share/npm/bin" # Add npm-installed package bin + "$HOME/.bin" "$HOME/.rvm/bin" + "$(brew --prefix node)/bin" # Add npm/yarn-installed package bin ) # Prepend directories to PATH @@ -39,3 +40,13 @@ export PATH # define CDPATHs which are autocompleted from when doing cd export CDPATH=$CDPATH:~/Code:~/Projects + + +# ---------------------------------------------------------------------- +# Google Cloud SDK +# ---------------------------------------------------------------------- + +if [ -s "$HOME/Code/google-cloud-sdk/" ]; then + source "$HOME/Code/google-cloud-sdk/path.bash.inc" + source "$HOME/Code/google-cloud-sdk/completion.bash.inc" +fi diff --git a/bash_profile b/bash_profile index e4bdcba..5bd2fb4 100644 --- a/bash_profile +++ b/bash_profile @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + ######################################################################## # bash_profile, basically from the whole internet # and a lot from @necolas, @mathiasbynens & @rtomayko @@ -41,8 +43,8 @@ for option in autocd globstar; do done; # Add tab completion for many Bash commands -if which brew > /dev/null && [ -f "$(brew --prefix)/etc/bash_completion" ]; then - source "$(brew --prefix)/etc/bash_completion"; +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; @@ -57,14 +59,6 @@ complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes Syste complete -C aws_completer aws -# ---------------------------------------------------------------------- -# nvm -# ---------------------------------------------------------------------- - -export NVM_DIR="$HOME/.nvm" -. "$(brew --prefix nvm)/nvm.sh" - - # ---------------------------------------------------------------------- # rvm # ---------------------------------------------------------------------- @@ -83,13 +77,3 @@ if [ -f "$HOME/.gnupg/.gpg-agent-info" ] && [ -n "$(pgrep gpg-agent)" ]; then else eval $(gpg-agent --daemon --write-env-file $HOME/.gnupg/.gpg-agent-info) fi - - -# ---------------------------------------------------------------------- -# Google Cloud SDK -# ---------------------------------------------------------------------- - -if [ -s "$HOME/Code/google-cloud-sdk/" ]; then - source "$HOME/Code/google-cloud-sdk/path.bash.inc" - source "$HOME/Code/google-cloud-sdk/completion.bash.inc" -fi diff --git a/bash_prompt b/bash_prompt index 5577724..848b169 100644 --- a/bash_prompt +++ b/bash_prompt @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ######################################################################## # bash_prompt, from @mathiasbynens @@ -109,9 +110,9 @@ else fi; # Set the terminal title to the current working directory. -PS1="\[\033]0;\w\007\]"; +PS1="\[\033]0;\W\007\]"; # working directory base name PS1+="\n"; -PS1+="\[${cyan}\]\w"; # working directory +PS1+="\[${cyan}\]\w"; # working directory full path PS1+="\$(prompt_git \" \[${gray}\]\")"; # Git repository details PS1+="\n"; PS1+="\[${dim}\]→ \[${reset}\]"; # `→` (and reset color) diff --git a/bashrc b/bashrc index c77cd04..29828ea 100644 --- a/bashrc +++ b/bashrc @@ -1 +1,3 @@ -[ -n "$PS1" ] && source ~/.bash_profile \ No newline at end of file +#!/usr/bin/env bash + +[ -n "$PS1" ] && source ~/.bash_profile; diff --git a/bin/colors.sh b/bin/colors.sh index c7b0421..c93b183 100755 --- a/bin/colors.sh +++ b/bin/colors.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # tputcolors echo diff --git a/bin/install.sh b/bin/install.sh index a6a581a..7fb29f2 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # creates symlinks from the home directory to # any desired dotfiles in ~/dotfiles diff --git a/bin/update-everything.sh b/bin/update-everything.sh index 5b554a1..9058d60 100755 --- a/bin/update-everything.sh +++ b/bin/update-everything.sh @@ -13,11 +13,11 @@ echo "$(tput setaf 136)" echo "Update Homebrew " -echo "==============================" +echo "------------------------------" echo "$(tput sgr0)" # reset brew update -brew upgrade --all +brew upgrade brew cleanup @@ -27,7 +27,7 @@ brew cleanup echo "$(tput setaf 136)" echo "Update npm " -echo "=============================" +echo "------------------------------" echo "$(tput sgr0)" # reset # update npm itself @@ -42,12 +42,12 @@ npm update -g echo "$(tput setaf 136)" echo "Update rvm " -echo "=============================" +echo "------------------------------" echo "$(tput sgr0)" # reset # update rvm itself -rvm get stable -rvm reload +# rvm get stable +# rvm reload # update all gemsets rvm gemset update diff --git a/brew.sh b/brew.sh index 58ba770..b1a34ff 100755 --- a/brew.sh +++ b/brew.sh @@ -15,7 +15,14 @@ brew upgrade --all # Install what we need brew install coreutils brew install bash -brew install bash-completion +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; + brew install git brew install node brew install wget diff --git a/exports b/exports index 4e31f27..d76dc58 100644 --- a/exports +++ b/exports @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + # Set architecture flags export ARCHFLAGS="-arch x86_64" @@ -12,4 +14,4 @@ export LSCOLORS=gxfxcxdxbxegedabagacad # pip should only run if there is a virtualenv currently activated export PIP_REQUIRE_VIRTUALENV=true # cache pip-installed packages to avoid re-downloading -export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache \ No newline at end of file +export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache diff --git a/gitconfig b/gitconfig index a336a9c..f773420 100644 --- a/gitconfig +++ b/gitconfig @@ -8,6 +8,8 @@ # name = [user] + name = Matthias Kretschmann + email = m@kretschmann.io signingkey = DD7831FC [commit] @@ -24,7 +26,7 @@ [core] excludesfile = ~/.gitignore - quotepath = false + quotepath = false # Handle umlauts and such better on OS X # for whatever crazy reason this explicitly @@ -37,48 +39,32 @@ trustctime = false [alias] - # View abbreviated SHA, description, and history graph of the latest 20 commits - l = log --pretty=oneline -n 20 --graph --abbrev-commit - ll = log --stat --abbrev-commit - - # View the current working tree status using the short format - s = status -s - - # Clone a repository including all submodules - c = clone --recursive + c = clone --recursive + co = checkout + l = log --oneline --decorate -15 + lo = log --oneline --decorate + s = status -s # Amend the currently staged files to the latest commit amend = commit --amend --reuse-message=HEAD # 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" + dm = "!git branch --merged master | grep -v '\\* master' | xargs -n 1 git branch -d" + + uncommit = reset --soft HEAD^ + unstage = reset HEAD + yolo = push --force [fetch] prune = true -[push] - default = current - [color] diff = auto status = auto branch = auto interactive = auto ui = auto -[color "branch"] - current = green bold - local = green - remote = red bold -[color "diff"] - meta = yellow bold - frag = magenta bold - old = red bold - new = green bold -[color "status"] - added = green bold - changed = yellow bold - untracked = red # Set Kaleidoscope as diff and merge tool [diff] @@ -95,5 +81,7 @@ cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot trustExitCode = true -[ghi] - token = !security find-internet-password -a kremalicious -s github.com -l 'ghi token' -w +[filter "lfs"] + clean = git-lfs clean %f + smudge = git-lfs smudge %f + required = true diff --git a/inputrc b/inputrc index 917b03a..79bf26c 100644 --- a/inputrc +++ b/inputrc @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + # Use case-insensitive TAB autocompletion set completion-ignore-case on @@ -26,4 +28,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 \ No newline at end of file +set convert-meta off diff --git a/npm.sh b/npm.sh index fb04196..78c107f 100755 --- a/npm.sh +++ b/npm.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Installed from brewfile with node diff --git a/ruby.sh b/ruby.sh index 31b9fbc..331bce3 100755 --- a/ruby.sh +++ b/ruby.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Install RVM curl -sSL https://get.rvm.io | bash diff --git a/tm_properties b/tm_properties deleted file mode 100644 index 2ee000e..0000000 --- a/tm_properties +++ /dev/null @@ -1,42 +0,0 @@ -# Settings - -encoding = UTF-8 -fontName = "SourceCodePro-Medium" -fontSize = 12 -lineEndings = '\n' -showInvisibles = false -softWrap = true -softTabs = true -wrapColumn = "Use Window Frame" -tabSize = 4 -spellChecking = false - -# Hidden Settings, to be executed in Terminal -# https://github.com/textmate/textmate/wiki/Hidden-Settings - -# Make file browser a bit more pretty -#defaults write com.macromates.TextMate.preview fileBrowserStyle SourceList - -# Font Smoothing always enabled -#defaults write com.macromates.TextMate.preview fontSmoothing 1 - -# Includes -myExtraIncludes = ".tm_properties,.htaccess,.gitignore,.csslintrc,.jshintrc" -fileBrowserGlob = "{*,$myExtraIncludes}" -include = "{$include,$myExtraIncludes}" - -# Hide directories from search popups. -myExtraExcludes = "log,vendor,tmp,generated,dist,build,node_modules,bower_components" -excludeInFileChooser = "{$excludeInFileChooser,$myExtraExcludes}" -excludeInFolderSearch = "{$excludeInFolderSearch,$myExtraExcludes}" - -# Variables - -TM_FULLNAME = "Matthias Kretschmann" -TM_GIT = "/usr/local/bin/git" - -[ text ] -spellChecking = true - -[ source.plist ] -softTabs = false diff --git a/webstyle.css b/webstyle.css index 47cd3e1..5e7207c 100644 --- a/webstyle.css +++ b/webstyle.css @@ -13,6 +13,17 @@ Application Support/Google/Chrome/Default/User StyleSheets/Custom.css */ + +/* GITLAB + -----------------------------------------*/ + +body.ui_charcoal { + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + text-shadow: none !important; +} + + /* GOOGLE SEARCH -----------------------------------------*/