Skip to content

Instantly share code, notes, and snippets.

@kavanagh
kavanagh / mini.css
Last active October 12, 2016 03:18
html{font:400 110%/1.3 sans-serif;box-sizing: border-box;}*,*:before,*:after{box-sizing: inherit;}
body{margin:0;}
h1,h2,h3,h4{font:400 1.5rem/1.1 sans-serif;}
h1,h2,h3,h4,p,.w0,.w1,.w2,.w3,.w4{display:block;margin-left:auto;margin-right:auto;width:100%;max-width:35rem;}
.w1{max-width:40rem;}.w2{max-width:45rem;}.w3{max-width:50rem;}.w4{max-width:55rem;}
h1,h2,h3,h4,.v1,.v2,.v3,.v4{margin-top:0;margin-bottom:0;}
.v1{margin-bottom:0.5rem;}.v2{margin-bottom:1rem;}.v3{margin-bottom:1.5rem;}.v4{margin-bottom:2.5rem;}
.v5{margin-bottom:4rem;}.v6{margin-bottom:6rem;}
.outline{display:block;outline:1px dotted rgba(0,0,0,0.2);}
.sm{font-size:smaller;}.lg{font-size:larger;}
#!/usr/bin/env bash
echo ""
read -p "Local directory for the project (use lowercase with dashes) : " dir;
read -p "(press enter to use the default \"master\") : " branch;
git clone -b ${branch:-master} --single-branch ssh://git@github.com/ft-interactive/starter-kit.git $dir && cd $dir && ./configure && npm start -- --open
@kavanagh
kavanagh / README.md
Last active June 9, 2016 09:09
How to include data in a project repo

Notes on how to include data in a project repo...

An ideal folder structure:

/my-project
  .gitignore
  /data
    - things.csv
@kavanagh
kavanagh / SassMeister-input-HTML.html
Created August 26, 2014 10:25
Generated by SassMeister.com.
<button class="foo">Foo</button>

Testing code highlighting

%thing{
  @extend %baz;
}

.thing{
 @include foo(bar);
@kavanagh
kavanagh / 0_reuse_code.js
Created May 3, 2014 09:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kavanagh
kavanagh / SassMeister-input.scss
Created April 29, 2014 00:41
Generated by SassMeister.com.
// ----
// Sass (v3.3.5)
// Compass (v1.0.0.alpha.18)
// ----
@function option($map, $name, $default) {
@return if(map-has-key($map, $name), map-get($map, $name), $default);
}
@mixin foo($opts...) {
@kavanagh
kavanagh / README.md
Last active August 29, 2015 14:00
Draft read me for o-io.

o-io

Module developers

Modules should rely on services to get or save data. Access to these services SHOULD be via an o-io service to allow the product the ability to override or extend all (or part) of the module's strategy for doing I/O.

A module should NOT:

  • use XMLHttpRequest, localStorage, cookies or IndexDB
  • use a library such as $.ajax or superagent directly
<!DOCTYPE html>
<html>
<head>
<title>Save SVG</title>
</head>
<body>
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.0"
var express = require('../../');
var app = express();
app.get('/', function(req, res){
res.send('Hello World');
});
app.listen(3000);
console.log('Express started on port 3000');