Skip to content

Instantly share code, notes, and snippets.

View angusfretwell's full-sized avatar

Angus Fretwell angusfretwell

View GitHub Profile
@angusfretwell
angusfretwell / _colors.scss
Created June 15, 2014 14:06
Small utility for building colour classes.
// Define default background and foreground (text) colors:
$background-color: #fff;
$foreground-color: #222;
// Define our brand colors; text-color accepts a color, 'inverse', 'default', or false.
// e.g.:
// (
// prefix,
// brand-color,
const pixel = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
if (!Modernizr.testProp('objectFit')) {
const $images = $('.js-object-fit--cover');
$images.each((index, element) => {
const $image = $(element);
$image.css('background-image', `url(${$image.attr('src')})`);
$image.css('background-size', 'cover');
@angusfretwell
angusfretwell / mailcatcher.sh
Created January 22, 2016 04:12
Install MailCatcher in Laravel Homestead
apt-get install -y ruby1.9.1-dev
gem install mailcatcher
echo "description \"Mailcatcher\"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
pre-start script
<?php
namespace App\Traits;
use Validator;
trait Validatable
{
protected $rules = [];
protected $errors;
/*------------------------------------*\
#VIDEO
\*------------------------------------*/
/*doc
---
title: Video
name: video
category: Components
---
/*------------------------------------*\
#SWITCH
\*------------------------------------*/
/*
<label class="switch">
<input type="checkbox" class="switch__checkbox" name="switch">
<span class="switch__mask"></span>
</label>
*/
h1,
h2,
h3,
h4,
h5,
h6 {
position: relative;
border: 1px solid;
}
@angusfretwell
angusfretwell / keybase.md
Created September 28, 2017 00:48
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: