Skip to content

Instantly share code, notes, and snippets.

View bforrest's full-sized avatar
💭
Red, red, red, GREEN, refactor

Barry Forrest bforrest

💭
Red, red, red, GREEN, refactor
View GitHub Profile
using System;
using LinenLifeCycle.Messages;
using Magnum.StateMachine;
using MassTransit;
using MassTransit.Saga;
namespace LinenLifeCycle
{
public class LinenCycleSaga: SagaStateMachine<LinenCycleSaga>, ISaga
{
@bforrest
bforrest / JobUserDataBuilder
Created January 6, 2011 15:38
JobUserDataBuilder
using System;
using System.Collections.Generic;
using Cimetrix.CimControlFramework.FactoryAutomation;
using Cimetrix.CimControlFramework.Schedulers.Marathon2QuadScheduler;
namespace TestProjectScheduler
{
public class JobUserDataBuilder
{
private ChamberSelect[][] processModuleChambers;
@bforrest
bforrest / .gvimrc
Created January 21, 2011 03:40
gvimrc
set nocompatible
colorscheme slate
syntax on
set showmode
set showcmd
filetype on
filetype plugin on
filetype indent on
#Tabstops
let mapleader=","
nmap <Leader>d :NERDTreeToggle<CR>
@bforrest
bforrest / Numbers.cs
Created March 24, 2011 04:36
numbers kihon
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Squire.Framework;
namespace Squire
{
[TestClass]
public class NumbersKihon : NumbersKihonStructure
{
protected override int Return_The_Maximum_Value_Of_Int32()
:s /\//\\/g
:s /\\/\//g
@bforrest
bforrest / bash_profile
Created April 8, 2011 15:35
.bash_profile
export PATH="$PATH:~/git-achievements"
alias git="git-achievements"
SSH_ENV="$HOME/.ssh/environment"
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV"
@bforrest
bforrest / gitconfig
Created May 12, 2011 16:35
git config
[core]
autocrlf = false
safecrlf = true
[user]
name = Barry Forrest
email = [email protected]
[alias]
co = checkout
ci = commit
@bforrest
bforrest / phone kata
Created July 30, 2011 01:57
7 Digit phone number kata
We have a regular telephone keypad and we want to know the number of "valid" 7 digit phone numbers that start from any key on the keypad,
and progress to the next key using the Knight's move from chess (two squares horizontally then one vertically,
or two vertically then one horizontally, making an "L" shape).
"Valid" numbers may not begin with 0 or 1.
Keypad:
1 2 3
4 5 6