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
| #!/usr/bin/env dotnet | |
| // Copyright 2025 Alexandru Avadanii | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // |
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
| #:package [email protected] | |
| using Org.BouncyCastle.Cryptography; | |
| using Org.BouncyCastle.Asn1; | |
| using Org.BouncyCastle.Crypto; | |
| using Org.BouncyCastle.Crypto.Parameters; | |
| using Org.BouncyCastle.OpenSsl; | |
| using Org.BouncyCastle.Pkcs; | |
| using Org.BouncyCastle.Security; | |
| using Org.BouncyCastle.X509; |
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
| #:sdk [email protected] | |
| unsafe | |
| { | |
| const int ArraySize = 10; | |
| // stackalloc으로 스택에 메모리 할당 | |
| int* arr = stackalloc int[ArraySize]; | |
| // 랜덤 값으로 배열 초기화 |
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
| #!/usr/bin/env dotnet | |
| #:sdk [email protected] | |
| #:property PublishAot=false | |
| #:package [email protected] | |
| #pragma warning disable ASPIRECSHARPAPPS001 | |
| using Microsoft.Extensions.Configuration; | |
| // To specify password/secrets: |
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
| <Project> | |
| <ItemGroup> | |
| <None Include="README.md" Pack="true" PackagePath="\"/> | |
| </ItemGroup> | |
| </Project> |
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
| #!/usr/bin/env dotnet | |
| #:sdk Microsoft.NET.Sdk.Web | |
| var builder = WebApplication.CreateBuilder(args); | |
| using var app = builder.Build(); | |
| app.UseHttpsRedirection(); | |
| app.MapGet("/", () => "Hello from A").RequireHost("a.dev.localhost"); | |
| app.MapGet("/", () => "Hello from B").RequireHost("b.dev.localhost"); | |
| app.MapGet("/", () => "Hello from Prod"); | |
| app.Run(); |
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
| #!/usr/bin/env dotnet | |
| Console.WriteLine("Hello, World!"); |
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
| #!/usr/bin/env dotnet | |
| #:sdk Microsoft.NET.Sdk.WebAssembly | |
| #:property OverrideHtmlAssetPlaceholders=true | |
| #:property AllowUnsafeBlocks=true | |
| #:property PublishAot=false | |
| // dotnet run Program.cs | |
| using System.Diagnostics; | |
| using System.Runtime.InteropServices.JavaScript; |
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 n = 10; | |
| var fib = new List<long> { 0, 1, }; | |
| for (var i = 2; i < n; i++) | |
| fib.Add(fib[i - 1] + fib[i - 2]); | |
| Console.WriteLine($"Fibonacci sequence up to {n} terms:"); | |
| Console.WriteLine(string.Join(", ", fib)); |
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
| #!/usr/bin/env dotnet | |
| #:package [email protected] | |
| #:property OutputType=Library | |
| #:property NativeLib=Shared | |
| #:property RuntimeIdentifier=win-x64 | |
| #:property AllowUnsafeBlocks=true | |
| // dotnet publish .\script.cs -o bin | |
| // %windir%\system32\rundll32.exe bin\script.dll,EntryA "HelloWorld.xlsx" | |
| // start HelloWorld.xlsx |
NewerOlder