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 characters
# Configure PowerShell Execution Policy | |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force | |
# Install Chocolatey | |
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) | |
# Install the required apps | |
choco install git.install -y | |
choco install virtualbox -y | |
choco install vagrant -y |
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 characters
# Create knife.rb config - more details here https://docs.chef.io/config_rb_knife.html | |
atom ~/.chef/knife.rb | |
# Create Berksfile config - more details here http://berkshelf.com/ | |
atom ~/.berkshelf/config.json | |
# Verify you can communicate with the chef server | |
knife user list |
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 characters
# Install vagrant plugins | |
vagrant plugin install 'vagrant-berkshelf' | |
vagrant plugin install 'vagrant-dsc' | |
vagrant plugin install 'vagrant-omnibus' | |
vagrant plugin install 'vagrant-reload' | |
vagrant plugin install 'vagrant-vbguest' | |
vagrant plugin install 'vagrant-vbox-snapshot' | |
vagrant plugin install 'vagrant-winrm' | |
vagrant plugin install 'winrm-fs' |
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 characters
# Add Path Variable ssh-keygen path in the git folder - do this manually if you aren't using the function | |
Add-PathVariable -Path 'C:\Program Files\Git\usr\bin' | |
# Generate SSH Key - accept the defaults | |
ssh-keygen -t rsa -b 4096 -C "[email protected]" -P <SomePassPhrase> | |
# Add your key to the ssh-agent which will prevent you having to enter in the passphrase every time the key is used | |
ssh-add ~/.ssh/id_rsa | |
# Copy the contents of the key to the clipboard |
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 characters
# Linter to validate the code as you are typing | |
apm install linter | |
# Install rubocop gem | |
gem install rubocop | |
# Linter for ruby | |
apm install linter-rubocop | |
# Rubocop auto corrector |
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 characters
# Create a symlink to the profile in your shared drive | |
cmd /c mklink $PROFILE D:\DataHodge\Dropbox\PSProfile\Microsoft.PowerShell_profile.ps1 | |
# Load the profile into the current session | |
. $PROFILE |
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 characters
$webData = @{ | |
name = 'Matt' | |
fontcolor = 'red' | |
type = 'beer' | |
price = '6.00' | |
age = 29 | |
} | |
$htmlPage = " |
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 characters
# When our string contains double quotes | |
$myItem = @{ | |
name = 'Matt' | |
age = 29 | |
} | |
$myStringBackTicks = "The user `"$($myItem.name)`" is of age `"$($myItem.age)`"" | |
$myStringDoubleQuotes = "The user ""$($myItem.name)"" is of age ""$($myItem.age)""" | |
Write-Output $myStringBackTicks |
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 characters
# When our string contains single quotes | |
$myItem = @{ | |
name = 'Matt' | |
age = 29 | |
} | |
$myString = "The user '$($myItem.name)' is of age '$($myItem.age)'" | |
Write-Output $myString |
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 characters
# Create a hash table for the item and use double quotes | |
$myItem = @{ | |
type = 'Beer' | |
price = '$6.00' | |
} | |
$myString = "The price of a $myItem.type is $myItem.price" | |
Write-Output $myString |