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
| AWSTemplateFormatVersion: '2010-09-09' | |
| Description: Records difference between Now and Latest Restorable Time of a replicated RDS backup | |
| Parameters: | |
| MetricNamespace: | |
| Type: String | |
| Description: Metric namespace | |
| Mappings: | |
| Configuration: |
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
| AWSTemplateFormatVersion: '2010-09-09' | |
| Transform: AWS::LanguageExtensions | |
| Description: Detects AWS CloudTrail event for the ScheduleKeyDeletion operation | |
| Parameters: | |
| MetricNamespace: | |
| Type: String | |
| Description: Metric namespace | |
| Mappings: |
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
| /** | |
| * @param {number} n | |
| * @return {number} | |
| */ | |
| let stack = {}; | |
| var climbStairs = function(n) { | |
| if (n > 1) | |
| return stack[n] || ( stack[n] = climbStairs(n - 1) + climbStairs(n - 2)) | |
| return 1; | |
| }; |
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
| /** | |
| * @param {number[]} nums | |
| * @return {number[][]} | |
| */ | |
| var threeSum = function(nums) { | |
| nums.sort((a, b) => { return a - b; }); | |
| const result = []; | |
| for (let i = 0; i < (nums.length-2); i ++) { | |
| const a = nums[i]; | |
| if (a > 0) return result; // all other numbers to the right are positive as we are working with sorted array |
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
| Invoke-WebRequest 'http://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi' -OutFile "$($env:TEMP)/WebPlatformInstaller_amd64_en-US.msi" | |
| Start-Process "$($env:TEMP)/WebPlatformInstaller_amd64_en-US.msi" '/qn' -PassThru | Wait-Process | |
| cd 'C:/Program Files/Microsoft/Web Platform Installer'; .\WebpiCmd.exe /Install /Products:'UrlRewrite2,ARRv3_0' /AcceptEULA | |
| function New-Farm($name, $accessName, $port) | |
| { | |
| Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter 'webFarms' -name . -value @{name=$name} | |
| Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "/webFarms/webFarm[@name='$name']" -name . -value @{address='127.0.0.1'} | |
| Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "/webFarms/webFarm[@name='$name']/server[@address='127.0.0.1']" -name applicationRequestRouting -value @{httpPort=$port} | |
| Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter 'system.webServer/rewrite/ |