Skip to content

Instantly share code, notes, and snippets.

View kant2002's full-sized avatar

Andrii Kurdiumov kant2002

View GitHub Profile
@kant2002
kant2002 / Program.fs
Last active June 23, 2023 13:47
CNCF claim check
open Octokit
open LibGit2Sharp
open System.IO
open System.Linq
let github_token = "changeme"
let rec queryRepos (github:GitHubClient) page items =
task {
let searchRequest = SearchRepositoriesRequest(Topic = "cncf", Page = page, SortField = RepoSearchSort.Stars)
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
internal class FromFolderDelegatingHandler : DelegatingHandler
{
@kant2002
kant2002 / prompt.md
Created April 2, 2023 18:45
ChatGPT refactoring

Me:

Please convert javascript array to javascript object where each item will correspont to object property 
and that property has same value as an item. Array to convert: 
const KEYWORDS = [
        "abstract",
        "and",
        "as",
        "assert",
        "base",
@kant2002
kant2002 / 00_Мавка.м
Last active April 1, 2023 21:16
Програми на Мавці
друк("Приклади програм на Мавці")
@kant2002
kant2002 / Program.csproj
Created November 16, 2022 05:06 — forked from seclerp/Program.csrpoj
Solution for the task "Run the Java Hello World example via both dotnet run and javac"
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.java" />
</ItemGroup>
@kant2002
kant2002 / AvaloniaHeadlessConsoleApp.csproj
Last active November 6, 2022 14:54
Headless Avalonia
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
@kant2002
kant2002 / program.cs
Created September 12, 2022 15:02
Funny lock
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
test x = new test();
for(var i =0; i < 10; i++)
{
var thread = new Thread(Worker);
thread.Start();
}
@kant2002
kant2002 / Program.cs
Created August 31, 2022 19:53
Windows Forms NativeAOT
Application.Run(new Form() { Text = "Hello NativeAOT!" });
@kant2002
kant2002 / index.mjs
Created August 30, 2022 16:53
Mokey Patching some REAL CODEZZ
import x from "./module.mjs";
import "./second.mjs";
x.log();
@kant2002
kant2002 / _before.cs
Created August 10, 2022 06:33
LibraryImport Generator sample
[LibraryImport(Libraries.UxTheme)]
public static partial HRESULT DrawThemeEdge(
IntPtr hTheme,
Gdi32.HDC hdc,
int iPartId,
int iStateId,
ref RECT pDestRect,
User32.EDGE uEdge,
User32.BF uFlags,
ref RECT pContentRect);