Skip to content

Instantly share code, notes, and snippets.

Colin Orr ColinOrr

Block or report user

Report or block ColinOrr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Extensions.cs
using System;
using System.Linq;
namespace TimeTravelDsl
public static class Extensions
// for example: 45.Minutes()
public static TimeSpan Minutes(this int value)
ColinOrr / Extensions.cs
Last active Jan 23, 2017
Random Data Extensions
View Extensions.cs
using System;
using System.Collections.Generic;
using System.Linq;
namespace Tests.Data
public static class Extensions
/// <summary>
/// Returns a random item from the sequence.
ColinOrr / gist:6856c2081f7c90d4b688
Created Jan 17, 2015
Bootstrap Relative Input Sizes
View gist:6856c2081f7c90d4b688
.input-mini { width: 60px; }
.input-small { width: 90px; }
.input-medium { width: 150px; }
.input-large { width: 210px; }
.input-xlarge { width: 270px; }
.input-xxlarge { width: 530px; }
@media (max-width: 767px) {
.input-large { width: 100%; }
.input-xlarge { width: 100%; }
ColinOrr / rename.rb
Created Jul 24, 2013
Global find and replace for file names, folders and contents.
View rename.rb
# Placeholders
PROJECT = /_Project_/
COMPANY = /_Company_/
PROJECT_LOWER = /_project_/
# Recursively replaces all placeholders in file names, folders and content
def rename(project, company)
renameFiles('.', project, company)
replaceContent('**/*', project, company)
ColinOrr / gist:6008061
Last active Dec 19, 2015
Off canvas layout with CSS transitions
View gist:6008061
.pane {
position: absolute;
width: 100%;
height: 100%;
-webkit-transition: left 0.25s ease-in-out;
-moz-transition: left 0.25s ease-in-out;
-o-transition: left 0.25s ease-in-out;
transition: left 0.25s ease-in-out;
You can’t perform that action at this time.