Giter Site home page Giter Site logo

tools, notes and .dot files

OS X

First start by installing Homebrew using (yes, yes, it's a curl-snatch sigh)

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then run the script that is below to provision our environment

Note -- this is not part of the stored scripts as I want to make sure the steps are purposeful as some of these may overwrite config files that have been tweaked later.

Post Install Items

Copy files from our secure backup:

  • ~/.pypirc
  • ~/.gnupg
  • ~/.ssh -- config and our ssh keys
  • ~/bin/credentials

Provisioning script

#!/bin/bash
set -ex

PLATFORM=`uname`

cd ~
mkdir bin
mkdir temp

if [ "${PLATFORM}" == "Darwin" ] ; then
  brew install git
fi

cd ~/temp
git clone https://github.com/bear/bear

cd ~/temp/bear
cp colours ~/bin/
cp prompt.sh ~/bin/

cat <<EOF > ~/.gnupg/gpg-agent.conf
write-env-file
enable-ssh-support
use-standard-socket
max-cache-ttl 7200
default-cache-ttl 600
pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
EOF

cat <<EOF > ~/.gitconfig
[user]
  name = bear (Mike Taylor)
  email = [email protected]
[core]
  excludesfile = ~/.gitignore
  whitespace = space-before-tab,-indent-with-non-tab,trailing-space
[apply]
  # detect whitespace errors
  whitespace = fix
[push]
  default = simple
  followTags = true
EOF

cat <<EOF > ~/.bash_profile
PATH=${HOME}/bin:$(brew --prefix coreutils)/libexec/gnubin:$(brew --prefix gnu-tar)/libexec/gnubin:${PATH}
export PATH

export PYENV_VIRTUALENV_DISABLE_PROMPT=1
export PYENV_ROOT=/usr/local/var/pyenv
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

if [ -f $(brew --prefix)/etc/bash_completion ]; then
  . $(brew --prefix)/etc/bash_completion
fi

for f in ~/bin/{colours,prompt,aliases,credentials} ; do
  [ -r "${f}" ] && [ -f "${f}" ] && source "${f}"
done

f [ ! -f "${HOME}/.gpg-agent-info" ]; then
  /usr/local/bin/gpg-agent --daemon
fi

. ${HOME}/.gpg-agent-info
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
export SSH_AGENT_PID
export GPG_TTY=$(tty)

export PYTHONIOENCODING="UTF-8"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export MANPAGER="less -X"

EOF

if [ "${PLATFORM}" == "Darwin" ] ; then
  cp p ~/bin/
  cp flushdns.sh ~/bin/
  cp sane_osx_settings.sh ~/bin/

  ~/bin/sane_osx_settings.sh
fi

~/temp/bear/baseline.sh
~/temp/bear/ops-tools.sh
cd ~
echo "Done!"

Credits

Many sources of inspiration for this, some I have carried with me for aeons and have long forgotten who I got them from...

Mike Taylor's Projects

Mike Taylor doesnโ€™t have any public repositories yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.