Skip to content

Instantly share code, notes, and snippets.

View basham's full-sized avatar

Chris Basham basham

View GitHub Profile
@basham
basham / controller.js
Created May 5, 2023 15:17
Integrate Lit's reactive controllers with React.
import { useEffect, useReducer, useRef } from 'react';
export class Controller {
#host;
constructor (host) {
this.#host = host;
host?.addController(this);
}
@basham
basham / SketchSystems.spec
Last active January 13, 2020 15:23
Kiosk Admin
Kiosk Admin
check in records -> Check in records
kiosks -> Kiosks
Check in records
# Filter by (and group by?):
# Campus, Care Unit, Kiosk, Service,
# Date (today, custom), Date range (this week, this semester, custom),
# Status (checked in, checked out), Student,
@basham
basham / SketchSystems.spec
Last active December 13, 2019 16:50
Kiosk System &
Kiosk System &
Room device
# On enter or check in: Refresh QR code.
Idle
check in with username -> Enter username
scan QR code -> Check authentication?
Enter username
@basham
basham / css-media-queries-best-practices.md
Last active May 21, 2024 16:49
CSS Media Queries: Best Practices

CSS Media Queries: Best Practices

@basham
basham / qn.json
Created February 11, 2015 20:55
Quick Notes API
{
"notes":{
"1":{
"id":1,
"title":"Welcome",
"categoryId":1,
"note":"Welcome to the Kelley School of Business! Your acceptance into our school is a demonstration of the excellent work that you have completed during your first semester at Indiana University. The Kelley School of Business has a long history of graduating the brightest stars in the business world..."
},
"2":{
"id":2,
@basham
basham / analyze-css.student.txt
Created December 19, 2014 17:00
Examining colorguard (npm) and analyze-css (npm) terminal output
analyze-css --file student.css -p
{
"generator": "analyze-css v0.9.1",
"metrics": {
"base64Length": 0,
"redundantBodySelectors": 0,
"redundantChildNodesSelectors": 0,
"colors": 35,
"comments": 10,
"commentsLength": 338,
@basham
basham / terms-service.js
Last active August 29, 2015 14:10
Demonstrating how JSON fixtures get replaced by endpoints, in the Kuali Student Course Registration proof of concept.
'use strict';
angular.module('kscrPocApp')
.factory('termsService', function ($resource, apiService) {
return $resource(apiService.get('terms'), {}, {
query: {
method: 'GET',
cache: true,
isArray: true
}
@basham
basham / README.md
Last active August 29, 2015 14:06
Static KRAD Sample App

Instructions

Start KRAD Sample App. Then run the following shell script.

bash static-krad-sampleapp.sh
@basham
basham / css-units-best-practices.md
Last active October 9, 2024 20:03
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units

@basham
basham / element-query-spec.md
Last active August 29, 2015 14:03
Element Queries Draft Spec