Skip to content

Instantly share code, notes, and snippets.

@tjhanley
Last active August 29, 2015 14:04
Show Gist options
  • Save tjhanley/67d44b4528354d93ecb9 to your computer and use it in GitHub Desktop.
Save tjhanley/67d44b4528354d93ecb9 to your computer and use it in GitHub Desktop.
New Engineer Setup

What is this?

The goal of this is to have a script so new hires or new machines to get up and running real quick like.

How do I use it?

  • Install XCode from Mac App Store
  • Install Commandline Tools from Xcode> Open Developer Tool> More Developer Tools
  • Install Postgres
    • if you use postgres app use this command to install the gem
    • gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config . –
  • rvm install 2.1.2
  • Simple... run this in your terminal
# install homebrew first
$> ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 
$> curl https://gist.githubusercontent.com/tjhanley/67d44b4528354d93ecb9/raw/setup.sh | sh
echo "welcome :)"
# install git
echo "installing git"
brew install git
# install qt
echo "installing qt"
bre install qt
#echo "setting up your git config"
#read -p "what is your full name?" full_name
#git config --global color.ui true
#git config --global user.name $full_name
#read -p "what is your email address?" email_address
#git config --global user.email $email_address
#echo "generating ssh key"
#ssh-keygen -t rsa -C $email_address
# install rvm
echo "installing rvm"
curl -sSL https://get.rvm.io | bash -s stable
# install ruby 2.1.2
#echo "installing ruby 2.1.2"
#rvm install 2.1.2
# installing memcached
echo "installing memcached"
brew install memcached
# installing redis
echo "installing redis"
brew install redis
mkdir -p ~/Library/LaunchAgents
cp -v /usr/local/Cellar/redis/*/*plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
# installing pow
echo "installing pow"
curl get.pow.cx | sh
echo "you should be able to add your ssh key to your github handle now."
echo "Setup Github Flow: http://datasift.github.io/gitflow/TheHubFlowTools.html"
echo "and get cloning :)"
@BrainScraps
Copy link

here's the output from my brand spankin' new Mavericks MacBook

Isaacs-MacBook-Pro:~ isaac$ curl https://gist.githubusercontent.com/tjhanley/67d44b4528354d93ecb9/raw/setup.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1422    0  1422    0     0   2347      0 --:--:-- --:--:-- --:--:--  2350
welcome :)
installing homebrew & apple developer tools
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> /usr/bin/sudo /bin/mkdir /usr/local

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> Installing the Command Line Tools (expect a GUI popup):
==> /usr/bin/sudo /usr/bin/xcode-select --install
xcode-select: note: install requested for command line developer tools
Press any key when the installation has completed.
stty: stdin isn't a terminal
Failed during: /bin/stty raw -echo
stty: stdin isn't a terminal
Failed during: /bin/stty -raw echo
installing git
sh: line 9: brew: command not found
setting up your git config
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
generating ssh key
Too many arguments.
usage: ssh-keygen [options]
Options:
  -A          Generate non-existent host keys for all key types.
  -a trials   Number of trials for screening DH-GEX moduli.
  -B          Show bubblebabble digest of key file.
  -b bits     Number of bits in the key to create.
  -C comment  Provide new comment.
  -c          Change comment in private and public key files.
  -D pkcs11   Download public key from pkcs11 token.
  -e          Export OpenSSH to foreign format key file.
  -F hostname Find hostname in known hosts file.
  -f filename Filename of the key file.
  -G file     Generate candidates for DH-GEX moduli.
  -g          Use generic DNS resource record format.
  -H          Hash names in known_hosts file.
  -h          Generate host certificate instead of a user certificate.
  -I key_id   Key identifier to include in certificate.
  -i          Import foreign format to OpenSSH key file.
  -J number   Screen this number of moduli lines.
  -j number   Start screening moduli at specified line.
  -K checkpt  Write checkpoints to this file.
  -k          Generate a KRL file.
  -L          Print the contents of a certificate.
  -l          Show fingerprint of key file.
  -M memory   Amount of memory (MB) to use for generating DH-GEX moduli.
  -m key_fmt  Conversion format for -e/-i (PEM|PKCS8|RFC4716).
  -N phrase   Provide new passphrase.
  -n name,... User/host principal names to include in certificate
  -O option   Specify a certificate option.
  -P phrase   Provide old passphrase.
  -p          Change passphrase of private key file.
  -Q          Test whether key(s) are revoked in KRL.
  -q          Quiet.
  -R hostname Remove host from known_hosts file.
  -r hostname Print DNS resource record.
  -S start    Start point (hex) for generating DH-GEX moduli.
  -s ca_key   Certify keys with CA key.
  -T file     Screen candidates for DH-GEX moduli.
  -t type     Specify type of key to create.
  -u          Update KRL rather than creating a new one.
  -V from:to  Specify certificate validity interval.
  -v          Verbose.
  -W gen      Generator to use for generating DH-GEX moduli.
  -y          Read private key file and print public key.
  -z serial   Specify a serial number.
installing rvm
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz

Installing RVM to /Users/isaac/.rvm/
    Adding rvm PATH line to /Users/isaac/.profile /Users/isaac/.bashrc /Users/isaac/.zshrc.
    Adding rvm loading line to /Users/isaac/.bash_profile /Users/isaac/.zlogin.
Installation of RVM in /Users/isaac/.rvm/ is almost complete:

  * To start using RVM you need to run `source /Users/isaac/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

# isaac,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
installing ruby 1.9.3
sh: line 23: rvm: command not found
installing memcached
sh: line 27: brew: command not found
installing redis
sh: line 31: brew: command not found
cp: /usr/local/Cellar/redis/*/*plist: No such file or directory
launchctl: Couldn't stat("/Users/isaac/Library/LaunchAgents/homebrew.mxcl.redis.plist"): No such file or directory
nothing found to load
installing pow
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6887  100  6887    0     0  14269      0 --:--:-- --:--:-- --:--:-- 14258
*** Installing Pow 0.4.3...
*** Installing local configuration files...
/Users/isaac/Library/LaunchAgents/cx.pow.powd.plist
*** Installing system configuration files as root...
Password:
/Library/LaunchDaemons/cx.pow.firewall.plist
/etc/resolver/dev
*** Starting the Pow server...
*** Performing self-test...
*** Installed

For troubleshooting instructions, please see the Pow wiki:
https://github.com/37signals/pow/wiki/Troubleshooting

To uninstall Pow, `curl get.pow.cx/uninstall.sh | sh`
setting up mysql
sh: line 42: brew: command not found
/Users/isaac/Library/LaunchAgents/*plist -> /usr/local/opt/mysql/*plist
launchctl: Couldn't stat("/Users/isaac/Library/LaunchAgents/homebrew.mxcl.mysql.plist"): No such file or directory
nothing found to load
you should be able to add your ssh key to your github handle now.
Setup Github Flow: http://datasift.github.io/gitflow/TheHubFlowTools.html
and get cloning :)

@BrainScraps
Copy link

I think the major breakage happened when the script continued running without the Command Line Tools being finished.

Press any key when the installation has completed.

I don't recall going back to the command line to re-initialize the script - so maybe that's what made all of the subsequent stuff start breaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment