Skip to content

Instantly share code, notes, and snippets.

Date: August 10, 2015
# Charts
I recently found out about [Morris.js](http://morrisjs.github.io/morris.js/#getting-started). It makes embedding interactive charts inside blog posts straightforward. View [the source](http://pastebin.com/raw.php?i=U8wRmV3a) for this post.
<div id="myfirstchart" style="height: 250px;width:105%;margin-left:-2.5%"></div>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
@davidmerfield
davidmerfield / Tags
Created February 17, 2016 09:38
List all the tags used on your blog and the associated entries
{{#allTags}}
<a href="/tagged/{{name}}">{{name}} - {{entries.length}}</a>
<ul>
{{#entries}}
<li class="small"><a href="{{url}}">{{title}}</a></li>
{{/entries}}
</ul>
{{/allTags}}
@davidmerfield
davidmerfield / layout.txt
Last active September 6, 2017 22:15
Layout tags on Blot
# Layout & typography
{>|} ![A book cover looks great in the margin](https://c1.staticflickr.com/5/4096/4780208213_25074f6779.jpg)
NEW YORK – Text set in all caps gets converted to small-caps by default. This means that acronyms like BBC don’t stand out relative to the rest of the text. Acronyms even work with accents like ÀÊØ. A possessive [acronym](/) like CNN's opinion works as well. What about the FCC! The so called (BBC). Also I automatically convert three dots to an ellipsis... « Hello » there should have non-breaking spaces between the punctuation and the word...
Accents all work perfectly in Georgia. Al­brecht Dürer, François Truf­faut, Plácido Domingo should all render appropriately. Cause célèbre, piña co­lada, Göt­ter­däm­merung straße all work too. Links also are improved: note how the [descenders get cleared](/) from the underline stroke. Composing content for the web is complicated because the designer has no control over the dimensions of the screen on which the content will be viewed?
"Han
@davidmerfield
davidmerfield / server.js
Last active August 29, 2015 14:03
Dropbox authentication with Node Express server
var express = require('express'),
server = express(),
events = require('events'),
eventEmitter = new events.EventEmitter(),
Dropbox = require("dropbox"),
options = {
key: 'DROPBOX_KEY',
secret: 'DROPBOX_SECRET'
};