Skip to content

Instantly share code, notes, and snippets.

View pierceboggan's full-sized avatar

Pierce Boggan pierceboggan

View GitHub Profile
@smockle
smockle / VMwareFusion.md
Last active August 29, 2015 14:03
Key mappings for VMware Fusion. (Windows guests; Mac hosts)

Fusion Shortcuts

Uncheck ⌘-Q

Key Mappings

Mac Shortcut Virtual Machine Shortcut
⌘-Z Control-Z
⌘-X Control-X
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@rid00z
rid00z / BaseViewModel.cs
Last active January 24, 2016 08:57
A mini Mvvm for Xamarin.Forms
public abstract class BaseViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public virtual void ReverseInit(object value) { }
protected void PushViewModel<T> () where T : BaseViewModel
{
PushViewModel<T> (null);
}
@patridge
patridge / gist:10499338
Last active August 23, 2018 15:52
Xamarin: get a random color
// Xamarin.iOS (using MonoTouch.UIKit;)
static Random rand = new Random();
public static UIColor GetRandomColor() {
int hue = rand.Next(255);
UIColor color = UIColor.FromHSB(
(hue / 255.0f),
1.0f,
1.0f);
return color;
}
@praeclarum
praeclarum / ObservableTableViewController.cs
Created April 7, 2014 16:57
This is my UITableViewController with DataSource property that listens for INotifyCollectionChanged
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Diagnostics;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace Praeclarum.UI
{
@praeclarum
praeclarum / SingleThreaded.cs
Created January 25, 2014 23:36
Use single threaded blocking code from your UI
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Concurrent;
namespace Praeclarum
{
/// <summary>
/// Wraps a value and only allows access to it using a single thread
/// of execution (see SingleThreadQueue).
@jerriep
jerriep / FlatUIColors.cs
Created September 28, 2013 06:05
C# declarations for the color definitions from flatuicolors.com. For use with Xamarin.iOS
using System;
using MonoTouch.UIKit;
namespace OneLove
{
public static class FlatUIColors
{
public static UIColor TurqoiseColor = UIColor.FromRGBA(26, 188, 156, 100);
public static UIColor GreenSeaColor = UIColor.FromRGBA(22, 160, 133, 100);
public static UIColor EmeraldColor = UIColor.FromRGBA(46, 204, 113, 100);
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
@praeclarum
praeclarum / CodeShareReport.cs
Created January 13, 2012 20:42
Computes the code share stats for the iCircuit project
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.IO;
namespace CodeShareReport
{
class App
@danesparza
danesparza / gist:973923
Created May 16, 2011 04:02
Gravatar in C# - creating the hash
using System.Security.Cryptography;
/// Hashes an email with MD5. Suitable for use with Gravatar profile
/// image urls
public static string HashEmailForGravatar(string email)
{
// Create a new instance of the MD5CryptoServiceProvider object.
MD5 md5Hasher = MD5.Create();
// Convert the input string to a byte array and compute the hash.