Skip to content

Instantly share code, notes, and snippets.

View iSeiryu's full-sized avatar
:octocat:
Working

Seiryu iSeiryu

:octocat:
Working
View GitHub Profile
@iSeiryu
iSeiryu / pipe-curl-as-array.sh
Created July 22, 2024 14:47
Pipe output from a curl command as an array of strings
curl https://www.cs.cmu.edu/~biglou/resources/bad-words.txt | & { fi count words . $input -r --hidden }
@iSeiryu
iSeiryu / microsoft-is-too-big.md
Created July 22, 2024 14:45
Microsoft took over the world

There is A LOT more. Microsoft has dedicated teams that contribute to the actual C++, Java, Python development. If you use those langs you use code and standards developed by the Microsoft employees.

VSCode: https://github.com/microsoft/vscode JDK: https://github.com/microsoft/openjdk TS: https://github.com/microsoft/typescript GitHub servers and GH Action runners run on Azure: https://cnbc.com/2022/10/12/microsoft-github-relying-more-on-azure-cloud-services-scott-guthrie.html

npm, Azure, XBox, ChatGPT, Copilot, DALLE, Playwright, Blizzard and all of their games.

Btw, dotnet, C#, and especially F# are not 100% developed by MS. There are thousands of pull requests from random people from around the world.

@iSeiryu
iSeiryu / dotnet-perf-knobs.md
Created July 22, 2024 14:35
Dotnet flags to improve runtime performance

.NET significantly improves from a few knobs here DOTNET_TC_AggressiveTiering=1 (to reach the steady-state faster) and DOTNET_GCDynamicAdaptationMode=1 (reduces memory usage down to 40mb for me, but not sure it works on macOS since GC regions are disabled for mac)

@iSeiryu
iSeiryu / large-test-db.md
Created July 21, 2024 16:11
A large test Postgres DB with movie info
@iSeiryu
iSeiryu / csharp-post-example.md
Last active July 10, 2024 17:53
Simple get and post endpoints with C# vs NodeJS vs Rust

Program.cs

using System.Text.Json.Serialization;

var app = WebApplication.CreateBuilder(args).Build();

app.MapGet("/hi", () => "hi");
app.MapPost("send-money", (SendMoneyRequest request) =>
{
    var receipt = new Receipt($"{request.From.FirstName} {request.From.LastName}",
@iSeiryu
iSeiryu / csharp-vs-fsharp-pattern-matching.md
Last active May 2, 2024 15:43
C# vs F# pattern matching
// F#

type BodyType = 
    | Sedan
    | SUV

type Vehicle =
    | Bus of riders:int * capacity:int * basePrice:decimal
    | Taxi of riders:int * capacity:int * basePrice:decimal * body:BodyType * fares:int
256: /MS-DOS/v4.0/src/CMD/GRAPHICS/GRCTRL.ASM
212: color
38: black
3: gun
3: firing
225: /MS-DOS/v4.0/src/SELECT/SCROLL.ASM
168: color
56: hook
1: uk
115: /MS-DOS/v4.0/src/SELECT/PANELS.ASM
@iSeiryu
iSeiryu / .editorconfig
Created December 31, 2022 16:57
Example of .editorconfig with Sonar and Roslynator analyzers
root = true
# EditorConfig is awesome: https://EditorConfig.org
# Don't use tabs for indentation.
[*]
indent_style = space
charset = utf-8
end_of_line = lf
[*.{cs,csx}]