Install node:
brew install node
sudo npm install npm -g
Install node packages for dev:
npm install -g typings
npm install -g azure-cli
npm install -g jshint
| Get-ADComputer -Filter * -SearchBase 'OU= SERVERS, DC=domain_name,DC=net' -Properties * | Where-Object {$_.serviceprincipalname -like '*exchange*'} |select-object name |
| $EC2SettingsFile='C:\Program Files\Amazon\Ec2ConfigService\Settings\Config.xml' | |
| $xml = [xml](get-content $EC2SettingsFile) | |
| $xmlElement = $xml.get_DocumentElement() | |
| $xmlElementToModify = $xmlElement.Plugins | |
| foreach ($element in $xmlElementToModify.Plugin) { | |
| if ($element.name -eq 'Ec2SetPassword') { | |
| $element.State='Enabled' | |
| } | |
| } | |
| $xml.Save($EC2SettingsFile) |
| echo This task runs after the reboot task, as a buffer between the reboot script and the real reboot. | |
| echo That is, THIS task will get all the INTERRUPTED errors, not the real scripts. | |
| # Note: This script depends on the host machine's reboot process removing the 'rebooting=true' line from the buildAgent.properties | |
| # See the plist in this gist, or add it to your rc.local. | |
| echo Uptime: | |
| uptime | |
| echo Infinite loop until machine reboot, unless reboot is already complete: |
| $username = "%buildAgentAccessUser%" | |
| $password = "%buildAgentAccessPassword%" | |
| $authInfo = $username + ":" + $password | |
| $authInfo = [System.Convert]::ToBase64String([System.Text.Encoding]::Default.GetBytes($authInfo)) | |
| $uri = "%teamcity.serverUrl%/httpAuth/app/rest/agents/name:%teamcity.agent.name%/id" | |
| #With thanks to Ivan Leonenko Blog https://ileonenko.wordpress.com/2012/09/21/start-teamcity-build-via-web-request-with-powershell-script/ | |
| $webRequest = [System.Net.WebRequest]::Create($uri) | |
| $webRequest.Headers["Authorization"] = "Basic " + $authInfo |
| #requires -Version 4 | |
| <# | |
| .SYNOPSIS | |
| Will update a cloudformation template with an AWS AMI provided from a build artifact of a TeamCity build | |
| .Description | |
| When TeamCity has a build that runs packer, and spits out an AMI as an artifact, | |
| this cmdlet can be used in a subsequent build - maybe triggered by the first build. | |
| The cmdlet will then take the artifact from the fist build that spits out the AMI id and | |
| update the cloudformation with the new AMI. | |
| .EXAMPLE |
| <?xml version="1.0" encoding="utf-8"?> | |
| <AdminDeploymentCustomizations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/wix/2011/AdminDeployment"> | |
| <BundleCustomizations TargetDir="C:\Program Files (x86)\Microsoft Visual Studio 14.0" NoCacheOnlyMode="default" NoWeb="default" NoRefresh="default" SuppressRefreshPrompt="default" Feed="default" /> | |
| <SelectableItemCustomizations> | |
| <SelectableItemCustomization Id="VSUV2RTMV2" Hidden="no" Selected="yes" FriendlyName="Visual Studio 2015 Update 2" /> | |
| <SelectableItemCustomization Id="MicroUpdateV2.2" Selected="yes" FriendlyName="Update for Microsoft Visual Studio 2015 (KB3151378)" /> | |
| <SelectableItemCustomization Id="WebToolsV1" Hidden="no" Selected="yes" FriendlyName="Microsoft Web Developer Tools" /> | |
| <SelectableItemCustomization Id="GitForWindowsx64V3" Hidden="no" Selected="yes" FriendlyName="Git for Windows" /> | |
| <SelectableItemCustomization Id="GitForWindowsx86V3" |
| # Your account access key - must have read access to your S3 Bucket | |
| $accessKey = "YOUR-ACCESS-KEY" | |
| # Your account secret access key | |
| $secretKey = "YOUR-SECRET-KEY" | |
| # The region associated with your bucket e.g. eu-west-1, us-east-1 etc. (see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-regions) | |
| $region = "eu-west-1" | |
| # The name of your S3 Bucket | |
| $bucket = "my-test-bucket" | |
| # The folder in your bucket to copy, including trailing slash. Leave blank to copy the entire bucket | |
| $keyPrefix = "my-folder/" |
| #get the credential | |
| $cred = get-credential | |
| $OU = "OU=Windows 10 Laptops,OU=Laptops,OU=MOE Workstations,DC=corp,DC=network" | |
| # enter the computer in the right place | |
| Add-Computer -DomainName EPFL -Credential $cred -OUPath $OU | |
| # rename the computer with credential (because we are in the domain) | |
| $Computer = Get-WmiObject Win32_ComputerSystem | |
| $r = $Computer.Rename("NewComputerName", $cred.GetNetworkCredential().Password, $cred.Username) |
| REPORTER = spec | |
| all: jshint test | |
| test: | |
| @NODE_ENV=test ./node_modules/.bin/mocha --recursive --reporter $(REPORTER) --timeout 3000 | |
| jshint: | |
| jshint lib examples test index.js |
Install node:
brew install node
sudo npm install npm -g
Install node packages for dev:
npm install -g typings
npm install -g azure-cli
npm install -g jshint