Skip to content

Instantly share code, notes, and snippets.

View robsonj's full-sized avatar

Jonathan Robson robsonj

View GitHub Profile
#!/usr/bin/env bash
##########################################################################
# Custom bootstrapper for Cake on Linux with .NET Core 2.0
##########################################################################
# Define directories.
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TOOLS_DIR=$SCRIPT_DIR/tools
TOOLS_PROJ=$TOOLS_DIR/tools.csproj
ADDINS_DIR=$TOOLS_DIR/Addins
@robsonj
robsonj / gist:9f360b72ed523dc047a0755a1dff4459
Created July 12, 2018 11:35
Updating github fork to upstream master
git pull upstream master
git push
#include "clueboard.h"
// Helpful defines
#define _______ KC_TRNS
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
#define _BL 0
#define _FL 1
#define _CL 2
/* Copyright 2015-2017 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/* Copyright 2015-2017 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@robsonj
robsonj / Pausable Observable
Created April 5, 2017 18:20 — forked from leeoades/Pausable Observable
Pause an RX stream
public static IObservable<T> Pausable<T>(
this IObservable<T> sourceStream,
IObservable<bool> isPausedStream,
bool startPaused = false)
{
return Observable.Create<T>(o =>
{
var subscriptions = new SerialDisposable();
var replaySubjects = new SerialDisposable();
@robsonj
robsonj / GrovePi Firmware Version Check
Created May 6, 2015 02:17
Getting the GrovePi firmware version from RaspberryPi 2 running WIndows 10 IoT
public sealed class StartupTask : IBackgroundTask
{
private const string I2CName = "I2C1"; /* For Raspberry Pi 2, use I2C1 */
private const byte GrovePiAddress = 0x04;
private const byte VersionCommandAddress = 0x08;
public void Run(IBackgroundTaskInstance taskInstance)
{
Task.Run(async () =>
{