Skip to content

Instantly share code, notes, and snippets.

View jimmyp's full-sized avatar

Jim Pelletier jimmyp

  • Melbourne, Australia
View GitHub Profile
# http://www.graphviz.org/content/cluster
digraph G {
subgraph cluster_0 {
label = "Event sourcing roadmap";
aes [style=filled, color = "palegreen", label = "Align on end state" ]
ap [style=filled, color = "palegreen", label = "Aggregate pattern" ]
qp [style=filled, color = "palegreen", label = "Query pattern"]
@jimmyp
jimmyp / TestAndImplemetation.cs
Created March 15, 2018 00:25
String CalcTDD Kata with the IQ Team
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace StringCalculator
{
@jimmyp
jimmyp / play apk
Last active October 13, 2017 07:49
play apk url
(http://www.apkmirror.com/apk/google-inc/google-play-store/google-play-store-7-2-13-j-xhdpi-8-pr-139098199-release/google-play-store-7-2-13-j-xhdpi-8-pr-139098199-android-apk-download/#description)[papk]
@jimmyp
jimmyp / SICPEx1.2.rkt
Last active December 17, 2015 13:10
SICP 1.2 Exercises
; ex 1.11
(define (f n)
(if ((n < 3) n)
(else (+ (f (- n 1)) (* 2 (f (- n 2))) (* 3 (f (-n 3)))))))
; (f 4)
; (+ (f 3) (* 2 (f 2)) (* 3 (f 1)))
; (+ (+ (f 2) (* 2 (f 1)) (* 2 (f 0))) (* 2 2) (* 3 1))
; (+ (+ (f 2) (* 2 (f 1)) (* 2 (f 0))) 4 3)
; (+ (+ (f 2) (* 2 (f 1)) (* 2 (f 0))) 4 3)
@jimmyp
jimmyp / SICPEx1.1.rkt
Last active December 17, 2015 12:08
SICP 1.1 Exercises
; 1.1
; What is the result of each of the follow expressions
; 10 => 10
; (+ 5 3 4) => 12
; (- 9 1) => 8
; (/ 6 2) => 3
; (+ (* 2 4) (- 4 6)) => (+ 8 -2) => 6
; (define a 3)
; (define b (+ a 1))
; (+ a b (* a b))
@jimmyp
jimmyp / gist:5538332
Created May 8, 2013 05:07
Ex 1.3 SICP
(define (max1 a b c)
(cond ((and (> a b)(> b c)) a)
((and (> a b)(> c b)) a)
(else c)))
(define (max2 a b c)
(cond ((and (> a b)(> b c)) b)
((and (> a b)(> c b)) c)
(else b)))
(define (square x) (* x x))
(define (sum-square a b) (+ (square a) (square b)))
//In the middle of a riduculous amount of silly dom traversal I have this line
$(this).find('.holder').find('h3:first > span:first-child').html('<strong>Priced from</strong> ' + theVal);
//More silly dom traversal
//The problem is that in IE8 when this line is executed the display is not updated, it renders sometime later (maybe after all js is finished?) in chrome and other browsers the new value is rendered as soon as this line is executed..
@jimmyp
jimmyp / gist:4147580
Created November 26, 2012 10:35
TypeScript talk for ALT. NET
@jimmyp
jimmyp / gist:2928207
Created June 14, 2012 05:56
$Error after changing directory to SQLSERVER:\sql using SqlServerSnappinswrite-ho
The term 'w' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
@jimmyp
jimmyp / gist:1333614
Created November 2, 2011 13:25
corrected generic type of ProcessThatReportsItsProgress
public static class UselessStatefulScope // ;)
{
public static void ProcessRequest<T>(T Request)
{
//Resolve the validator & validate the request
var valid = Container.Resolve<IValidate<T>>();
if(!valid(Request))
throw new Exception();
//Resolve all the applicable processors and process them