Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| $EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml" | |
| $xml = [xml](get-content $EC2SettingsFile) | |
| $xmlElement = $xml.get_DocumentElement() | |
| foreach ($element in $xmlElement.Property) | |
| { | |
| if ($element.Name -eq "AutoSysprep") | |
| { | |
| $element.Value="Yes" | |
| } |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Threading.Tasks; | |
| namespace PipelineDemo | |
| { | |
| // http://www.rantdriven.com/post/2009/09/16/Simple-Pipe-and-Filters-Implementation-in-C-with-Fluent-Interface-Behavior.aspx | |
| public interface IFilter<TContext> | |
| { |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| # Based on CentOS7 fork of @smartmadsoft: https://gist.github.com/moneytoo/ab3f34e4fddc2110675952f8280f49c5 | |
| # "6" for CentOS6 or Amazon Linux, "7" for CentOS7 | |
| CENTVER="6" | |
| OPENSSL="openssl-1.1.0-pre5" | |
| NGINX="nginx-1.11.0-1" | |
| yum clean all | |
| # Install epel packages (required for GeoIP-devel) |
cd
wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
tar -zxvf go1.6.2.linux-amd64.tar.gz
sudo mv go /usr/local/
export GOROOT=/usr/local/go
mkdir -p ~/gitwork/go/src
mkdir ~/gitwork/go/bin| private static readonly string[] tenHoursOfFun = | |
| { | |
| "https://www.youtube.com/watch?v=wbby9coDRCk", | |
| "https://www.youtube.com/watch?v=nb2evY0kmpQ", | |
| "https://www.youtube.com/watch?v=eh7lp9umG2I", | |
| "https://www.youtube.com/watch?v=z9Uz1icjwrM", | |
| "https://www.youtube.com/watch?v=Sagg08DrO5U", | |
| "https://www.youtube.com/watch?v=5XmjJvJTyx0", | |
| "https://www.youtube.com/watch?v=IkdmOVejUlI", | |
| "https://www.youtube.com/watch?v=jScuYd3_xdQ", |
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$True,Position=1)] | |
| [string]$subscription, | |
| [Parameter(Mandatory=$True,Position=2)] | |
| [string]$service, | |
| [Parameter(Mandatory=$True,Position=3)] | |
| [string]$projectName, |
| # Get IAM Role name from Instance Profile Id | |
| curl http://169.254.169.254/latest/meta-data/iam/info | |
| # Get credentials | |
| curl http://169.254.169.254/latest/meta-data/iam/security-credentials/<role-name> | |
| # More info | |
| http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html | |
| Get-Project –All | Add-BindingRedirect | |
| # On large projects commands like `Update-Package -Reinstall` can take HOURS | |
| # If the updates are broken up, then don't lock up the IDE and complete much faster (minutes vs hours) | |
| # Reinstall all packages that match a specific targetFramework | |
| # Useful when retargeting | |
| gci -recurse packages.config | % { [xml]$XmlDocument = Get-Content -Path $_.FullName; $XmlDocument.packages.package | ? { $_.targetFramework -eq 'net462' } | select id | sort-object -unique | % { update-package -reinstall $_.id } } | |
| # Reinstall all packages that have been marked with requireReinstallation |
| using System.Net.Http; | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var client = new HttpClient(); | |
| var batchRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:3440/api/batch"); |