Skip to content

Instantly share code, notes, and snippets.

OliverJAsh /
Last active Aug 29, 2015
`git stash pop` not merging

If you’re trying to pop a stash and Git won’t merge for you because you have changes in your index to the same file(s) (Git needs to use the index to do a merge at all), i.e.:

❯ gsp
error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge.
OliverJAsh / Plumbing.js
Last active Aug 29, 2015
The Plumber equivalent of the Gruntfile from
View Plumbing.js
var all = require('plumber-all');
var glob = require('plumber-glob');
var bower = require('plumber-bower');
var uglifyjs = require('plumber-uglifyjs')();
var concat = require('plumber-concat');
var filter = require('plumber-filter');
var mincss = require('plumber-mincss');
var rename = require('plumber-rename');
OliverJAsh / foo.js
Created Apr 12, 2014
Uncompress a HTTP response when needed
View foo.js
var request = require('request');
var stream = require('stream');
var zlib = require('zlib');
var websiteRequest = request('', {
headers: {
'Accept-Encoding': 'gzip,deflate'
OliverJAsh / SassMeister-input-HTML.html
Created May 9, 2014
Generated by
View SassMeister-input-HTML.html
<div class="l-row l-desktop-row">
<div class="l-desktop-row__item flex-2">
<section class="island">
<h1>We build in pursuit of a cause that is greater than ourselves.</h1>
<div class="l-row l-tablet-row l-tablet-row--max-2">
<div class="l-tablet-row__item">
<section class="island">
<h1 class="h3">Empowering journalists</h1>
<p>We build products that make it easier for journalists to publish informative and delightful stories.</p>
<div class="l-row l-default-row l-default-row--max-2">
View a.rb
@mixin font-size($percent, $min-font-size, $max-font-size) {
// Min
font-size: $min-font-size;
@include breakpoint($min-font-size/$percent * 100) {
font-size: #{$percent}vw;
@include breakpoint($max-font-size/$percent * 100) {
font-size: $max-font-size;
OliverJAsh / inheritance.css
Created Jun 21, 2014
CSS tooling: implicit style dependencies
View inheritance.css

I see this quite often in CSS: something doesn't look right, so we apply some new styles on our class to make it look right.

Instead we need to review what the current styles are, and where they come from – another class (composition) or inheritance. If you’re changing the font-family style, for example, you should have a look to see what might be currently setting that property in the styles pane, and identify how it’s cascading to this element. It may be that you can remove it from a parent element, or you might need to override it with a class. Without reviewing the code is this way, you CSS codebase can easily become bloated with style overrides.

Chrome DevTools makes reviewing the cascade very easy with its styles pane. However, when you look at some CSS code in your IDE, it’s not at all explicit what styles will be inherited or applied through composition. This means we have to have strong discipline in documenting our CSS – where you’re unsetting or resetting a style that is inherited, you might le

OliverJAsh / TODO
Created Jul 25, 2014
Virtual DOM experiment for Scribe
Broken deps:
* vdom => global
* global => min-document
OliverJAsh /
Last active Aug 29, 2015
longjohn interoperability with Traceur call stacks
npm install
node traceur-runner.js main.js
jspm install
npm i http-server
./node_modules/.bin/http-server -c-1 -o -p 8081
npm install
./node_modules/.bin/traceur --out out.js test.js

node main.js