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
| { | |
| "Name": "mysqlContributor", | |
| "IsCustom": true, | |
| "Description": "Can operate Azure Database for MySQL.", | |
| "Actions": [ | |
| "*/read", | |
| "Microsoft.Network/virtualNetworks/*", | |
| "Microsoft.Resources/subscriptions/*/read", | |
| "Microsoft.DBforMySQL/*/read", | |
| "Microsoft.DBforMySQL/register/*", |
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
| # prepare credential | |
| Set-AWSCredential -ProfileName **** | |
| $env:AWS_PROFILE='****' | |
| $ts_begin = get-date | |
| Function Get-EC2PeakCPU ($region, $instanceId) { | |
| # Last 7 Days (1w) | |
| $cw_data = Get-CWMetricStatistic -Region $region -MetricName CPUUtilization ` |
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
| Function Invoke-UpgradeGeoIpDatabase { | |
| $local_path = 'c:\tools\maxmind\geoip2' | |
| $tgz_format_list = @" | |
| https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz | |
| https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz | |
| https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz | |
| "@ -split "`n" -notmatch '^#.*' | ForEach-Object { $_.trim() } | |
| $zip_format_list = @" |
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
| function New-PSCredential([string]$User, [string]$Pass) { | |
| $username = $User | |
| $password = ConvertTo-SecureString $Pass -AsPlainText -Force | |
| $psCred = New-Object System.Management.Automation.PSCredential -ArgumentList ($username, $password) | |
| return $psCred | |
| } |
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
| { | |
| "Name": "AKS Scale Operator", | |
| "IsCustom": true, | |
| "Description": "Can monitor and scale AKS-enabled virtual machines.", | |
| "Actions": [ | |
| "Microsoft.Resources/subscriptions/resourceGroups/write", | |
| "Microsoft.Resources/subscriptions/resourceGroups/delete", | |
| "Microsoft.Storage/checkNameAvailability/*", | |
| "Microsoft.Storage/storageAccounts/*", | |
| "Microsoft.ContainerService/*" |
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
| $kakao_talk_local_path = 'c:\tools\Kakao\KakaoTalk' | |
| if (get-process -Name KakaoTalk -ErrorAction SilentlyContinue) { | |
| get-process -Name KakaoTalk | Stop-Process -ErrorAction SilentlyContinue -Force | |
| } | |
| # Download latest version of kakao_talk | |
| $kakao_talk_installer_url = 'http://app.pc.kakao.com/talk/win32/KakaoTalk_Setup.exe' | |
| $kakao_talk_installer_path = $env:TEMP + '\' + (Get-Random) + '-' + "KakaoTalk_Setup.exe" | |
| (New-Object Net.WebClient).DownloadFile($kakao_talk_installer_url, $kakao_talk_installer_path) |
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
| # Visual Studio 2017 Enterprise | |
| # https://aka.ms/vs/15/release/vs_enterprise.exe | |
| # Visual Studio 2017 Professional | |
| # https://aka.ms/vs/15/release/vs_professional.exe | |
| # Visual Studio 2017 Community | |
| # https://aka.ms/vs/15/release/vs_community.exe | |
| # Visual Studio 2017 Community |
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
| # Enable tls1.2 from default (Ssl3, Tls) | |
| # https://powershell.org/forums/topic/is-it-possible-to-enable-tls-1-2-as-default-in-powershell/ | |
| # https://www.codyhosterman.com/2016/06/force-the-invoke-restmethod-powershell-cmdlet-to-use-tls-1-2/ | |
| # https://developercommunity.visualstudio.com/content/problem/201457/unable-to-connect-to-github-due-to-tls-12-only-cha.html | |
| # https://githubengineering.com/crypto-removal-notice/ | |
| [Net.ServicePointManager]::SecurityProtocol = ` | |
| [Net.SecurityProtocolType]::Ssl3 -bor ` | |
| [Net.SecurityProtocolType]::Tls -bor ` | |
| [Net.SecurityProtocolType]::Tls11 -bor ` |
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
| #Requires -version 5 | |
| #Requires -RunAsAdministrator | |
| # Add firewall rule | |
| New-NetFirewallRule -DisplayName WINRM-HTTPS-In-TCP ` | |
| -Name WINRM-HTTPS-In-TCP -Enabled True -Protocol TCP ` | |
| -Profile Any -Direction Inbound -RemoteAddress Any ` | |
| -LocalPort 5986 | |
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
| /var/www/web/log/*.log { | |
| daily | |
| dateext | |
| dateyesterday | |
| missingok | |
| rotate 60 | |
| compress | |
| delaycompress | |
| notifempty | |
| copytruncate |