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
diff --git a/src/Cake.Core/Utilities/Tool.cs b/src/Cake.Core/Utilities/Tool.cs
index 432bcbe..af98470 100644
--- a/src/Cake.Core/Utilities/Tool.cs
+++ b/src/Cake.Core/Utilities/Tool.cs
@@ -1,5 +1,7 @@
using System;
+using System.Collections.Generic;
using System.Globalization;
+using System.Linq;
using Cake.Core.IO;
@Redth
Redth / c#.cs
Last active August 29, 2015 14:21
Covariant Types: C# vs Java
public abstract class Animal
{
public abstract string Name { get; }
}
public abstract class AnimalFactory
{
public abstract Animal Create ();
public abstract void Process (Animal animal);
}
@Redth
Redth / Client.cs
Created February 9, 2015 17:42
ThisLife C# API Client
using System;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Net.Http;
using System.Net.Http.Headers;
namespace ThisLife
{
public class ThisLifeClient
version: 1.0.1.0
name: Example Component
id: example-component
publisher: Xamarin
publisher-url: "http://xamarin.com"
summary: An example after moving to NuGet dependencies
libraries:
android:
- ../build/android/Example.dll
ios:
using System;
using Android.Support.Wearable.Watchface;
using Android.App;
using Android.Runtime;
namespace WatchFace
{
public class MyWatchFaceService : CanvasWatchFaceService
{
public override CanvasWatchFaceService.Engine OnCreateEngine ()
@Redth
Redth / tasks.cs
Last active August 29, 2015 14:07
var toSend = from n in Broker.TakeMany ()
select Connection.Send (n);
await Task.WhenAll (toSend).ConfigureAwait (false);
foreach (var t in toSend) {
await t; //Probably a no-op, should return immediately in any case
if (t.Exception != null)
Broker.RaiseNotificationSucceeded (null); // Need to pass back 'n' here
version: 19.0.0.2
name: Google Play Services
id: googleplayservices
publisher: Xamarin Inc.
no_build: true
publisher-url: http://xamarin.com
summary: Give your apps more features to attract users on a wider range of devices.
libraries:
android:
- source/binding/GooglePlayServicesLib/GooglePlayServicesLib.dll
@Redth
Redth / CrisisCheckin-WebAPI.md
Last active August 29, 2015 14:04
Draft of what the Crisis Checkin Web API for mobile apps might be

Here is a proposal for a web api for the Crisis Checkin app which the mobile apps will call.

General Notes about the API

The API should send and receive JSON data.

The Base Url should be /api/

All responses should include one of the following http response status codes:

  • 200 - OK
  • 403 - Authentication Failed (Auth Token bad)
Packages
- Android Support Library, revision 18
License Terms and Conditions
This is the Android Software Development Kit License Agreement.
1. Introduction
@Redth
Redth / takedown.txt
Created July 2, 2014 22:34
Qualcomm issued a DMCA Takedown because of the content of these urls (that were hosted on GitHub)
https://zxingnet.codeplex.com/SourceControl/latest#trunk/Clients/VuforiaDemo/Assets/Qualcomm Augmented Reality/Scripts/ITrackableEventHandler.cs
https://zxingnet.codeplex.com/SourceControl/latest#trunk/Clients/VuforiaDemo/Assets/Qualcomm Augmented Reality/Scripts/QCAR.cs
https://zxingnet.codeplex.com/SourceControl/latest#trunk/Clients/VuforiaDemo/Assets/Qualcomm Augmented Reality/Scripts/QCARRuntimeUtilities.cs