Skip to content

Instantly share code, notes, and snippets.

View rsgranne's full-sized avatar

Scott Granneman rsgranne

View GitHub Profile
@rsgranne
rsgranne / ai-tasks-intro-idm.md
Last active May 6, 2026 05:24
AI class work for Intro to IDM

3

The library is launching a new media lab with podcasting equipment, video editing stations, green screen space, lighting kits, and audio recording booths. Students can reserve time online. The lab opens next month. Create an announcement for a general audience.

4

A local nonprofit wants an interactive digital media campaign that encourages young adults to volunteer once a month. They have almost no budget. They can use Instagram, TikTok, posters with QR codes, a simple website, and short videos.

Generate 5 campaign ideas for this nonprofit.

@rsgranne
rsgranne / hamburger-white.html
Created April 30, 2026 17:05
White hamburger menu for Bootstrap 5
url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
@rsgranne
rsgranne / count-html-boolean-attributes.sh
Created March 6, 2026 08:46
Extract the WHATWG HTML attribute index table and count Boolean attributes
#!/usr/bin/env bash
# Count Boolean attributes in the WHATWG HTML attribute index
#
# License: CC0 / Public Domain
# https://creativecommons.org/publicdomain/zero/1.0/
# You may use, modify, and redistribute this script without restriction.
#
# Source table:
# https://html.spec.whatwg.org/multipage/indices.html#attributes-1

You can find these instructions at https://chnsa.ws/25r.


Create new folders: js & includes.

Create new file in includes: footer.html.

Cut <footer> … </footer> from index.html & paste into footer.html & save it.

@rsgranne
rsgranne / breadcrumb.js
Last active October 11, 2026 07:09
Automatically populates the breadcrumb on Herbert West Landscaping webiste
// https://chnsa.ws/25q
// To use, insert the following in <head>: <script src="/js/breadcrumb.js" defer></script>
// The page also needs <header id="header">, because the breadcrumb is added to the end of it.
// Capitalizes the first letter of a word
function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
// Formats a string for breadcrumb display: replaces hyphens, applies title casing (except small words)
@rsgranne
rsgranne / include.js
Last active October 11, 2026 07:08
Function to include HTML content below a specified element, id, or class
// https://chnsa.ws/25p
// Function to include HTML content below a specified element, ID, or class
function includeHTML(url, targetElement = null) {
// Fetch the external HTML file
fetch(url)
// Check that the file was found, then convert the response from the server into plain text
.then(response => {
// A missing file (like a 404) still sends back a response, so stop here with an error
if (!response.ok) {
@rsgranne
rsgranne / system-fonts-bs522.css
Created November 21, 2022 20:39
System font stack used by Bootstrap 5.2.2
font-family: system-ui, -apple-system,"Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
@rsgranne
rsgranne / bootstrap-5-cdn.html
Last active October 8, 2026 20:50
Bootstrap 5 CDN template for Web dev courses (2026-10-08 to 5.3.8)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Untitled</title>
@rsgranne
rsgranne / bootstrap-5-nav-sample.html
Created October 5, 2021 12:51
Bootstrap 5 nav sample
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
@rsgranne
rsgranne / bootstrap-5-cdn.html
Last active September 13, 2024 12:40
Bootstrap 5 CDN template for Web dev courses
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Untitled</title>