Skip to content

Instantly share code, notes, and snippets.

View basham's full-sized avatar

Chris Basham basham

View GitHub Profile
@basham
basham / nodejs-rfid.js
Last active July 17, 2023 04:06
Use NodeJS to read RFID ids through the USB serial stream.
/*
DESCRIPTION
-----------
Use NodeJS to read RFID ids through the USB serial stream. Code derived from this forum:
http://groups.google.com/group/nodejs/browse_thread/thread/e2b071b6a70a6eb1/086ec7fcb5036699
CODE REPOSITORY
---------------
https://gist.github.com/806605
<!-- Source: http://pastebin.com/0zQvqpZ8 -->
<!-- Screenshot: http://i.imgur.com/bdspMbL.jpg -->
<!-- Line 130 -->
<div class="alert-danger">
<ul class="uif-validationMessagesList uif-pageValidationMessage-single">
<li class="uif-errorMessageItem">
<img class="uif-validationImage" src="http://env6.ks.kuali.org/themes/ksboot/images/validation/error.png" alt="Error"> <a href="#">Administering Organizations: 1 error</a>
</li>
</ul>
@basham
basham / ks-css-best-practices.md
Last active August 29, 2015 14:01
Kuali Student CSS Best Practices

Table of contents

  1. Principles

Principles

  1. Readability: Names of selectors must inherently describe the location of the corresponding source code.
  • Modularity: Styles should be grouped and isolated by their respective domain of use.
  • Low coupling: Styles should never depend on the structure or semantics of markup.
June 25 JIRAs
KULRICE-10203
KULRICE-10360
KULRICE-10367
KULRICE-10371
KULRICE-10373
KULRICE-10376
KULRICE-10394
KULRICE-10454
KULRICE-10775
@basham
basham / element-query-spec.md
Last active August 29, 2015 14:03
Element Queries Draft Spec
@basham
basham / css-units-best-practices.md
Last active April 18, 2024 16:44
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 / 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 / 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 / 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 / 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,