Skip to content

Instantly share code, notes, and snippets.

View knice's full-sized avatar

Rob Knight knice

View GitHub Profile
@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)

@knice
knice / .editorconfig
Created November 22, 2019 21:42
editorconfig defaults for the UCSC web team
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

To the members of the MIT community:

We are writing to inform you of plans to upgrade the MIT campus network, and in particular to upgrade MIT to the next generation of Internet addressing. (Please note that no action is required on your part.)

Machines on the Internet are identified by addresses. The current addressing scheme, called IPv4, was specified around 1980, and allowed for about 4 billion addresses. That seemed enough at the time, which was before local area networks, personal computers and the like, but the Internet research community recognized around 1990 that this supply of addresses was inadequate, and put in place a plan to replace the IPv4 addresses with a new address format, called IPv6. IPv6 uses a 128-bit address scheme and is capable of 340 undecillion addresses (340 times 10^36, or 340 trillion trillion trillion possible IP addresses). This stock of addresses allows great flexibility in how addresses are assigned to hosts, for example allowing every host to use a range of addresses to