Skip to content

Instantly share code, notes, and snippets.

@ColinOrr
ColinOrr / gist:6856c2081f7c90d4b688
Created January 17, 2015 14:50
Bootstrap Relative Input Sizes
.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
ColinOrr / gist:6008061
Last active December 19, 2015 19:39
Off canvas layout with CSS transitions
.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;
}
@ColinOrr
ColinOrr / rename.rb
Created July 24, 2013 10:42
Global find and replace for file names, folders and contents.
# 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)
end
@ColinOrr
ColinOrr / Extensions.cs
Last active January 23, 2017 20:55
Random Data Extensions
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
ColinOrr / Extensions.cs
Created November 25, 2017 11:40
Time Travel DSL
using System;
using System.Linq;
namespace TimeTravelDsl
{
public static class Extensions
{
// for example: 45.Minutes()
public static TimeSpan Minutes(this int value)
{
@ColinOrr
ColinOrr / main.dart
Created October 3, 2023 06:56
dart-string-interpolation
class Person {
String name;
Person({required this.name});
}
void main() {
final person = Person(name: 'Colin');
print('Hello ${person.name}');
}