Skip to content

Instantly share code, notes, and snippets.

View Clancey's full-sized avatar

James Clancey Clancey

View GitHub Profile
using System;
using System.Runtime.InteropServices;
using OpenZWave;
using System.Threading.Tasks;
namespace OpenZWaveApp
{
class Program
{
static void Main(string[] args)
import 'dart:async';
import 'package:simple_auth/simple_auth.dart';
import "package:http/http.dart" as http;
import 'dart:convert' as convert;
enum AzureADEasyAuthType { aad, microsoftAccount, facebook, google, twitter }
class AzureADEasyAuthApi extends OAuthApi {
String siteUrl;
AzureADEasyAuthType authType;
@Clancey
Clancey / keybindings.json
Last active August 20, 2019 17:00
My VSCode keybindings to make it more like VSMac. Place it here: ~/Library/Application Support/Code/User/keybindings.json
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+i",
"command": "editor.action.formatDocument",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+f",
"command": "-editor.action.formatDocument",
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using SimpleAuth;
using MobileCenterApi.Models;
This file has been truncated, but you can view the full file.
// Code generated by SimpleSwaggerGenerator 1.0.6654.31180
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace MobileCenterApi
{
using SimpleAuth;
using System.Net.Http;
using System.Threading.Tasks;
using System.Linq;
[assembly: Dependency(typeof(DeviceInfo))]
namespace HockeyApp.Helpers
{
public class DeviceInfo : IDeviceInfo
{
public static Mock<IDeviceInfo> Mocked { get; set; }
public string Model => Mocked?.Object?.Model ?? throw new NotImplementedException();
public class TestPlatformService : IPlatformServices
{
public TestPlatformService()
{
}
public bool IsInvokeRequired => false;
public string RuntimePlatform => "UnitTests";
[Activity(NoHistory = true, LaunchMode = Android.Content.PM.LaunchMode.SingleTop)]
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable }, DataScheme = "whatever.scheme")]
public class SimpleAuthActivity : SimpleAuth.Droid.CustomTabs.SimpleAuthCallbackActivity
{
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.IO;
using NUnitLite.Runner;
using Android.App;
using Android.Content;
using Android.OS;
@Clancey
Clancey / AppSettingsExtensions.cs
Created August 21, 2017 19:51
Extension methods to make using Settings easier
using System;
using System.Runtime.CompilerServices;
using Plugin.Settings.Abstractions;
namespace Plugin.Settings.Abstractions
{
public static class AppSettingsExtensions
{
public static void Set(this ISettings settings, string value, [CallerMemberNameAttribute] string memberName = "") => settings.AddOrUpdateValue(memberName, value);
public static void Set(this ISettings settings, bool value, [CallerMemberNameAttribute] string memberName = "") => settings.AddOrUpdateValue(memberName, value);
public static void Set(this ISettings settings, long value, [CallerMemberNameAttribute] string memberName = "") => settings.AddOrUpdateValue(memberName, value);