Skip to content

Instantly share code, notes, and snippets.

View kilmc's full-sized avatar

Kilian McMahon kilmc

View GitHub Profile
@kilmc
kilmc / color-test.scss
Created July 23, 2013 12:58
Colour Test Mixin
@mixin colour-test($color: #ff0099, $index: 1, $offset: 0) {
.box-#{$index} {
background-color: $color;
display: block;
height: 150px;
width: 150px;
top: 50px;
left: 400px + ($offset*180px);
position: fixed;
z-index: 10000;
@kilmc
kilmc / border-sandwich-mixin.scss
Last active April 9, 2018 16:49
Border Sandwich Mixin
@mixin border-sandwich($border, $just-filling: false) {
@if ($just-filling) {
&:not(:first-of-type) {
border-top: $border;
}
} @else {
@kilmc
kilmc / button-padding-mixin.scss
Last active December 30, 2015 21:38
Button Padding Mixin
@mixin button-padding($amount, $denominator: 2) {
padding: $amount/$denominator $amount;
}
@mixin floating-list($items, $spacing: 4) {
display: block;
float: left;
// margin-left: $spacing;
width: (100/$items + 0%) - ($spacing/$items + 0%);
margin-left: ($spacing/($items - 1)) + 0%;
&:first-child,
&:last-child {
margin-left: 0;
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Kilmc | Vinyl Collection</title>
<script type="text/javascript" src="../../scripts/sheetsee/ICanHaz.js"></script>
<script type="text/javascript" src="../../scripts/sheetsee/jquery.js"></script>
<script type="text/javascript" src="../../scripts/sheetsee/d3.js"></script>
<script type="text/javascript" src="../../scripts/sheetsee/tabletop.js"></script>
<script type="text/javascript" src="../../scripts/sheetsee/sheetsee.js"></script>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>We Long To Belong</title>
<link rel="stylesheet" href="stylesheets/css/screen.css" media="all">
<script type="text/javascript" src="//use.typekit.net/slh5fdy.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<!-- <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> -->
# Branch Auto-completion
# Run the following curl command in Terminal anywehre and then copypaste the if statement
# into your .bash_profile usually found in ~/.bash_profile.
# curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
const intersection = (arr1, arr2) => arr1.length > arr2.length
? arr1.filter(x => arr2.includes(x))
: arr2.filter(x => arr1.includes(x))
const getFactors = (number) => Array
.from(Array(number), (_, i) => i)
.filter(i => number % i === 0)
const calculateRatio = ([width, height]) => {
const gcf = Math.max(...intersection(getFactors(width),getFactors(height)))
@kilmc
kilmc / molecules.js
Created November 16, 2017 21:47
Molecules
const MOLECULES_LIB = {
'headline-500': ['type-38','type-48-sm','type-60-md','type-100-lg'],
'headline-400': ['type-38','type-48-sm','type-60-md','type-80-lg'],
'headline-300': ['type-21','type-38-md','type-48-lg'],
'headline-200': ['type-21','type-24-md','type-28-lg'],
'subhead-600': ['type-18','type-21-md'],
'subhead-500': ['type-16','type-21-md'],
'subhead-400': ['type-14','type-21-md'],
'subhead-300': ['type-16','type-18-md'],
'subhead-200': ['type-14','type-18-md'],
const audioArr = [
{
albumName: 'Time Management',
artwork: 'image.jpg',
releaseDate: '2015-10-02',
soundCloudLink: 'http://soundcloud.com/stuff',
spotifyLink: 'http://spotify.com',
iTunesLink: 'itunes.com'
},
{