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
| curl https://youradfsserver.com.au/adfs/services/trust/13/usernamemixed --data @aws_saml_request.xml -H "Content-Type: application/soap+xml" --verbose -o "saml.xml" |
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
| $a = Get-EC2Tag -Filter @{Name="tag:Environment Name"; Value="My Environment"} | |
| New-EC2Tag -Resources $a.ResourceId -Tags @{Key='Project'; Value='My Project'} |
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
| $a = Get-EC2NetworkInterface -Region ap-southeast-2 | |
| $tag = New-Object Amazon.EC2.Model.Tag | |
| $tag.Key = "Environment" | |
| $tag.Value = "Dev" | |
| $count = 0 | |
| $throwError ="" | |
| foreach ($i in $a) { | |
| Clear-Variable -Name throwError #Reset Failure Variable | |
| $count++ | |
| if ($count -gt 0) { |
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
| #!/bin/bash | |
| # bash functions to autenticate and assume roles in aws federated accounts | |
| # required tools on $PATH - aws, date, curl, jq, libxml2-utils | |
| # requried environment variables: | |
| export AWS_CLI=`which aws` | |
| # optional environment variable, to automatically assume a specific role when calling assume() | |
| # AWS_ASSUME_ROLE=arn:aws:iam::369407384105:role/cross-account-federated-role |
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
| ELB_NAME="chef-dev" | |
| #Get Instances | |
| ARRAY=(); for i in \ | |
| `aws elb describe-load-balancers --load-balancer-names $ELB_NAME --output text |grep INSTANCES | awk '{print $2}'`; \ | |
| do ARRAY+=($i); \ | |
| done | |
| #Dereg | |
| for i in "${ARRAY[@]}"; do aws elb deregister-instances-from-load-balancer --load-balancer-name $ELB_NAME --instances $i; done |
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
| 2015/04/02 22:47:09 ui: ==> vmware-vmx: Running post-processor: vagrant-cloud | |
| ==> vmware-vmx: Running post-processor: vagrant-cloud | |
| 2015/04/02 22:47:09 ui: ==> vmware-vmx (vagrant-cloud): Verifying box is accessible: seek/simianarmy-build | |
| ==> vmware-vmx (vagrant-cloud): Verifying box is accessible: seek/simianarmy-build | |
| 2015/04/02 22:47:09 packer-post-processor-vagrant-cloud: 2015/04/02 22:47:09 Post-Processor Vagrant Cloud API GET: https://vagrantcloud.com/api/v1/box/seek/simianarmy-build?access_token=ACCESS_TOKEN | |
| 2015/04/02 22:47:10 packer-post-processor-vagrant-cloud: 2015/04/02 22:47:10 Post-Processor Vagrant Cloud API Response: | |
| 2015/04/02 22:47:10 packer-post-processor-vagrant-cloud: | |
| 2015/04/02 22:47:10 packer-post-processor-vagrant-cloud: &{Status:200 OK StatusCode:200 Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Date:[Thu, 02 Apr 2015 11:47:10 GMT] Etag:["ce6a8a8c23ea72b0361d7dc0bc502f0c"] X-Frame-Options:[SAMEORIGIN] X-Runtime:[0.303958] Cache-Control:[max-age=0, private, must-revalidate] Cont |
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
| { | |
| "variables": { | |
| "cloud_token": "$cloud_token", | |
| "vagrant_box_version": "$vagrant_box_version" | |
| }, | |
| "builders": [ | |
| { | |
| "type": "vmware-vmx", | |
| "source_path": "/Users/lantrix/AWS/simianarmy-build/.vagrant/machines/default/vmware_fusion/54800d00-774d-41b6-b0cf-3a593b08b056/packer-centos-6.6-x86_64.vmx", | |
| "ssh_username": "root", |
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
| import-module webadministration; get-website | select name,id,state,physicalpath,applicationPool, | |
| @{n="Bindings"; e= { ($_.bindings | select -expa collection) -join ';' }} , | |
| @{n="LogFile";e={ $_.logfile | select -expa directory}}, | |
| @{n="attributes"; e={($_.attributes | % { $_.name + "=" + $_.value }) -join ';' }} | Sort-Object id |
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
| ((get-date).ToUniversalTime()).ToString("yyyy-MM-ddTHH:mm:ssZ") |