Skip to content

Instantly share code, notes, and snippets.

Casey Watts caseywatts

Block or report user

Report or block caseywatts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@caseywatts
caseywatts / 0-self-publishing.md
Last active Nov 14, 2019
Self-Publishing via Markdown
View 0-self-publishing.md

short url: caseywatts.com/selfpublish


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
caseywatts / bookmarkleting.md
Last active Nov 10, 2019
Making Bookmarklets
View bookmarkleting.md

Making Bookmarklets

I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!

A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:.

This guide will walk you through creating your first bookmarklet. For a more thorough guide check out the great website Bookmarklets - Browser Power.

Some bookmarklets are pretty cool. Become a spaceship that shoots and destroys elements on the webpage you're on with Kick Ass. Or make pages rainbow and sparkly with Cornify.

@caseywatts
caseywatts / jscodeshift.md
Last active Nov 7, 2019
Sharing jscodeshift codemods
View jscodeshift.md

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
caseywatts / 0-README.md
Last active Nov 5, 2019
WHAT IF you could magically have browser-sync (livereload+mobileview) on every static html project, without any setup in the project? You can 🎉🎉🎉
View 0-README.md
View MediawikionHeroku.md
@caseywatts
caseywatts / quicktime-hangouts-recording.md
Last active Oct 15, 2019
Quicktime Hangouts Recording (using soundflower for audio)
View quicktime-hangouts-recording.md

Short link to this page: caseywatts.com/quicktime

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Quicktime + Hangouts Recording

Scenario: You want to talk with someone over google hangouts (like for a user study), and you want to record BOTH:

  • the system output audio (from them)
  • the microphone audio (from you)
@caseywatts
caseywatts / 0 push to talk.md
Last active Sep 5, 2019
Push To Talk - Google Meet Bookmarklet
View 0 push to talk.md

Short link to this page: http://caseywatts.com/ptt

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Push To Talk in a Google Hangout (Meet)

  1. Save this bookmarklet. Right-click on boomarks toolbar Add Page...
    • Name: PTT (push to talk) or whatever you'd like (maybe short so it stays on your bookmarks toolbar)
    • URL: (paste in the bookmarklet.js contents below)
  2. In a Meet, click on the bookmarklet
@caseywatts
caseywatts / 0 - Chrome Workshop.md
Last active Aug 15, 2019
Chrome Extension Workshop
View 0 - Chrome Workshop.md
@caseywatts
caseywatts / 0.md
Last active May 1, 2019
heroku flip bookmarklet
View 0.md
@caseywatts
caseywatts / darken.md
Last active Apr 9, 2019
Darkening PDFs
View darken.md

short url to these instructions: caseywatts.com/darken

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Using Monochrome (recommended)

  • obtain your ugly, gray pdf
  • brew install imagemagick
  • brew install ghostscript
  • magic command!
You can’t perform that action at this time.