Skip to content

Instantly share code, notes, and snippets.

View Redth's full-sized avatar
🏠
Working from home

Jonathan Dick Redth

🏠
Working from home
View GitHub Profile
var http = new HttpClient ();
// This is sorta node.js like with a 'callback' or continuation after the async operation completes:
http.GetStringAsync ("https://google.com")
.ContinueWith (t => {
var html = t.Result;
Console.WriteLine (html);
});
// This is the same thing:
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get;set; }
}
var people = new List<Person> {
new Person { FirstName = "Bill", LastName = "Smith", Age = 60 },
public class MsgHub
{
public static MsgHub Instance = new MsgHub();
public static void Send<TArgs> (TArgs args)
{
var msg = args.GetType ().Name;
MessagingCenter.Send<MsgHub, TArgs> (Instance, msg, args);
}
public class MsgHub
{
public static MsgHub Instance = new MsgHub();
public static void Send<TArgs> (TArgs args)
{
var msg = args.GetType ().Name;
MessagingCenter.Send<MsgHub, TArgs> (Instance, msg, args);
}
using System;
namespace Xamarin.Forms
{
public static class MessagingCenterEx
{
class MessagingCenterSender
{
public static MessagingCenterSender Instance = new MessagingCenterSender();
}
using System;
using System.Net.Http;
namespace IsItRdyYet
{
class MainClass
{
public static void Main (string[] args)
{
var http = new HttpClient ();
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
//We MUST wrap our setup in this block to wire up
// Mono's SIGSEGV and SIGBUS signals
Setup.EnableCustomCrashReporting (() => {
//Get the shared instance
var manager = BITHockeyManager.SharedHockeyManager;
//Configure it to use our APP_ID
@Redth
Redth / Talks.md
Last active August 29, 2015 13:56

Xamarin and Azure Mobile Services

Does your app need a cloud? Azure Mobile Services can help make connecting your Xamarin apps to the cloud a breeze. Check out what Azure has to offer for your Mobile apps, and how easy it is to implement things like Social Authentication, Cloud based storage, and Push Notifications all within your Xamarin apps!

Your first native iOS app with Xamarin in 60 minutes or less!

Leave the Objective-C at the door! Let's build a native iOS app together using C# and Xamarin, and see just how much we can accomplish in as little as 60 minutes. We'll start out by talking a bit about what Xamarin.iOS is before we jump right into building an app from scratch, start to finish! Learn about some iOS UI basics, how to leverage the Xamarin Component Store, and more!

on remote_stop()
end remote_stop
on remote_play()
tell application id "com.altusapps.gtunesapp"
playpause
end tell
end remote_play
on remote_previous_item()
@Redth
Redth / gist:8649907
Created January 27, 2014 14:56
NSData Selectors
@implementation NSData (AirfoilIntegrationSampleAdditions)
+ (id)scriptingAirfoilImageWithDescriptor:(NSAppleEventDescriptor *)descriptor
{
if ( [descriptor descriptorType] == typeType && [descriptor typeCodeValue] == cMissingValue )
{
return nil;
}
if ( [descriptor descriptorType] != typeTIFF )
{