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
Created October 31, 2023 09:16
Automatically populates the breadcrumb on Herbert West Landscaping webiste
// To use, insert the following in `<body>`: <script src="/js/breadcrumb.js"></script>
// Function to capitalize the first letter of a string
function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
// Function to replace hyphens with spaces and format words
function formatBreadcrumbItem(item) {
return item
@rsgranne
rsgranne / include.js
Last active May 13, 2026 21:19
Function to include HTML content below a specified element, id, or class
// Function to include HTML content below a specified element, id, or class
function includeHTML(url, targetElement = null) {
// Fetch the external HTML file
fetch(url)
// Convert the response from the server into plain text
.then(response => response.text())
// Work with the HTML text after it has been loaded
.then(data => {
@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 August 2, 2025 23:47
Bootstrap 5 CDN template for Web dev courses (2025-08-02 to 5.3.7)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Untitled</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous">
<link rel="stylesheet" href="/css/main.css">
@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>