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 -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)|"} | |
| #> |
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
| 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!; |
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
| # 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 |
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
| // 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 |
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
| # stop correct for LLM | |
| unsetopt correct_all | |
| unsetopt correct | |
| export ENABLE_CORRECTION="false" |
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
| 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; |
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 draftBasePath = @"{YOUR_GITHUB_PATH}/blogdraft_entries\"; | |
| var basePath = @"{YOUR_GITHUB_PATH}/entries/{YOUR_ACCOUNT}.hatenablog.com/entry/"; | |
| var targetMonths = new[] { | |
| // 持ってきたい日付を並べる | |
| "2025/03" | |
| }; | |
| var titlePattern = new Regex("201[2,3]/[0-9]{2}/[0-9]{2}/[0-9]{6}", RegexOptions.Compiled); | |
| var drafts = Directory.EnumerateFiles(draftBasePath, "*.md"); | |
| foreach (var draft in drafts) |
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
| マークダウンの表示用テキスト | |
| # 見出し1 | |
| ## 見出し2 | |
| ### 見出し3 | |
| #### 見出し4 |
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
| // ConsoleAppFramework v4 | |
| using ConsoleAppFramework; | |
| // # OK | |
| // # Output: foo | |
| // args = ["--msg", "foo"]; | |
| // # OK | |
| // # Output: foo--hello bar |
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
| using System.Collections.Concurrent; | |
| using System.Text.Json; | |
| using System.Text.Json.Serialization; | |
| using System.Xml.Linq; | |
| var path = @"output.json"; | |
| var bytes = File.ReadAllText(path); | |
| var packages = JsonSerializer.Deserialize<DotnetCliListPackages>(bytes); | |
| ArgumentNullException.ThrowIfNull(packages); | |
| var licenses = new ConcurrentBag<DotnetLicense>(); |
NewerOlder