Skip to content

Instantly share code, notes, and snippets.

View kipters's full-sized avatar

Fabio Di Peri kipters

View GitHub Profile
@kipters
kipters / GroupStats.csproj
Last active August 31, 2023 16:12
GroupStats
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishAot>true</PublishAot>
<InvariantGlobalization>true</InvariantGlobalization>
<LangVersion>preview</LangVersion>
@kipters
kipters / gist:176da3077e686aa6b5eb1ed0248ed0ff
Created September 4, 2022 17:08
.NET 7 intrinsics benchmark
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
#if DEBUG
var testClass = new DotProductBenchmarks { Length = 8 };
@kipters
kipters / CustomView.cs
Last active April 3, 2020 22:43
UIView subclass and UIViewAppearance
using System;
using CoreGraphics;
using Foundation;
using ObjCRuntime;
using UIKit;
namespace App1
{
[Register("CustomView")]
public class CustomView : UIView

Keybase proof

I hereby claim:

  • I am kipters on github.
  • I am kipters (https://keybase.io/kipters) on keybase.
  • I have a public key ASCxQh8yzt_QbH4t9UktxqxUtjxwW4VK5zfrZ4bAM4I8nQo

To claim this, I am signing this object:

@kipters
kipters / UITextFieldPlaceholderTextColorExtensions.cs
Created April 1, 2020 18:58
UITextField category and UIAppearance extensions
using Foundation;
using ObjCRuntime;
using UIKit;
namespace Categories
{
[Category(typeof(UITextField)), Preserve]
public static class UITextFieldPlaceholderTextColorExtensions
{
[Export("placeholderTextColor")]
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Telegram.Bot.Types;
root = true
[*]
indent_style = space
insert_final_newline = true
[*.cs]
intent_size = 4
trim_trailing_whitespace = true
@kipters
kipters / Program.cs
Created September 3, 2019 09:21
[Terrible Idea] Event handlers in initilizers
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
namespace TerribleEventIdea
{
class Program
{
public static void Main(string[] args)