Skip to content

Instantly share code, notes, and snippets.

View joelhooks's full-sized avatar
🍄

Joel Hooks joelhooks

🍄
View GitHub Profile
@joelhooks
joelhooks / README.md
Last active October 5, 2023 03:04 — forked from panva/README.md
Simple Device Flow Login CLI implementation
View README.md

Simple Device Flow Login CLI implementation

run

npx https://gist.github.com/joelhooks/c585cdab12b986fc7f1a057796e99b76
View offer.ts
import {publicProcedure, router} from '@skillrecordings/skill-lesson'
import {isEmpty} from 'lodash'
import {getToken} from 'next-auth/jwt'
import {getSubscriberFromCookie} from '@skillrecordings/skill-lesson/utils/ck-subscriber-from-cookie'
export const offerRouter = router({
getNextOffer: publicProcedure.query(async ({ctx}) => {
const token = await getToken({req: ctx.req})
const subscriber = await getSubscriberFromCookie(ctx.req)
@joelhooks
joelhooks / realtime-web.md
Created February 6, 2023 19:28
Real-Time Web Learning Path on egghead.io
View realtime-web.md

Real Time Web Learning Path

  1. A deep understanding of the protocols, operation, architecture and components that support the stack underneath large scale WebRTC.
  2. Skills in building and maintaining a Web Socket server and the client applications interacting with it.
  3. An awareness of the challenges presented in a real time web application built on Web Sockets and WebRTC with a knowledge of the industry standard approaches to solving these.

How will we help students achieve these goals?

@joelhooks
joelhooks / convertkit-stats.ts
Created November 18, 2022 18:24
Load subscriber stats from Convertkit via API
View convertkit-stats.ts
// Name: ck stats for site
// Snippet: ;ck
import "@johnlindquist/kit"
const sites = [
{
name: "Some Account",
ck_secret: await env("SOME_ACCOUNT_CK_SECRET"),
}
@joelhooks
joelhooks / code.mmd
Last active July 23, 2022 22:05
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
joelhooks / pagespeed_optimize_images.sh
Created February 25, 2022 23:57 — forked from julianxhokaxhiu/pagespeed_optimize_images.sh
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
View pagespeed_optimize_images.sh
#!/bin/bash
# https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462
# 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
View zsh-mac-setup.md

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: https://brew.sh/ is the community standard package manager for macOS and des a lot of work installing and managing libraries and tools within your shell environment.
@joelhooks
joelhooks / .gitconfig
Last active November 29, 2021 01:45
dotfiles
View .gitconfig
[user]
email = joelhooks@gmail.com
name = Joel Hooks
[core]
excludesfile = /Users/joel/.gitignore
editor = code
[init]
defaultBranch = main
[pull]
rebase = false
@joelhooks
joelhooks / egghead_CLA
Last active November 14, 2020 18:55 — forked from CLAassistant/SAP_CLA
egghead.io Individual Contributor License Agreement
View egghead_CLA
### egghead.io Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by egghead.io, LLC or its affiliates (“egghead.io”). 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 egghead.io in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact support@egghead.io.
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 egghead.io a non-exclu