Skip to content

Instantly share code, notes, and snippets.

View knice's full-sized avatar

Rob Knight knice

View GitHub Profile
@knice
knice / ucsc-wordpress.json
Last active March 24, 2026 20:18
Blueprint for testing UCSC WordPress tools
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"login": true,
"siteOptions": {
"blogname": "UCSC WordPress test environment"
},
"steps": [
{
"step": "installTheme",
"themeData": {
@knice
knice / 2026-04-30-calendar.ics
Last active April 30, 2026 22:11
sample-calendar.ics
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//UCSC Blocks//Test Fixtures//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:UCSC Test Calendar
X-WR-TIMEZONE:America/Los_Angeles
BEGIN:VEVENT
DTSTART:20260315T090000Z
@knice
knice / form-elements.html
Created May 2, 2025 21:51
HTML form elements
<fieldset>
<legend>Basic Information</legend>
<div class="form-group">
<label for="name" class="required">Full Name</label>
<input type="text" id="name" name="name" placeholder="Enter your full name" required autocomplete="name">
<div class="hint">Please enter your first and last name</div>
</div>
<div class="form-group">
@knice
knice / htaccess.txt
Created September 18, 2023 17:26
htaccess for www
<ifModule mod_headers.c>
Header set Connection keep-alive
# Cache time of 21 days (21*60*60*24)
<FilesMatch "\.(js|css)$">
Header set Cache-Control "max-age=1814400"
</FilesMatch>
# Cache time of 60 days (60*60*60*24)
<FilesMatch "\.(ico|svg)$">
Header set Cache-Control "max-age=5184000"
</FilesMatch>
<div class="ribbon ribbon-warning" role="complementary" style="
margin-bottom: 2em;
padding: .85em;
font-size: 1.1rem;
line-height: 1.3;
background-color: #fff3cd;
border-color: #ffeeba;
color: #856404;
">
<div class="inner">
@knice
knice / slugs.html
Last active August 5, 2022 22:22
Banana Slugs
<h2>Slug 1</h2>
‎‎​<svg viewBox="0 0 975 936" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2">
<path style="fill:none" d="M0 0h974.599v935.742H0z"/>
<path d="M245.77 3.915c19 5.1 35.9 22.9 40.6 42.6 4.5 19.2-1.4 39-15.9 53.3-11.5 11.4-23.6 16.5-39.1 16.5-10.1-.1-15.1-1.2-24.4-5.7-9.2-4.4-20.1-14.9-24.9-24-4-7.6-7.2-19.7-7.2-27.3 0-7.5 3.2-19.7 7.2-27.3 4.1-7.9 15.4-19.2 23.4-23.4 3.3-1.8 8.7-3.9 11.9-4.8 7.3-1.9 21.2-1.8 28.4.1Zm-23.8 31.6c-4.7 1.5-11.1 7.5-13.4 12.8-2.7 6.1-2.7 16 0 22 4.1 9.1 12.4 14.2 22.8 14.2 10.1 0 18.1-4.8 22.8-13.7 2.8-5.3 3-17.4.3-22.5-6.4-12.4-18.4-17.1-32.5-12.8Zm-115.2-31.6c17.4 4.7 31.8 18.4 38.9 37.2 2.2 5.8 2.6 8.3 2.6 18.2 0 9.9-.4 12.4-2.6 18.2-3.8 10.1-8.6 17.4-15.5 23.8-11.3 10.3-23.1 15-37.8 15-15.6 0-27.6-5.1-39-16.5-14.7-14.6-20.5-34.1-16-53.4 4.7-19.7 21.9-37.6 41-42.6 7.3-1.9 21.2-1.8 28.4.1Zm-24.6 32c-8 2.9-15.3 14.1-15.3 23.4 0 5.2 3.1 13.1 6.8 17.2 4.9 5.5 10.9 8 18.7 8
@knice
knice / overview.md
Last active January 28, 2022 16:58
Web Renewal Project, 2022

Web Renewal Project, 2022

An overview of the major parts of the project.

1. Truss Design System

The tools and documentation that give campus personnel the ability to create branded websites and web applications.

  • a.1 contains initial components (<10) and docs as proof of concept for feedback (2/5/2022)
  • b.1 contains all of the components identified in the current WCMS templates
  • b.2 contains new components identified as necessary for branded websites
@knice
knice / fractal.config.js
Created January 12, 2022 22:00
Fractal draft config
"use strict";
/* Create a new Fractal instance and a theme instance */
const fractal = (module.exports = require("@frctl/fractal").create());
const pkg = require("./package.json");
const context = {
package: {
name: "Truss Design System",
version: pkg.version,
@knice
knice / settings.json
Created August 19, 2021 16:32
VS Code settings
{
"editor.fontSize": 13,
"editor.fontFamily": "'Fira Code', 'JetBrains Mono', 'Source Code Pro', 'Input Mono', 'Menlo'",
"editor.renderLineHighlight": "gutter",
"editor.matchBrackets": "near",
"terminal.integrated.confirmOnExit": false,
"emmet.triggerExpansionOnTab": true,
"editor.quickSuggestions": true,
"editor.formatOnPaste": true,
"editor.lineHeight": 20,
@knice
knice / code-changes.md
Last active June 15, 2021 18:00
WCMS block changes for 2021 server upgrade

Process for updating global footer blocks for WCMS sites

For the copyright year (all pages)

  1. Edit the block: uniform-campus-footer
  2. In the code view, remove this code: <!--#config timefmt="%Y" --><!--#echo var="DATE_LOCAL" -->
  3. Replace it with this code: <!--#passthrough<?php echo date('Y'); ?>#passthrough-->

For the check-ip (hidden) span tag in the bottom of the page (all pages)