Skip to content

Instantly share code, notes, and snippets.

@Brom95
Brom95 / sdl_gradient_array.go
Created June 2, 2024 05:36
равномерный гардиент в окне 800 на 600 с использованием sdl2 и go, но уже на массиве
package main
import (
"unsafe"
"github.com/veandco/go-sdl2/sdl"
)
const (
winWidth int32 = 800
@Brom95
Brom95 / sdl_gradient_slice.go
Last active June 2, 2024 05:37
равномерный гардиент в окне 800 на 600 с использованием sdl2 и go
package main
import (
"unsafe"
"github.com/veandco/go-sdl2/sdl"
)
const (
winWidth int32 = 800
@Brom95
Brom95 / Program.cs
Created September 19, 2022 18:57
Span split benchmark
using System;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
namespace SpanSplit;
public class SplitTest
{
public static string input = "asasdfhsjkdfsfh asdl;fkjasldfjasdfasdfshadjfaskldhfasdwewehfefhhfsjkdh";
using Microsoft.Extensions.Logging;
namespace RateLimiterCore;
public class RateLimiter<T> : IRateLimiter<T>, IDisposable
{
private int count = 0;
private Timer windowTimer;