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
#!/usr/bin/env ruby
require 'sinatra'
require 'redis'
configure do
REDIS = Redis.new
end
get '/' do
@ProfAvery
ProfAvery / Spring Configuration Quick Reference
Last active October 11, 2015 01:17
Spring Configuration Quick Reference
XML NAMESPACES
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!--Bean declarations go here-->
#!/bin/sh
$HOME/google_appengine/dev_appserver.py \
--address=0.0.0.0 \
--high_replication \
--use_sqlite \
$*
@ProfAvery
ProfAvery / .SciTEUser.properties
Created February 21, 2013 07:57
Settings for Python programming with SciTE
tab.size=4
indent.size=4
use.tabs=0
tab.indents=1
backspace.unindents=1
@ProfAvery
ProfAvery / 8ball.py
Created April 25, 2013 06:30
Magic 8-Ball example (Bottle, Redis, JSON)
#!/usr/bin/env python
import random
from bottle import route, run, request, install
from bottle_redis import RedisPlugin
install(RedisPlugin())
@route('/ask')
@ProfAvery
ProfAvery / nginx.conf
Created May 8, 2013 04:35
Nginx load-balancing test configuration
# Modify Bottle application as follows:
# import sys
# ...
# run(port=sys.argv[1], debug=True)
#
# Then run
# python app.py 8081
# python app.py 8082
# nginx -p . -c nginx.conf
#
@ProfAvery
ProfAvery / .profile.cmd
Last active December 22, 2015 19:09
How to create a .profile file for Windows
@echo off
REM Enable by running the following command:
REM reg add "HKCU\SOFTWARE\Microsoft\Command Processor" /v AutoRun /t REG_EXPAND_SZ /d ^%USERPROFILE^%\.profile.cmd /f
set HOME=%USERPROFILE%
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_01
set PATH=%JAVA_HOME%\bin;%PATH%
set ANT_HOME=C:\apache-ant-1.9.2
Question from fishygut:
What are the main differences between Java EE 7 and Java EE 6 ?
4 Answers
puffstone: Support for JSON
barkingcustard: GlassFish v4
puffstone: Improved Bean Validation
barkingcustard: WebSocket support
@ProfAvery
ProfAvery / build-snippet.xml
Last active December 25, 2015 02:29
Maven Ant Tasks <artifact:dependencies> task for ObjectDB
<artifact:dependencies pathId="dependency.classpath">
<remoteRepository id="objectdb" url="http://m2.objectdb.com" />
<dependency groupId="com.objectdb" artifactId="objectdb" version="2.5.3_02" />
</artifact:dependencies>
@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 */