Skip to content

Instantly share code, notes, and snippets.

Avatar
😄
Hi, I’m Casey!

Casey Watts caseywatts

😄
Hi, I’m Casey!
View GitHub Profile
View Intro To Programming Skill Tree.md

I wrote this skill tree diagram for teaching Intro to Programming with the YEI Tech Bootcamp Summer 2014. Boxes are greyed out after they have been covered in the course. Some topics are not required to progress to the farther parts, like how "csv import/export" isn't required to move beyond database section beyond to the web app sections, but it would be natural to teach in that section if we wanted to cover it. Each big-box section ends with a project/assessment to make sure the students understand the content enough to apply it, before move on.

This uses graphviz to print a .dot file to a png. To learn more about the dot format, check out my graphviz tutorial.

To generate the image after modifying the dot file, try this:

  1. Install graphviz brew install graphviz
  2. Run this command to create and open the image: dot -Tpng:quartz:quartz developercurriculum.dot -o courseprogress.png && open courseprogress.png
@caseywatts
caseywatts / quicktime-hangouts-recording.md
Last active Oct 19, 2021
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

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Quicktime + Hangouts Recording

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

View javascript sort numbers
a = `10
13
10
9
14
10`
b = a.split("\n")
c = b.map(a => Number(a))
d = c.sort((a, b) => b-a)
@caseywatts
caseywatts / darken.md
Last active Mar 31, 2021
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!
@caseywatts
caseywatts / chromeextensioning.md
Last active Mar 22, 2021
Chrome Extensioning
View chromeextensioning.md

Chrome is, by far, the easiest browser to make extensions for. Google's documentation for this is pretty good and thorough!

Getting Started

Setup

  1. Make a folder cloudtobutt somewhere on your computer (in a code folder? or on your desktop? up to you!)
  2. Save your js script in that folder as cloudtobutt.js
  3. Make a file named manifest.json and copy-paste in an example:
@caseywatts
caseywatts / randomgroupsofx.rb
Last active Mar 10, 2021
Random Groups of X
View randomgroupsofx.rb
LISTOFNAMES = %{...}
GROUPSIZE = 5
names = LISTOFNAMES.split("\n")
shufflednames = names.shuffle
shufflednames.each_slice(GROUPSIZE).with_index do |group, i|
puts "\nGroup " + i.to_s
group.each {|name| puts name}
end
@caseywatts
caseywatts / 0 README.md
Last active Jan 4, 2021
Accordion Keyboard Layout for FL Studio
View 0 README.md

About

FL Studio support custom layouts for the "typing keyboard to piano keyboard" feature, and I made one to represent the top four rows of an accordion! The left-hand bass side of the accordion (the stradella bass system) is laid out to make playing roots of chords and common chords very easy, and it's laid out using the circle of fifths to make the common chords (V and IV) very accessible. Here is my favorite accordion fingering chart: http://accordionscanada.com/bassrangev3.jpg

The top four rows of this FL Studio layout:

  1. The 12345 row is the third of the chord row
  2. The QWERTY row is the main root chord row - the Y key is C
  3. The ASDFG row is the major chord row
  4. The ZXCVB row is the minor chord row

Need the the seventh chord or diminished chord rows? You could make another layout yourself if you need them (and please comment it below!)

@caseywatts
caseywatts / 0 README.md
Last active Dec 16, 2020
Remove "New! Messenger App for Windows" Banner
View 0 README.md

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

Remove Facebook Messenger's "New! Messenger App for Windows" Banner

Bookmarklet

  1. Save this bookmarklet. Right-click on boomarks toolbar Add Page...
    • Name: Remove Messenger Banner (or whatever you like)
    • URL: (paste in the bookmarklet.js contents below)
  2. Each time you open messenger.com, click the bookmarklet and that pesky banner will be gone.
@caseywatts
caseywatts / Gemfile
Last active Feb 19, 2020
Sinatra on Cloud9
View Gemfile
source 'https://rubygems.org'
gem 'sinatra'
gem 'sinatra-contrib'
@caseywatts
caseywatts / jscodeshift.md
Last active Jan 31, 2020
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