Skip to content

Instantly share code, notes, and snippets.


Casey Watts caseywatts

View GitHub Profile
caseywatts /
Last active Jun 24, 2020
Self-Publishing via Markdown

short url:

Markdown --> PDF (as a booklet!)

Markdown --> EPUB and MOBI

I'm working on a book, "Debugging Your Brain" which I plan to self-publish. I'm writing the chapters in Markdown, and I want to have it both printed on paperback and available as an eBook on Kindle etc. Here are the tools I used to get my markdown files (from my Jekyll based blog) into the PDF, EPUB, and MOBI formats.

caseywatts /
Created Feb 19, 2019
Where in the World?
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
caseywatts /
Last active Nov 15, 2018
Code of Conduct in Ember

Todd Evanoff and I just did a quick survey of Code of Conduct in Ember plugins.

For posterity, the top 10 addons on Ember Observer as of Nov 15, 2018:

caseywatts / gist:c5d840862d9693c6a8d84bd2bd83c3d3
Created Oct 12, 2018
Mirage Includes & Relationship Records
View gist:c5d840862d9693c6a8d84bd2bd83c3d3

Mirage Includes

The way mirage mocks out our included records isn't accurate currently.

An example: In a request for addon, it includes some information about the relationship to company.

The "relationship object" we get looks like

company: { id: 123 }
caseywatts /
Last active Jan 31, 2020
Sharing jscodeshift codemods

codemod-cli is straightforward - but it's especially made for codemod projects that have multiple transforms. For a single transform, we could/should have a simpler interface for consumers.

Here are three ways to share your codemod with others. The npx methods require you npm publish the repo.

Method 1 - global install, using githubusercontent

Easiest method for the developer, especially if you only have one transform and/or if you're not using codemod-cli. This uses the github-hosted raw.githubusercontent link to run it, kinda like running it from a gist. Here's an example using ember-mocha-codemods.

npm install -g jscodeshift
caseywatts / 0
Last active Feb 22, 2019
Generate Graphviz Files for Project
View 0

short url:

Graphviz is like markdown, for diagrams.

It's a tool that can transform text input into a "directed graph" output, which is nodes pointing to other nodes. You can use it for architecture diagrams, DB diagrams, documentation for users, etc.


You'll want to use a tool with a two-pane layout - the left side is the source text, the right side is the image output.

caseywatts /
Last active Feb 26, 2018
Bubbles! Graphviz Diagram
digraph bubbles {
node [
edge [
View Wassailing&


G C F Bb Eb Ab
1 0 1 2 3 4
F# _ Bb Bb, Eb Bb, Eb, Ab Bb, Eb, Ab, Db
Song Key Starting Note
Gloucestershire Wassail G D (5) -> G (1)
caseywatts / 0
Last active Jun 1, 2018
d3 & c3 npm shim to es6 module for Ember
View 0
You can’t perform that action at this time.