Skip to content

Instantly share code, notes, and snippets.

View kekekeks's full-sized avatar

Nikita Tsukanov kekekeks

  • Kazakhstan, Astana
View GitHub Profile
using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
static class AsyncMainHelper
{
class Ctx : SynchronizationContext
{
static unsafe class Wat
{
public static unsafe void Test(params int*[] types)
{
}
public static void Crash()
{
Test();
}
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

This is a proposal to fund Avalonia development

A dual-licensed (AGPL3 + commercial) components pack

  • OS-specific auto-selected control themes: Windows, macOS, Ubuntu, Android, iOS
  • Ported WPF or Xceed's data grid(s)
  • WPF-on-Avalonia: binary-compatible WPF classes compiled from original sources with HwndSource and other classes implemented on top of Avalonia
  • UWP-on-Avalonia: Uno's approach basically. We might even reuse their sources since they are MIT licensed
public class Result<T> : Result
{
public T Value { get; }
public Result(T result)
{
Success = true;
Value = result;
}
public Result()
@kekekeks
kekekeks / skiasharp.md
Last active January 24, 2019 14:38
SkiaSharp cross-building
debootstrap trusty /build-armhf

# Will need to do it after every reboot
mount --rbind /proc /build-armhf/proc
mount --rbind /home /build/armhf/home

chroot /build-armhf
adduser YOUR_USER_NAME_HERE
@kekekeks
kekekeks / OemEncoding.cs
Created May 31, 2018 13:41
OEM encoding C#
using System.Linq;
using System.Text;
class OemEncoding : Encoding
{
private static readonly char[] Oem =
new[]
{
127, 199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197, 201, 230, 198, 244,
@kekekeks
kekekeks / x11.cs
Created November 29, 2016 09:08
XPutImage example for GTK#
public static class X11
{
[DllImport ("libX11.so.6")]
static extern IntPtr XOpenDisplay(IntPtr display);
static IntPtr Disp;
[DllImport ("libX11.so.6")]
static extern int XGetGeometry(IntPtr disp, IntPtr hwnd, out IntPtr root, out int x, out int y,
out int width, out int height, out int border, out int depth);
[DllImport ("libX11.so.6")]
static extern IntPtr XInitImage(ref XImage image);
@kekekeks
kekekeks / gist:e0b0504dc8bac75697e7
Created April 25, 2015 09:34
actorawait exceptions
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Diagnostics.Tracing;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Runtime.CompilerServices;
@kekekeks
kekekeks / gist:c32b11f1996d3314116c
Created April 25, 2015 09:13
Akka.Net ActorAwait
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Diagnostics.Tracing;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Runtime.CompilerServices;