Skip to content

Instantly share code, notes, and snippets.

View ajbrown's full-sized avatar

A.J. Brown ajbrown

View GitHub Profile
@ajbrown
ajbrown / test_caliper_learning_event.json
Created September 3, 2015 21:38
A test caliper learning event.
{
"@context": "http://purl.imsglobal.org/ctx/caliper/v1/Context",
"@type": "http://purl.imsglobal.org/caliper/v1/AssessmentEvent",
"actor": {
"@context": "http://purl.imsglobal.org/ctx/caliper/v1/Context",
"@id": "http://mheducation.com/connected/users/edfa85ca-e04c-4ae3-ac15-7167aab42cc8",
"@type": "http://purl.imsglobal.org/caliper/v1/lis/Person",
"name": null,
"description": null,
"extensions": {
@ajbrown
ajbrown / crc.sh
Created September 1, 2015 16:37
Calculate the 32bit CRC of a file in hexadecimal format without the crc32 command
cksum $1 | perl -wane 'printf "%0x\n",@F'
<?xml version="1.0"?>
<settings xmlns="http://maven.apache.org/POM/4.0.0">
<pluginGroups>
<pluginGroup>
com.atlassian.confluence.maven.plugins
</pluginGroup>
<pluginGroup>com.atlassian.maven.plugins</pluginGroup>
</pluginGroups>
@ajbrown
ajbrown / CloudFormation.template
Created June 18, 2015 17:24
CloudWatch mappings of AWS EC2 Instance types to Java Heap sizes
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Use these mappings for cloudwatch templates which launch a java process. They define a heap size close to (but never over) 70% of the available RAM, at multiples of 64 megabytes. No heap is declared over 32GB for performance reasons.",
"Mappings" : {
"AWSInstanceType2JavaMaxHeap" : {
"t1.micro" : { "Heap" : "384m" },
"t2.micro" : { "Heap" : "640m" },
"t2.small" : { "Heap" : "1280m" },
"t2.medium" : { "Heap" : "2816m" },
"t2.large" : { "Heap" : "5g" },
@ajbrown
ajbrown / completed.json
Created February 24, 2015 18:31
Sample TinCan Learning Event
{
"result": {
"duration": "PT6M36S",
"score": {
"min": 0,
"raw": 86,
"max": 100,
"scaled": 0.86
},
"completion": true
@ajbrown
ajbrown / CloudFormationLauncher.policy
Created January 26, 2015 20:52
An IAM Policy with all permissions needed to create a stack containing an ElasticSearch cluster with auto-discovery. Note that this is not a fully restrictive policy, and is just a starting point. Make sure you update "<budket_name>".
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1422296143000",
"Effect": "Allow",
"Action": [
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:GetObject",
@ajbrown
ajbrown / ElasticSearch.template
Created January 15, 2015 21:52
AWS CloudFormation Template For ElasticSearch Cluster
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "ElasticSearch Cluster.",
"Parameters" : {
"KeyName": {
"Description" : "The name of an existing key pair to enable SSH access to Amazon EC2 instances",
"Type": "String",
@ajbrown
ajbrown / gist:86d22d91e6c23ac525e1
Created October 7, 2014 02:17
Ebay Car & Truck Parts Categories
Accessories (179413)
Air Conditioning & Heat (33542)
A/C Compressor & Clutch (33543)
A/C Hoses & Fittings (33544)
A/C & Heater Controls (33545)
Blower Motors (33546)
Condensers & Evaporators (33547)
Heater Parts (33548)
Other (46094)
Air Intake & Fuel Delivery (33549)
@ajbrown
ajbrown / papertrail.config
Created September 13, 2014 22:47
Add PaperTrail syslog monitoring to ElasticBeanstalk deployed applications.
# Make sure to use the correct hostname and port !
# Your application should be logging to a valid syslog facility.
#
files:
/etc/rsyslog.d/papertrail.conf:
mode: 000400
owner: root
group: root
content: |
@ajbrown
ajbrown / .vimrc
Created August 1, 2014 18:06
My preferred .vimrc (uses Janus for plugin management)
""
"" Janus setup
""
" Define paths
let g:janus_path = escape(fnamemodify(resolve(expand("<sfile>:p")), ":h"), ' ')
let g:janus_vim_path = escape(fnamemodify(resolve(expand("<sfile>:p" . "vim")), ":h"), ' ')
let g:janus_custom_path = expand("~/.vim/janus")
" Source janus's core