Skip to content

Instantly share code, notes, and snippets.

@rbwestmoreland
rbwestmoreland / install.ps1
Last active April 18, 2018 03:17
git hooks solution
git config --local core.hooksPath ./tools/githooks
@rbwestmoreland
rbwestmoreland / boot.sh
Last active December 10, 2017 05:23
Docker PI
#!/bin/sh
echo ----------------------------------------
echo Updating boot script...
echo ----------------------------------------
sudo git -C /usr/bin/rbwestmoreland/ pull
sudo sh /usr/bin/rbwestmoreland/start.sh

Keybase proof

I hereby claim:

  • I am rbwestmoreland on github.
  • I am rbwestmoreland (https://keybase.io/rbwestmoreland) on keybase.
  • I have a public key ASCNc7VMbRhst4ipOUUDlCbBwwwNPC2426x6cq_SFtk4Uwo

To claim this, I am signing this object:

@rbwestmoreland
rbwestmoreland / SpeakingNotes.md
Last active August 29, 2015 14:00
Meetup - Elasticsearch - 2014-04-24 - Speaking Notes

What is Elasticsearch?

ElasticSearch is a distributed search engine based on Lucene.

  • Data is stored as Json objects
  • Data is automatically indexed
  • Interact via REST Api

Why Elasticsearch?

@rbwestmoreland
rbwestmoreland / date-time-parsing.bat
Created July 30, 2013 00:22
Batch file date time parsing
@echo off
set year=%date:~10,4%
set month=%date:~4,2%
set day=%date:~7,2%
set hour=%time:~0,2%
set minute=%time:~3,2%
set second=%time:~6,2%
set millisecond=%time:~9,2%
echo %year% %month% %day% %hour% %minute% %second% %millisecond%
@rbwestmoreland
rbwestmoreland / hello-world.md.txt
Created July 7, 2012 07:34
Typeset - Hello World Markdown Post
---
layout: post
title: Hello World
permalink:
- posts/hello-world
date: 2012-06-19 16:46:51 -04:00
tags:
- example
- markdown
- post
@rbwestmoreland
rbwestmoreland / ResponseTimeHeaderHttpModule.cs
Created March 5, 2012 03:49
Response Time Header IHttpModule
using System;
using System.Diagnostics;
using System.Web;
public class ResponseTimeHttpModule : IHttpModule
{
private static readonly String XResponseTimeHeaderName = "X-ResponseTime";
public void Init(HttpApplication context)
{
@rbwestmoreland
rbwestmoreland / IPrototype.cs
Created January 27, 2012 01:08
Properly Implementing the Prototype Pattern
using System;
/// <summary>
/// An example prototype interface.
/// <para>The Prototype pattern is a creational
/// pattern, whose purpose is to specify the kinds
/// of objects to create using a prototypical
/// instance, and create new objects by copying
/// this prototype.</para>
/// </summary>
@rbwestmoreland
rbwestmoreland / ConcreteTemplateA.cs
Created January 25, 2012 02:11
Properly Implementing the Template Method Pattern
using System;
public class ConcreteTemplateA : Template
{
protected override void DoThis()
{
// Do this
}
protected override void DoThat()
@rbwestmoreland
rbwestmoreland / ChainT.cs
Created January 21, 2012 05:58
Properly Implementing the Chain of Responsibility Pattern
using System;
/// <summary>
/// Generic Chain of Responsibility
/// <para>Avoid coupling the sender of a request to its
/// receiver by giving more than one object a chance to
/// handle the request. Chain the receiving objects and
/// pass the request along the chain until an object
/// handles it.</para>
/// </summary>