This file contains 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
class Triangle | |
def self.hantei(a,b,c) | |
# 2辺を足した数が残り1辺"より小さい" | |
if(!(a < b + c && b < a + c && c < a + b)) | |
return '三角形じゃないです><' | |
end |
This file contains 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
using System.Web; | |
[assembly: PreApplicationStartMethod(typeof(Startup), "PreApplicationStart")] | |
public static class Startup | |
{ | |
public static void PreApplicationStart() | |
{ | |
} |
This file contains 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
HttpContent content; | |
var context = Request.Properties["MS_HttpContext"] as System.Web.HttpContextWrapper; | |
if (context != null) { | |
content = new StreamContent(context.Request.GetBufferlessInputStream(disableMaxRequestLength: true)); | |
content.Headers.ContentType = Request.Content.Headers.ContentType; | |
} else { | |
content = Request.Content; | |
} | |
await content.ReadAsMultipartAsync(provider); |
This file contains 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
netsh advfirewall firewall set rule name="Windowsリモート管理(HTTP受信)",profile=public new remoteip=any |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Web; | |
namespace WebApplication1 | |
{ | |
public class Run : HttpTaskAsyncHandler |
This file contains 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
net user administrator "password" |
This file contains 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
&(Read-S3Object -BucketName "bucketName" -Key "file.ps1" -File ([io.path]::GetRandomFileName() + ".ps1")) |
This file contains 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
$source = "なまえ" | |
if([System.Diagnostics.Eventlog]::SourceExists($source) -eq $false) | |
{ | |
New-Eventlog -Logname Application -Source $source | |
} | |
Write-Eventlog -LogName Application -Source $source -EntryType Error -EventId 1 -Message "message" |
This file contains 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
$ip = (invoke-webrequest http://169.254.169.254/latest/meta-data/public-ipv4 -UseBasicParsing).content | |
$zoneId = "/hostedzone/[id]" | |
$name = "abc.example.com." | |
Import-Module AWSPowerShell | |
$c = new-object Amazon.Route53.Model.Change | |
$c.Action = "UPSERT" | |
$c.ResourceRecordSet = new-object Amazon.Route53.Model.ResourceRecordSet | |
$c.ResourceRecordSet.Name = $name | |
$c.ResourceRecordSet.Type = "A" |
This file contains 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
:: 管理者として実行する | |
robocopy C:\Source D:\Destination /E /R:0 /W:0 /NP /XJ /LOG:logfile.txt |