Skip to content

Instantly share code, notes, and snippets.

View ProfAvery's full-sized avatar

Kenytt Avery ProfAvery

  • California State University, Fullerton
  • Fullerton, CA
View GitHub Profile
@ProfAvery
ProfAvery / build.xml
Last active October 24, 2016 04:08
Ant build file to run an HSQLDB Database Server
<?xml version="1.0" ?>
<!--
HSQLDB database server
Install Ant
Place this build.xml in a directory by itself
(e.g. C:\hsqldb or $HOME/hsqldb)
@ProfAvery
ProfAvery / config.yaml
Created September 10, 2014 05:56
Correctly indented config.yaml
message: This is a message defined in the configuration file config.yaml
messageRepetitions: 3
database:
driverClass: org.hsqldb.jdbc.JDBCDriver
user: cpsc476
password: Passw0rd
url: jdbc:hsqldb:hsql://localhost/cpsc476;ifexists=true
@ProfAvery
ProfAvery / genlogs.c
Last active August 29, 2015 14:08
Generate fake log entries to stdout
/* genlogs.c - Generate fake log entries to stdout */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#define DATE_MAX_CHARS 25
#define SIZE(a) (sizeof(a) / sizeof(*(a)))
@ProfAvery
ProfAvery / nudge.js
Last active June 16, 2023 01:26
Nudge - Web Interface for Git Push
#!/usr/bin/env node
"use strict";
var http = require("http"),
querystring = require("querystring"),
child_process = require("child_process");
function writeCSS(res) {
res.writeHead(200, {
@ProfAvery
ProfAvery / config.js
Last active March 7, 2016 08:51
CPSC 473 JSHint configuration
// Client-side code
/* jshint browser: true, jquery: true, curly: true, eqeqeq: true, forin: true, immed: true, indent: 4, latedef: true, newcap: true, nonew: true, quotmark: double, undef: true, unused: true, strict: true, trailing: true */
// Server-side code
/* jshint node: true, curly: true, eqeqeq: true, forin: true, immed: true, indent: 4, latedef: true, newcap: true, nonew: true, quotmark: double, undef: true, unused: true, strict: true, trailing: true */
@ProfAvery
ProfAvery / db.json
Created March 8, 2016 19:29
CPSC 473 - Spring 2016 - Homework 4
{
"actors": [
{ "id": 1, "name": "Bryan Cranston", "starred": true },
{ "id": 2, "name": "Aaron Paul", "starred": true },
{ "id": 3, "name": "Bob Odenkirk", "starred": true },
{ "id": 4, "name": "Dean Norris", "starred": false }
]
}
@ProfAvery
ProfAvery / server.js.diff
Last active October 18, 2016 06:11
Updates to Chapter6/app/Amazeriffic/server.js for Express 4.x
diff --git a/Chapter6/app/Amazeriffic/server.js b/Chapter6/app/Amazeriffic/server.js
index fc11916..dceaa69 100644
--- a/Chapter6/app/Amazeriffic/server.js
+++ b/Chapter6/app/Amazeriffic/server.js
@@ -1,5 +1,6 @@
var express = require("express"),
http = require("http"),
+ bodyParser = require("body-parser"),
app = express(),
toDos = [
@ProfAvery
ProfAvery / db.json
Created March 20, 2017 05:27
CPSC 473 - Spring 2017 - Homework 8
{
"coffeeorders": [
{
"coffee": "test",
"emailAddress": "test@bignerdranch.com",
"size": "tall",
"flavor": "",
"strength": "30",
"id": "test@bignerdranch.com"
}
@ProfAvery
ProfAvery / .eslintrc.js
Created April 18, 2017 03:36
ESLint configuration file for ES6
module.exports = {
"env": {
"node": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
@ProfAvery
ProfAvery / .htmlhintrc
Last active June 4, 2017 05:16
.htmlhintrc to eliminate "Doctype must be declared first" errors in .hbs files
{
"doctype-first": false
}