1
0
mirror of https://github.com/kremalicious/dotfiles.git synced 2024-11-21 17:27:13 +01:00
This commit is contained in:
Matthias Kretschmann 2019-06-08 02:42:18 +02:00
parent 5fd7a65e34
commit cfa1231b94
Signed by: m
GPG Key ID: 606EEEF3C479A91F
13 changed files with 56 additions and 61 deletions

View File

@ -1,11 +1,9 @@
dist: xenial
language: bash
# Use container-based infrastructure for quicker build start-up
sudo: false
before_install:
- sudo apt-get -qq update
- sudo apt-get install shellcheck
- sudo apt-get install -y shellcheck
script:
- bash -c 'shopt -s globstar; shellcheck **/bash*'

View File

@ -11,6 +11,7 @@ alias ..="cd .."
alias ...="cd ../.."
alias ~="cd ~"
alias f='open .'
alias c='/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code .'
# Update All The Things
@ -21,10 +22,10 @@ alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1"
# Copy SSH public key to pasteboard
alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | printf '\$(tput setaf 64)✓ Public SSH key copied to pasteboard.\$(tput sgr0)\n'"
alias pubkey='more ~/.ssh/id_rsa.pub | pbcopy | printf "✓ Public SSH key copied to pasteboard.\n"'
# Copy GPG public key to pasteboard
alias gpgpubkey="gpg --export --armor 0xDD7831FC | pbcopy | printf '\$(tput setaf 64)✓ Public GPG key copied to pasteboard.\$(tput sgr0)\n'"
alias gpgpubkey='gpg --export --armor $GPG_KEY_ID | pbcopy | printf "✓ Public GPG key copied to pasteboard.\n"'
# Recursively delete `.DS_Store` files
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"

View File

@ -17,5 +17,9 @@ export LSCOLORS=gxfxcxdxbxegedabagacad
# export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
# go
# export GOPATH=$HOME/.go
# export GOROOT=/usr/local/opt/go/libexec
export GOPATH=$HOME/.go
export GOROOT=/usr/local/opt/go/libexec
# ffi
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"

View File

@ -8,8 +8,10 @@ declare -a dirs_to_prepend=(
"/usr/local/bin" # Ensure that this bin always takes precedence over `/usr/bin`
# "$(brew --prefix node)/bin" # Add npm/yarn-installed package bin
"$(brew --prefix openssl)/bin" # Add newer OpenSSL
# "$GOPATH/bin"
# "$GOROOT/bin"
"$(brew --prefix ruby)/bin"
"/usr/local/lib/ruby/gems/2.5.0/bin"
"$GOPATH/bin"
"$GOROOT/bin"
"$HOME/.bin"
# "$HOME/.rvm/bin"
)

View File

@ -60,12 +60,24 @@ shopt -s checkwinsize
# Automatically trim long paths in the prompt (requires Bash 4.x)
PROMPT_DIRTRIM=4
# 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 command -v 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
if type brew 2&>/dev/null; then
for completion_file in $(brew --prefix)/etc/bash_completion.d/*; do
# shellcheck disable=SC1091
source "$completion_file"
done
for completion_file in "$(brew --prefix)"/etc/bash_completion.d/*; do
source "$completion_file"
done
fi
# Perform file completion in a case insensitive fashion
@ -105,7 +117,8 @@ complete -C aws_completer aws
if [ -s "$HOME/.nvm" ]; then
export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"
[ -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
fi
# ----------------------------------------------------------------------

View File

@ -30,13 +30,15 @@ brew install \
wget \
gpg \
nvm \
pandoc \
pinentry-mac \
openssl \
tor \
python \
rclone \
rsync \
ruby \
shellcheck \
yarn \
ipfs \
clamav

View File

@ -10,7 +10,7 @@
set e
# list of files/folders to symlink in homedir
FILES="bash_aliases bashrc bash_profile bash_paths bash_prompt bash_exports gemrc gitconfig gitignore hushlogin inputrc private npmrc bin tmux.conf vimrc"
FILES="bash_aliases bashrc bash_profile bash_paths bash_prompt bash_exports gitconfig gitignore hushlogin inputrc private bin tmux.conf vimrc"
# ----------------------------------------------------------------------
# create the private file first, will be symlinked but ignored by git
@ -61,13 +61,13 @@ echo " ✓ done$(tput sgr0)"
# Ruby
# ----------------------------------------------------------------------
echo "$(tput setaf 136) Ruby all the things. "
echo "=============================================$(tput sgr0)"
# echo "$(tput setaf 136) Ruby all the things. "
# echo "=============================================$(tput sgr0)"
./bin/install-ruby.sh
# ./bin/install-ruby.sh
echo "$(tput setaf 64)---------------------------------------------"
echo " ✓ done$(tput sgr0)"
# echo "$(tput setaf 64)---------------------------------------------"
# echo " ✓ done$(tput sgr0)"
echo "$(tput setaf 64)============================================="
echo " ✓ all done"

View File

@ -1,27 +0,0 @@
#!/usr/bin/env bash
#
#
# Prerequisite:
# rclone configured with:
# - remote Amazon Cloud Drive named `amazon`
# - remote AWS S3 named `s3`
#
# brew install rclone
# rclone config
#
# http://rclone.org/commands/rclone_copy/
# http://rclone.org/commands/rclone_sync/
DEFAULTS_AMAZON='--exclude .DS_Store'
# Sync up Movies
rclone sync "$MOVIES_DIR" amazon:/Movies "$DEFAULTS_AMAZON"
# Sync up TV Shows
rclone sync "$TVSHOWS_DIR" amazon:"/TV Shows" "$DEFAULTS_AMAZON"
# Sync up iTunes
rclone sync "$ITUNES_DIR" amazon:/Music/iTunes "$DEFAULTS_AMAZON"
# Sync down all S3 buckets
#rclone sync s3: $S3BACKUP_DIR

View File

@ -8,7 +8,7 @@
########################################################################
# list of files/folders to symlink in homedir
FILES="bash_aliases bashrc bash_profile bash_paths bash_prompt bash_exports editorconfig gemrc gitconfig gitignore hushlogin inputrc private npmrc bin tmux.conf vimrc"
FILES="bash_aliases bashrc bash_profile bash_paths bash_prompt bash_exports editorconfig gitconfig gitignore hushlogin inputrc private bin tmux.conf vimrc"
for FILE in $FILES; do

View File

@ -5,12 +5,11 @@
# macOS
# -------------
echo ""
echo "$(tput setaf 3) Update macOS Apps"
echo "------------------------------$(tput sgr0)"
#sudo softwareupdate -i -a
# echo ""
# echo "$(tput setaf 3) Update macOS Apps"
# echo "------------------------------$(tput sgr0)"
# sudo softwareupdate -i -a
# mas upgrade
#
@ -28,7 +27,7 @@ brew cleanup
#
# npm
# Node.js & npm
# -------------
echo ""
@ -36,6 +35,9 @@ echo ""
echo "$(tput setaf 3) Update npm"
echo "------------------------------$(tput sgr0)"
# Update to latest nvm Node.js
nvm install node
# update npm itself
npm install npm -g

1
gemrc
View File

@ -1 +0,0 @@
gem: --no-document

View File

@ -25,16 +25,19 @@
excludesfile = ~/.gitignore
quotepath = false
# Handle umlauts and such better on OS X
# Handle umlauts and such better on macOS
# for whatever crazy reason this explicitly
# has to be set to false so tracked files with
# special characters don't get treated as untracked
precomposeunicode = false
# Make `git rebase` safer on OS X
# Make `git rebase` safer on macOS
# More info: http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/
trustctime = false
# Be case sensitive on case insensitive systems
ignorecase = false
[alias]
c = clone --recursive
co = checkout

2
npmrc
View File

@ -1,2 +0,0 @@
loglevel=warn
sign-git-tag=true