Last active
October 11, 2017 15:45
-
-
Save bubba-h57/772dcf865ebfe1f5cdf4 to your computer and use it in GitHub Desktop.
Revisions
-
bubba-h57 revised this gist
Feb 9, 2016 . 4 changed files with 20 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,16 +8,16 @@ ## # Handle some generic stuff ## source $HOMESTEAD_SCRIPTS/importEnvVars.sh source $HOMESTEAD_SCRIPTS/installAptPackages.sh source $HOMESTEAD_SCRIPTS/configureAWS.sh source $HOMESTEAD_SCRIPTS/configureSSH.sh source $HOMESTEAD_SCRIPTS/configureGit.sh source $HOMESTEAD_SCRIPTS/configureComposer.sh source $HOMESTEAD_SCRIPTS/configureZSH.sh ## # Customize some stuff ## echo "source $STS_HOME/etc/zsh/.zshrc" >> /home/vagrant/.zshrc This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,7 @@ cat <<EOT > /home/vagrant/.gitconfig lol = log --graph --decorate --pretty=oneline --abbrev-commit --all [credential] helper = cache username = $GIT_HUB_USER_NAME [push] default = simple EOT @@ -23,3 +24,5 @@ FullAccess - $GIT_HUB_TOKEN EOT updateAuth /home/vagrant/.gitconfig 0600 updateAuth /home/vagrant/.gittokens 0600 git config user.name "Bubba" git config user.email "[email protected]" This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,3 +9,15 @@ cp $MY_ID_RSA /home/vagrant/.ssh/id_rsa cp $MY_ID_RSA_PUB /home/vagrant/.ssh/id_rsa.pub updateAuth /home/vagrant/.ssh/id_rsa 0600 updateAuth /home/vagrant/.ssh/id_rsa.pub cat <<EOT > /home/vagrant/.ssh/config Host github.com StrictHostKeyChecking no User git IdentityFile /home/vagrant/.ssh/id_rsa Host gist.github.com StrictHostKeyChecking no User git IdentityFile /home/vagrant/.ssh/id_rsa EOT updateAuth /home/vagrant/.ssh/config This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,4 @@ # I like to update apt-get and I know I want imagemagick installed, so lets get that out of the way apt-get update apt-get install -y imagemagick expect --fix-missing -
bubba-h57 revised this gist
Feb 9, 2016 . 7 changed files with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/bin/bash source $HOMESTEAD_SCRIPTS/helperFunctions.sh ############################################################################### # # Setup AWS # ############################################################################### @@ -20,4 +20,4 @@ region=$AWS_DEFAULT_REGION EOT updateAuth /home/vagrant/.aws 0755 updateAuth /home/vagrant/.aws/config 0600 updateAuth /home/vagrant/.aws/credentials 0600 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/bin/bash source $HOMESTEAD_SCRIPTS/helperFunctions.sh ############################################################################### # # Setup Composer # ############################################################################### @@ -13,4 +13,4 @@ cat <<EOT > /home/vagrant/.composer/auth.json } } EOT updateAuth /home/vagrant/.composer/auth.json 0600 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/bin/bash source $HOMESTEAD_SCRIPTS/helperFunctions.sh ############################################################################### # # Setup git # ############################################################################### @@ -22,4 +22,4 @@ cat <<EOT > /home/vagrant/.gittokens FullAccess - $GIT_HUB_TOKEN EOT updateAuth /home/vagrant/.gitconfig 0600 updateAuth /home/vagrant/.gittokens 0600 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/bin/bash source $HOMESTEAD_SCRIPTS/helperFunctions.sh ############################################################################### # # Setup ZSH # ############################################################################### @@ -26,4 +26,4 @@ fi EOT grep export /home/vagrant/.profile | while read line; do echo "$line" >> /home/vagrant/.zshrc; done updateAuth /home/vagrant/.zshrc chsh -s /usr/bin/zsh vagrant This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ if [ "$HELPERS_LOADED" = true ] ; then fi # Helper function for ensuring permissions are correct updateAuth () { if [ -z "$1" ] then return 0 @@ -25,4 +25,4 @@ updateAuth () { chmod -R $THISPERM $THISPATH } HELPERS_LOADED=true This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,4 +10,4 @@ grep export /home/vagrant/.profile |while read -r line; do echo "$line" >> $ENVARS done source $ENVARS This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,4 @@ # I like to update apt-get and I know I want imagemagick installed, so lets get that out of the way apt-get update apt-get install -y imagemagick --fix-missing -
bubba-h57 revised this gist
Feb 9, 2016 . 2 changed files with 5 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,5 +20,4 @@ source $HOMESTEAD_SCRIPTS/configureZSH.sh ## # Customize some stuff ## echo "source $STS_HOME/etc/zsh/.zshrc" >> /home/vagrant/.zshrc This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ #!/bin/bash source $HOMESTEAD_SCRIPTS/helperFunctions.sh ############################################################################### # # Setup SSH # ############################################################################### cp $MY_ID_RSA /home/vagrant/.ssh/id_rsa cp $MY_ID_RSA_PUB /home/vagrant/.ssh/id_rsa.pub updateAuth /home/vagrant/.ssh/id_rsa 0600 updateAuth /home/vagrant/.ssh/id_rsa.pub -
bubba-h57 revised this gist
Feb 5, 2016 . 6 changed files with 13 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,16 +4,17 @@ # add any commands you wish to this file and they will # be run after the Homestead machine is provisioned. ## # Handle some generic stuff ## source $HOMESTEAD_SCRIPTS/importEnvVars.sh source $HOMESTEAD_SCRIPTS/installAptPackages.sh source $HOMESTEAD_SCRIPTS/configureAWS.sh source $HOMESTEAD_SCRIPTS/configureSSH.sh source $HOMESTEAD_SCRIPTS/configureComposer.sh source $HOMESTEAD_SCRIPTS/configureGit.sh source $HOMESTEAD_SCRIPTS/configureZSH.sh ## This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/bash source $HOMESTEAD_SCRIPTS/helperFunctions.sh ############################################################################### # # Setup AWS This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/bash source $HOMESTEAD_SCRIPTS/helperFunctions.sh ############################################################################### # # Setup Composer This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/bash source $HOMESTEAD_SCRIPTS/helperFunctions.sh ############################################################################### # # Setup git This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/bash source $HOMESTEAD_SCRIPTS/helperFunctions.sh ############################################################################### # # Setup SSH This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/bash source $HOMESTEAD_SCRIPTS/helperFunctions.sh ############################################################################### # # Setup ZSH -
bubba-h57 revised this gist
Feb 5, 2016 . 9 changed files with 165 additions and 136 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,141 +4,20 @@ # add any commands you wish to this file and they will # be run after the Homestead machine is provisioned. ## # Handle some generic stuff ## source ./importEnvVars.sh source ./installAptPackages.sh source ./configureAWS.sh source ./configureSSH.sh source ./configureComposer.sh source ./configureGit.sh source ./configureZSH.sh ## # Customize some stuff ## echo "source $STS_HOME/etc/zsh/.zshrc" >> /home/vagrant/.zshrc This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #!/bin/bash source ./helperFunctions.sh ############################################################################### # # Setup AWS # ############################################################################### mkdir -p /home/vagrant/.aws cat <<EOT > /home/vagrant/.aws/config [default] aws_access_key_id=$AWS_ACCESS_KEY_ID aws_secret_access_key=$AWS_SECRET_ACCESS_KEY region=$AWS_DEFAULT_REGION EOT cat <<EOT > /home/vagrant/.aws/credentials [Credentials] aws_access_key_id=$AWS_ACCESS_KEY_ID aws_secret_access_key=$AWS_SECRET_ACCESS_KEY region=$AWS_DEFAULT_REGION EOT updateAuth /home/vagrant/.aws 0755 updateAuth /home/vagrant/.aws/config 0600 updateAuth /home/vagrant/.aws/credentials 0600 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #!/bin/bash source ./helperFunctions.sh ############################################################################### # # Setup Composer # ############################################################################### cat <<EOT > /home/vagrant/.composer/auth.json { "http-basic": {}, "github-oauth": { "github.com": "$GIT_HUB_TOKEN" } } EOT updateAuth /home/vagrant/.composer/auth.json 0600 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ #!/bin/bash source ./helperFunctions.sh ############################################################################### # # Setup git # ############################################################################### cat <<EOT > /home/vagrant/.gitconfig [user] name = $GIT_AUTHOR_NAME email = $GIT_AUTHOR_EMAIL [core] editor = vi [alias] lol = log --graph --decorate --pretty=oneline --abbrev-commit --all [credential] helper = cache [push] default = simple EOT cat <<EOT > /home/vagrant/.gittokens FullAccess - $GIT_HUB_TOKEN EOT updateAuth /home/vagrant/.gitconfig 0600 updateAuth /home/vagrant/.gittokens 0600 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ #!/bin/bash source ./helperFunctions.sh ############################################################################### # # Setup SSH # ############################################################################### cp MY_ID_RSA /home/vagrant/.ssh/id_rsa cp MY_ID_RSA_PUB /home/vagrant/.ssh/id_rsa.pub updateAuth /home/vagrant/.ssh/id_rsa 0600 updateAuth /home/vagrant/.ssh/id_rsa.pub This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ #!/bin/bash source ./helperFunctions.sh ############################################################################### # # Setup ZSH # ############################################################################### apt-get install zsh -y # If it doesn't exist, lets clone it export ZSH=/home/vagrant/.oh-my-zsh if [ ! -d "$ZSH" ]; then git clone git://github.com/robbyrussell/oh-my-zsh.git $ZSH fi chown -R vagrant:vagrant $ZSH cat <<EOT > /home/vagrant/.zshrc #!/usr/bin/zsh # Path to our oh-my-zsh installation. export ZSH=/home/vagrant/.oh-my-zsh # If it doesn't exist, lets clone it if [ ! -d "\$ZSH" ]; then git clone git://github.com/robbyrussell/oh-my-zsh.git \$ZSH fi EOT grep export /home/vagrant/.profile | while read line; do echo "$line" >> /home/vagrant/.zshrc; done updateAuth /home/vagrant/.zshrc chsh -s /usr/bin/zsh vagrant This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ #!/bin/bash if [ "$HELPERS_LOADED" = true ] ; then #we have already been loaded. return; fi # Helper function for ensuring permissions are correct updateAuth () { if [ -z "$1" ] then return 0 else THISPATH="$1" fi if [ -z "$2" ] then THISPERM="0644" else THISPERM="$2" fi chown -R vagrant:vagrant $THISPATH chmod -R $THISPERM $THISPATH } HELPERS_LOADED=true This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ #!/bin/bash # Lets be clever and pull the environment variables stored in our Homestead.yaml # Those are written to /home/vagrant/.profile, so we can can just parse them # From there and ensure we have them available as root for provosioning. ENVARS="$(mktemp)" grep export /home/vagrant/.profile |while read -r line; do echo "$line" >> $ENVARS done source $ENVARS This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ #!/bin/bash # I like to update apt-get and I know I want imagemagick installed, so lets get that out of the way apt-get update apt-get install -y imagemagick --fix-missing -
bubba-h57 renamed this gist
Feb 5, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
bubba-h57 revised this gist
Feb 2, 2016 . 1 changed file with 25 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ variables: - key: STS_USER value: "<your name>" - key: STS_HOME value: "<your customized home dir>" - key: AWS_ACCESS_KEY_ID value: "<your key>" - key: AWS_SECRET_ACCESS_KEY value: "<your secret>" - key: AWS_DEFAULT_REGION value: "<your region>" - key: GIT_AUTHOR_NAME value: "<your name>" - key: GIT_AUTHOR_EMAIL value: "<your email>" - key: GIT_COMMITTER_NAME value: "<your name>" - key: GIT_COMMITTER_EMAIL value: "<your email>" - key: GIT_HUB_TOKEN value: "<your github token>" - key: MY_ID_RSA value: "<your path to the desired RSA key>" - key: MY_ID_RSA_PUB value: "<your path to the desired RSA pub file>" -
bubba-h57 created this gist
Feb 2, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,144 @@ #!/bin/bash # If you would like to do some extra provisioning you may # add any commands you wish to this file and they will # be run after the Homestead machine is provisioned. # Lets be clever and pull the environment variables stored in our Homestead.yaml # Those are written to /home/vagrant/.profile, so we can can just parse them # From there and ensure we have them available as root for provosioning. ENVARS="$(mktemp)" grep export /home/vagrant/.profile |while read -r line; do echo "$line" >> $ENVARS done source $ENVARS # I like to update apt-get and I know I want imagemagick installed, so lets get that out of the way apt-get update apt-get install -y imagemagick --fix-missing # Helper function for ensuring permissions are correct updateAuth () { if [ -z "$1" ] then return 0 else THISPATH="$1" fi if [ -z "$2" ] then THISPERM="0644" else THISPERM="$2" fi chown -R vagrant:vagrant $THISPATH chmod -R $THISPERM $THISPATH } ############################################################################### # # Setup AWS # ############################################################################### mkdir -p /home/vagrant/.aws cat <<EOT > /home/vagrant/.aws/config [default] aws_access_key_id=$AWS_ACCESS_KEY_ID aws_secret_access_key=$AWS_SECRET_ACCESS_KEY region=$AWS_DEFAULT_REGION EOT cat <<EOT > /home/vagrant/.aws/credentials [Credentials] aws_access_key_id=$AWS_ACCESS_KEY_ID aws_secret_access_key=$AWS_SECRET_ACCESS_KEY region=$AWS_DEFAULT_REGION EOT updateAuth /home/vagrant/.aws 0755 updateAuth /home/vagrant/.aws/config 0600 updateAuth /home/vagrant/.aws/credentials 0600 ############################################################################### # # Setup SSH # ############################################################################### cp MY_ID_RSA /home/vagrant/.ssh/id_rsa cp MY_ID_RSA_PUB /home/vagrant/.ssh/id_rsa.pub updateAuth /home/vagrant/.ssh/id_rsa 0600 updateAuth /home/vagrant/.ssh/id_rsa.pub ############################################################################### # # Setup Composer # ############################################################################### cat <<EOT > /home/vagrant/.composer/auth.json { "http-basic": {}, "github-oauth": { "github.com": "$GIT_HUB_TOKEN" } } EOT updateAuth /home/vagrant/.composer/auth.json 0600 ############################################################################### # # Setup git # ############################################################################### cat <<EOT > /home/vagrant/.gitconfig [user] name = $GIT_AUTHOR_NAME email = $GIT_AUTHOR_EMAIL [core] editor = vi [alias] lol = log --graph --decorate --pretty=oneline --abbrev-commit --all [credential] helper = cache [push] default = simple EOT cat <<EOT > /home/vagrant/.gittokens FullAccess - $GIT_HUB_TOKEN EOT updateAuth /home/vagrant/.gitconfig 0600 updateAuth /home/vagrant/.gittokens 0600 ############################################################################### # # Setup ZSH # ############################################################################### apt-get install zsh -y # If it doesn't exist, lets clone it export ZSH=/home/vagrant/.oh-my-zsh if [ ! -d "$ZSH" ]; then git clone git://github.com/robbyrussell/oh-my-zsh.git $ZSH fi chown -R vagrant:vagrant $ZSH cat <<EOT > /home/vagrant/.zshrc #!/usr/bin/zsh # Path to our oh-my-zsh installation. export ZSH=/home/vagrant/.oh-my-zsh # If it doesn't exist, lets clone it if [ ! -d "\$ZSH" ]; then git clone git://github.com/robbyrussell/oh-my-zsh.git \$ZSH fi EOT grep export /home/vagrant/.profile | while read line; do echo "$line" >> /home/vagrant/.zshrc; done echo "source $STS_HOME/etc/zsh/.zshrc" >> /home/vagrant/.zshrc updateAuth /home/vagrant/.zshrc chsh -s /usr/bin/zsh vagrant