This file contains 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
# command to run: (if IE is not your default browser, open the URL below in IE) | |
# START http://boxstarter.org/package/nr/url?https://gist.github.com/active-low/2d9a126ccfdaa67bb291/raw/boxstarter-dev-install | |
# or if you install boxstarter first you can run: | |
# Install-BoxstarterPackage -PackageName https://gist.github.com/active-low/2d9a126ccfdaa67bb291/raw/boxstarter-dev-install | |
#$Boxstarter.RebootOk=$true # Allow reboots? | |
#$Boxstarter.NoPassword=$false # Is this a machine with no login password? | |
#$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot | |
Update-ExecutionPolicy Unrestricted |
This file contains 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
# command to run: (if IE is not your default browser, open the URL below in IE) | |
# START http://boxstarter.org/package/nr/url?https://gist.github.com/active-low/d2a2528019e35595255f/raw/boxstarter-dev-azure-vm | |
# or if you install boxstarter first you can run: | |
# Install-BoxstarterPackage -PackageName https://gist.github.com/active-low/d2a2528019e35595255f/raw/boxstarter-dev-azure-vm | |
Update-ExecutionPolicy Unrestricted | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
Enable-MicrosoftUpdate | |
Enable-RemoteDesktop | |
This file contains 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
export HTTP_PROXY=[http://example.com:8080] | |
azure storage account connectionstring show [storage-account-name] | |
export AZURE_STORAGE_CONNECTION_STRING='[connection-string-from-previous-command]' | |
azure storage blob list --account-name [storage-account-name] --container [container-name] |
This file contains 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
[System.Net.WebRequest]::DefaultWebProxy = new-object System.Net.WebProxy("http://exmaple.com:8080") | |
Add-AzureAccount | |
Set-AzureSubscription -CurrentStorageAccountName '[storage-account-name]' -SubscriptionName '[subscription-name]' | |
Get-AzureStorageContainer |
This file contains 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
def job = Jenkins.getInstance().getItem("build name") | |
def build = job.getBuildByNumber(12345) |
This file contains 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
# azure vm list|grep LTS (to find latest ubuntu server image) | |
azure vm create es-cluster b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_2-LTS-amd64-server-20150706-en-us-30GB --location "Central US" --vm-name es-node-0 --vm-size ExtraSmall --ssh 22 --userName <username> | |
ssh es-cluster.cloudapp.net | |
# install java8 | |
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections | |
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update |
This file contains 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 alias for lo0 | |
sudo ifconfig lo0 alias 127.0.1.1 up | |
sudo ifconfig lo0 alias 127.0.1.2 up | |
# /etc/hosts alias | |
127.0.1.1 login.microsoftonline.com | |
127.0.1.2 management.azure.com | |
# ssh tunnel | |
sudo ssh -N -L 127.0.1.1:443:login.microsoftonline.com:443 <user>@<jump-server> | |
sudo ssh -N -L 127.0.1.2:443:management.azure.com:443 <user>@<jump-server> |
This file contains 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
azure storage container create --connection-string '<dest-cxn>' <dest-container> | |
azure storage blob copy start --connection-string '<source-cxn>' --source-container <source-container> --source-blob <disk.vhd> --dest-connection-string '<dest-cxn>' --dest-container <dest-container> --dest-blob <disk.vhd> | |
# watch copy progress | |
azure storage blob copy show --connection-string '<dest-cxn>' --container <dest-container> --blob <disk.vhd> |
This file contains 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
$cxn = (azure storage account connectionstring show --json --resource-group <resource-group> <storage-account>) | Out-String | ConvertFrom-Json | |
$sas = (azure storage blob sas create --json -c $cxn.string <container> <blob> r (Get-Date).AddHours(1).ToUniversalTime().ToString("s")) | Out-String | ConvertFrom-Json | |
$sas.url |
This file contains 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
NEW_USER= | |
sudo useradd $NEW_USER | |
sudo mkdir /home/$NEW_USER/.ssh | |
sudo chown $NEW_USER:$NEW_USER /home/$NEW_USER/.ssh | |
sudo chmod 700 /home/$NEW_USER/.ssh | |
sudo touch /home/$NEW_USER/.ssh/authorized_keys | |
sudo chown $NEW_USER:$NEW_USER /home/$NEW_USER/.ssh/authorized_keys | |
sudo chmod 600 /home/$NEW_USER/.ssh/authorized_keys |
OlderNewer