Skip to content

Instantly share code, notes, and snippets.

Send cheese please

Tomasz Cielecki Cheesebaron

Send cheese please
View GitHub Profile
Cheesebaron / MvxFixture.cs
Created Mar 24, 2017
MvvmCross xUnit Fixture
View MvxFixture.cs
public class MvxFixture : IDisposable
public MvxFixture()

Keybase proof

I hereby claim:

  • I am cheesebaron on github.
  • I am cheesebaron ( on keybase.
  • I have a public key ASBnP2BeBE9HsuJU2uWnS0wqLGqsIu08jD_IBEfa9amx2Ao

To claim this, I am signing this object:

View Snackbar.cs
public sealed class Snackbar : UIView
public TimeSpan Duration { get; set; }
public Action<Snackbar> OnAction { get; set; }
public Action<Snackbar> OnDismiss { get; set; }
private static Snackbar _currentlyVisibleSnackbar;
private readonly UILabel _messageLabel;
private readonly UIButton _actionButton;
private readonly UIView _separator;
private NSLayoutConstraint[] _horizontalLayoutConstraints;
Cheesebaron / CircleView.cs
Last active Nov 29, 2015
Waves represented by circles! See gfycat here:
View CircleView.cs
using System;
using Android.Content;
using Android.Graphics;
using Android.Runtime;
using Android.Util;
using Android.Views;
namespace CircleWaves
public class CircleView : View
Cheesebaron / CaptureUiElements.cs
Created Aug 25, 2015
Capture UI elements Windows
View CaptureUiElements.cs
protected async Task<RenderTargetBitmap> CaptureUiElementToStreamAsync(FrameworkElement uiElement,
IRandomAccessStream stream)
return await CaptureUiElementToStreamAsync(uiElement, stream, BitmapEncoder.PngEncoderId);
private async Task<RenderTargetBitmap> CaptureUiElementToStreamAsync(FrameworkElement uiElement,
IRandomAccessStream stream, Guid encoderId)
if (uiElement == null) throw new ArgumentNullException(nameof(uiElement));
Cheesebaron / DeviceInfo.cs
Last active Aug 29, 2015
Year classification for Android. Based on Facebook's device-year-class:
View DeviceInfo.cs
using System;
using System.IO;
using System.Linq;
using Android.OS;
using Android.Util;
namespace DeviceYearClass
public class DeviceInfo
View ColorUtils.cs
public static class ColorUtils
public static class LabConstants
public const int Kn = 18;
public const float Xn = 0.950470f;
public const float Yn = 1f;
public const float Zn = 1.088830f;
Cheesebaron / CircularProgressDrawable.cs
Created Jul 9, 2015
CircularProgressDrawable, based on castorflex's Java implementation here:
View CircularProgressDrawable.cs
public class CircularProgressDrawable
: Drawable
, IAnimatable
private static readonly IInterpolator AngleInterpolator = new LinearInterpolator();
private static readonly IInterpolator SweepInterpolator = new DecelerateInterpolator();
private static readonly RectF _bounds = new RectF();
private const int AngleAnimatorDuration = 2000;
View DoomRandom.cs
* C# derivative of m_random.c used in DOOM
* Copyright (C) 1993-1996 by id Software, Inc.
* This source is available for distribution and/or modification
* only under the terms of the DOOM Source Code License as
* published by id Software. All rights reserved.