Skip to content

Instantly share code, notes, and snippets.

View guitarrapc's full-sized avatar
:octocat:

Ikiru Yoshizaki guitarrapc

:octocat:
View GitHub Profile
@guitarrapc
guitarrapc / Program.cs
Last active February 9, 2026 09:20
strace C# AOT
Console.WriteLine("Hello, World");
@guitarrapc
guitarrapc / Program.cs
Last active February 9, 2026 09:11
strace C# JIT
Console.WriteLine("Hello, C#!");
@guitarrapc
guitarrapc / TUnit.Skills.md
Created February 3, 2026 07:36
LLM Skills for TUnit

Testing Guidelines

Test Framework

This project uses TUnit as the testing framework. All tests are located in tests/MyLib.Tests/.

Running Tests

Run All Tests

@guitarrapc
guitarrapc / prune_tag.sh
Created December 17, 2025 06:10
Remove local git tags that are no longer on the remote repository
git fetch --prune --prune-tags
@guitarrapc
guitarrapc / Get-EtwTraceProvider.ps1
Created December 2, 2025 14:38
ETW (Event Tracing for Windows) Providers and their GUIDs for Windows 11 (25H2) x64
#Requires -RunAsAdministrator
#Requires -Version 5.0
# requires Windows 10
Get-EtwTraceProvider | Select-Object SessionName, Guid | sort SessionName
# as Markdown
<#
#Requires -RunAsAdministrator
$result = Get-EtwTraceProvider | sort SessionName
$result | %{"|Name|GUID|";"|----|----|";}{"|$($_.SessionName)|$($_.Guid)|"}
#>
@guitarrapc
guitarrapc / MathPowBenchmark.cs
Last active October 22, 2025 09:54
Math.Pow Benchmark
BenchmarkRunner.Run<DistanceBench>();
[ShortRunJob(RuntimeMoniker.Net90)]
[ShortRunJob(RuntimeMoniker.Net10_0)]
[MemoryDiagnoser]
public class DistanceBench
{
[Params(10_000, 100_000, 1_000_000)]
public int PointCount { get; set; }
private Point[] _points = default!;
@guitarrapc
guitarrapc / dns.txt
Last active November 24, 2025 17:32
Youtube Block URL list for Web and App. If you put following urls into block list, then user under control will be blocked from accessing youtube .
# https://support.google.com/a/answer/6214622?hl=en#zippy=%2Coption-dns
# CNAME to restrict.youtube.com
www.youtube.com
m.youtube.com
youtubei.googleapis.com
youtube.googleapis.com
www.youtube-nocookie.com
@guitarrapc
guitarrapc / InvariantDateFormat.cs
Last active July 29, 2025 05:04
Invariant Date and Formatter is not same as Windows
// Set invariant Culture to get none-localized date format, should be US style.
System.Globalization.CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
// See format with https://learn.microsoft.com/ja-jp/dotnet/standard/base-types/standard-date-and-time-format-strings
DateTime.Now.Dump("None"); // MM/dd/yyyy HH:mm:ss
DateTime.Now.ToLongDateString().Dump("ToLongDateString"); // DDD dd/MM/yyyy
DateTime.Now.ToString("o").Dump("o"); // yyyy-MM-ddTHH:mm:ss.SSSSSS+O
DateTime.Now.ToString("d").Dump("d"); // dd/MM/yyyy
DateTime.Now.ToString("D").Dump("D"); // DDD, dd MM yyyy
DateTime.Now.ToString("f").Dump("f"); // DDD, dd MM yyyy HH:mm
@guitarrapc
guitarrapc / .zshrc
Created July 19, 2025 01:47
Stop correct command by zsh
# stop correct for LLM
unsetopt correct_all
unsetopt correct
export ENABLE_CORRECTION="false"
@guitarrapc
guitarrapc / Bencmarks.cs
Last active May 11, 2025 14:54
IReadOnlyList<T> foreach Memory Allocation and way to hack.
BenchmarkRunner.Run<Bencmarks>();
[HideColumns(Column.Job, Column.RatioSD, Column.AllocRatio)]
[ShortRunJob(RuntimeMoniker.Net80)]
[ShortRunJob(RuntimeMoniker.Net90)]
[MemoryDiagnoser]
[ReturnValueValidator(failOnError: true)]
public class Bencmarks
{
private List<Unit> _list;