Skip to content

Instantly share code, notes, and snippets.

View mwadams's full-sized avatar

Matthew Adams mwadams

View GitHub Profile
@mwadams
mwadams / endjinchartsample.xaml
Created September 14, 2012 09:16
Endjin Chart Sample
<Views:Chart
x:Name="Chart">
<Views:Chart.ChartAreas>
<Views:ChartAreaCollection>
<Views:ChartArea
x:Name="TestChart1"
XAxisPosition="Floating"
YAxisPosition="Floating"
YAxisRequiresZero="True"
XAxisStroke="White"
@mwadams
mwadams / gist:5197597
Created March 19, 2013 16:26
Extra hidden/visible classes for bootstrap
/* -----------------------------------------------
Extra hidden/visible classes
----------------------------------------------- */
.visible-narrow-desktop {
display: none !important;
}
@media (min-width: 980px) and (max-width: 1199px) {
.visible-narrow-desktop {
@mwadams
mwadams / gist:5309248
Created April 4, 2013 10:06
Features for Endjin's charting PoC
Endjin's 2D Charting Tool
Summary of features as of 19/11/2012
====================================
Supported platforms:
WinRT, WPF, Silverlight 5, Windows Phone 8: Identical XAML, identical features and near-identical rendering.
Chart types:
@mwadams
mwadams / gist:5358890
Created April 10, 2013 22:07
Z80 Assembler example
; 99 Bottles of Beer program in Zilgo Z80 assembly language.
; Assembles for ZX Spectrum/Timex - change Spectrum: lines
; if porting. Help from Marko! Compiled and tested with SPIN
;
; Adapted from the Alan deLespinasse's Intel 8086 version
;
; Author: Damien Guard ; damien@envytech.co.uk ; www.damieng.com
org 32768
@mwadams
mwadams / gist:5362667
Created April 11, 2013 11:31
A line of F#
let answer = 1 + 1
@mwadams
mwadams / gist:5362674
Last active December 16, 2015 02:29
A function
let add x y = x + y
@mwadams
mwadams / gist:5362687
Created April 11, 2013 11:34
A set in PASCAL
if i in [1,3,5..10,15,19] then ...
@mwadams
mwadams / gist:5631180
Created May 22, 2013 21:44
A retry policy example
public class AnyException : IRetryPolicy
{
public bool CanRetry(Exception exception)
{
return true;
}
}
@mwadams
mwadams / gist:5631223
Created May 22, 2013 21:49
Example RetryStrategy
public class Count : RetryStrategy
{
private readonly int maxTries;
private int tryCount;
public Count()
: this(5)
{
}
@mwadams
mwadams / gist:5631329
Created May 22, 2013 22:05
Example of a RetryTask
ISomeService someTasks = new MyService();
var result = await RetryTask<string>.Factory.StartNew(
() => someTasks.SecondTask(someTasks.FirstTask()), new Count(10));