Skip to content

Instantly share code, notes, and snippets.


Joel Hooks joelhooks

View GitHub Profile
joelhooks / code.mmd
Last active Jul 23, 2022
Concept Map of Concept Map Mermaid Diagram
View code.mmd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
joelhooks /
Created Feb 25, 2022 — forked from julianxhokaxhiu/
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
# Improved as per feedback from @pascal -
# brew install optipng pngcrush jpegoptim
find . -type f -iname "*.png" -exec optipng -nb -nc {} \;
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \;
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \;
View ubd-7.txt
The Seven Tenets of the UbD Framework
1. Learning is enhanced when teachers think purposefully about curricular planning. The UbD framework helps this process without offering a rigid process or prescriptive recipe.
2. The UbD framework helps to **focus curriculum and teaching on the development and deepening of student understanding and transfer of learning** (i.e., the ability to effectively use content knowledge and skill).
3. Understanding is revealed when students autonomously make sense of and transfer their learning through authentic performance. Six facets of understanding—the capacity to explain, interpret, apply, shift perspective, empathize, and self-assess—can serve as indicators of understanding.
4. Effective curriculum is planned backward from long-term, desired results through a three-stage design process** (Desired Results, Evidence, and Learning Plan). This process helps avoid the common problems of treating the textbook as the curriculum rather than a resource, and activity-oriented teachin

Basic zhs Developer Shell Setup for a New M1 Mac

These are notes about my personal setup for a new macOS computer. Some of the instructions might be incorrect for your environment

Getting Started

You'll need several things installed on your machine to proceed with configuring zsh beyond the defaults.

  • Xcode Command Line Tools: just run xcode-select --install. This is an SDK and tool for development in the command line environment. Lots of things depend on it and it's essential.
  • homebrew: is the community standard package manager for macOS and des a lot of work installing and managing libraries and tools within your shell environment.
View .gitconfig
email =
name = Joel Hooks
excludesfile = /Users/joel/.gitignore
editor = code
defaultBranch = main
rebase = false
joelhooks / egghead_CLA
Last active Nov 14, 2020 — forked from CLAassistant/SAP_CLA Individual Contributor License Agreement
View egghead_CLA
### Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by, LLC or its affiliates (“”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to a non-exclu
joelhooks / progress.sql
Created Oct 10, 2020
access the individual user's progress through a list of lists via polymorphic join table
View progress.sql
select lesson from (
-- root collection is a collection of collections (playlist of playlists) which use a polymorphic join table (tracklists) so we want to snag the ids of the sub-collection.
root_collection_ids as ( select tracklists.tracklistable_id id from playlists inner join tracklists on = tracklists.playlist_id where playlists.slug = 'some-playlist-id' and tracklists.tracklistable_type = 'Playlist'),
-- the next layer are video resources (lessons) that are the tracklists of the tracklists
lesson_ids as (select tracklists.tracklistable_id lesson_id from root_collection_ids inner join tracklists on = tracklists.playlist_id where tracklists.tracklistable_type = 'Lesson' )
-- we only care about completions so we can get the slug id for all of the video resources (lessons) the user has completed and sort display on the client accordingly
View machine.js
const playerMachine = Machine({
id: 'player',
initial: 'loading',
context: {
retries: 0
states: {
loading: {
on: {
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions