Skip to content

Instantly share code, notes, and snippets.

Working from home

Ikiru Yoshizaki guitarrapc

Working from home
Block or report user

Report or block guitarrapc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
guitarrapc / Main.cs
Created Jan 15, 2020
Deserialize Pulumi Resource JSON
View Main.cs
void Main()
var json = File.ReadAllText(@"pulumi_20200115.json");
var pulumi = System.Text.Json.JsonSerializer.Deserialize<PulumiResource>(json);
var parents = pulumi.deployment.resources.Select(x => x.parent).Where(x => x != null).ToArray();
var keys = pulumi.deployment.resources.Select(x => x.urn).ToArray();
View DetectEol.cs
public static class DetectEndOfLine
public static EndOfLineStyle Detect(string pathToFile)
int bufl = 0;
var buf = ArrayPool<char>.Shared.Rent(8192);
return DetectCore(pathToFile, buf, bufl);
View TimeOutXunit.cs
[Fact(Timeout = 50)]
public async Task FactTimeout_TimeoutLessThanProcessingTime_ThrowTestTimeoutException()
Action act = () => Task.Delay(5000);
// Trigger the timeout by attempting something that will take too long
await act;
guitarrapc / Sample.runsettings
Last active Dec 13, 2019
dotnet test RunConfiguration
View Sample.runsettings
curl -O
chmod +x redisinsight-linux64
guitarrapc /
Created Dec 11, 2019
Modify NLB Draining manually.
lb=$(kubectl get service $name -o jsonpath="{.status.loadBalancer.ingress[*].hostname}")
arn=$(aws elbv2 describe-load-balancers --query "LoadBalancers[?DNSName=='$lb'].[LoadBalancerArn]" | jq -r '.[][]')
aws elbv2 describe-target-groups --load-balancer-arn $arn | jq -r ".TargetGroups[].TargetGroupArn" | \
xargs -I {} aws elbv2 modify-target-group-attributes --target-group-arn "{}" --attributes Key=deregistration_delay.timeout_seconds,Value=$draining
guitarrapc / UnitTest1.cs
Created Nov 29, 2019
dotnet test / dotnet vstest and console output on success.
View UnitTest1.cs
public class UnitTest1
public UnitTest1(ITestOutputHelper output)
var listener = new TestTraceListener(output);
_output = listener;
class TestTraceListener : TraceListener
guitarrapc / Install-Scoop.ps1
Last active Nov 29, 2019
In case your DockerNAT Network adaptor always reset network profile to public.
View Install-Scoop.ps1
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('')
scoop update
scoop install sudo
guitarrapc /
Created Nov 29, 2019
Visual Studio GUID List to identify Project type.
  • VB : 778DAE3C-4631-46EA-AA77-85C1314464D9
  • C# : 9A19103F-16F7-4668-BE54-9A1E7A4F7556
  • F#: F2A71F9B-5D33-465A-A702-920D77279786
  • Solution Folder: 2150E333-8FDC-42A3-9474-1A3956D46DE8
View linqpad.json
"version": "6.3",
"homepage": "",
"description": "The .NET programmer’s playground.",
"license": {
"identifier": "Freeware",
"url": ""
"url": "",
"hash": "78ae277876f48e594fe4a3ecc8145a29d7ff8439fe43dcf2af537871961aee72",
You can’t perform that action at this time.