Skip to content

Instantly share code, notes, and snippets.

View benjohnson's full-sized avatar

Ben Johnson benjohnson

View GitHub Profile
@benjohnson
benjohnson / react-nested-router.sh
Last active August 29, 2015 14:03
React Nested Router (UMD)
# React Nested Router is only distributed with CommonJS.
# To get an UMD version run the command below.
$ npm install webpack
$ npm install react-nested-router
# Make a file: webpack.config.js containing:
module.exports = { output: { libraryTarget: "umd" }, externals: { "react": "react" } }
$ /node_modules/.bin/webpack node_modules/react-nested-router/modules/main.js output.js
@benjohnson
benjohnson / dabblet.css
Created October 4, 2013 14:29
Untitled
.thingy {
background: #999;
height: 20px;
border-bottom: 4px solid #000;
}
.thingy:last-child {
border-bottom: none;
}
@benjohnson
benjohnson / dabblet.css
Created September 26, 2013 15:35
Untitled
.ico {
width:16px;
height:16px;
background: red;
margin-right: 5px;
display: inline-block;
}
.wrapper {
width: 200px;
@benjohnson
benjohnson / dabblet.css
Created September 16, 2013 21:46
Untitled
span {
width: 50px;
height: 50px;
background: red;
display: inline-block;
vertical-align: middle;
}
@benjohnson
benjohnson / dabblet.css
Created September 12, 2013 19:21
Untitled
.stuff {
background: grey;
width: 200px;
height: 200px;
box-shadow: red 1px 10px 10px -6px inset, red 1px -10px 10px -6px inset;
}
@benjohnson
benjohnson / deparam.js
Created August 23, 2013 15:34
Quick and dirty deparam function for dealing with querystrings created via traditional.
var deparam = function(paramString) {
var items = paramString.replace(/\+/g, ' ').split('&');
var returnObj = {};
_.each(items, function(params) {
var param = params.split('=');
returnObj[param[0]] = decodeURIComponent(param[1]);
var array = returnObj[param[0]].split(',');
if (array.length > 1) returnObj[param[0]] = array;
.book {
display: inline-block;
margin: 10px;
}
.book img {
vertical-align: middle;
}
.books {
.book {
display: inline-block;
margin: 10px;
}
.book img {
vertical-align: middle;
}
.books {
.book {
display: inline-block;
margin: 10px;
}
.book img {
vertical-align: middle;
}
.books {
body { margin: 0; }
.box {
background:green;
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
overflow: scroll;