Skip to content

Instantly share code, notes, and snippets.

View hepplerj's full-sized avatar
💭
building the history web

Jason Heppler hepplerj

💭
building the history web
View GitHub Profile
@hepplerj
hepplerj / index.html
Created August 27, 2015 19:11
D3 starter
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>DHRG</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
</head>
@hepplerj
hepplerj / custom.css
Created April 28, 2014 01:47
Custom Gitit CSS
@import url("screen.css"); /* default gitit screen styles */
@import url("hk-pyg.css"); /* for syntax highlighting */
/* My custom Gitit CSS styling, in part based on Twitter Bootstrap */
body {
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 20px;

A quick and dirty script to check out each commit of a writing project and find the word count of each Markdown file at that point in time. You might want to use this on a clone of your writing repository. NO WARRANTY EXPRESS OR IMPLIED.

@hepplerj
hepplerj / index.html
Last active August 29, 2015 14:03
Brush Removal with Button
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: sans-serif;
color: #000;
text-rendering: optimizeLegibility;
}
#!/usr/bin/env python
from pandocfilters import toJSONFilter, RawInline, Str, Space
"""
Pandoc filter for Markdown that converts all notes to inline notes.
If input notes had multiple paragraphs, the paragraphs are joined
by a single space.
"""
# Ruby example
reverse_lines = File.open("poem.txt").readlines.reverse
# p reverse_lines
reverse_lines.each do |line|
words = line.split.reverse
puts words.join(" ")
end
!function(){function n(n){return null!=n&&!isNaN(n)}function t(n){return n.length}function e(n){for(var t=1;n*t%1;)t*=10;return t}function r(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function u(){}function i(n){return aa+n in this}function o(n){return n=aa+n,n in this&&delete this[n]}function a(){var n=[];return this.forEach(function(t){n.push(t)}),n}function c(){var n=0;for(var t in this)t.charCodeAt(0)===ca&&++n;return n}function s(){for(var n in this)if(n.charCodeAt(0)===ca)return!1;return!0}function l(){}function f(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function h(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var e=0,r=sa.length;r>e;++e){var u=sa[e]+t;if(u in n)return u}}function g(){}function p(){}function v(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new u;return t.on=function(t,u){var i,o=r.get(t);return arguments
x ->
i -> n -> _ -> q -> n -> 2
_ -> q -> i -> n -> g -> 4 -> n ->
3
i -> a -> n -> _
@hepplerj
hepplerj / data.json
Last active August 29, 2015 14:07
Tree Diagram
{
"name": "x",
"children": [
{
"name": "i",
"children": [
{
"name": "n",
"children": [
{
@hepplerj
hepplerj / acids.html
Last active August 29, 2015 14:07
Foodstuffs Normalized Stacked Barchart
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,