Skip to content

Instantly share code, notes, and snippets.

View ajbrown's full-sized avatar

A.J. Brown ajbrown

View GitHub Profile
@ajbrown
ajbrown / EA_Origin.pol
Created March 18, 2014 14:06
Updated *Working* PlayOnLinux installer script for EA's Origin.
#!/bin/bash
# Date : (2014-03-18 10-00)
# Last revision : (2014-03-18 10-00)
# Wine version used : 1.5.28-Origin
# Distribution used to test : Ubuntu 13.10 x64
# Author : A.J. Brown (Originally GNU_Raziel)
# Licence : Retail
# Only For : http://www.playonlinux.com
@ajbrown
ajbrown / gist:9bfe5be249e7714b5790
Created June 8, 2014 17:04
AWS Permissions Policy template allwoing SNS topic to sendMessage to SQS queue
/**
* The following permission policy will allow an SNS topic to send messages to an SQS queue. Note that
* the value of "aws:SourceArn" can contain wildcards, so you could allow all topics in your account
* access to the queue, or topics that share a prefix (for example).
*
* Add this policy by clicking "Edit Policy Document" in the "Permissions" tab when viewing a queue
* in the AWS management console.
*/
{
@ajbrown
ajbrown / AuthenticationToken.groovy
Created June 9, 2014 13:33
grails-spring-security-rest token storage service supporting token expiration
import org.apache.commons.lang.builder.HashCodeBuilder
class AuthenticationToken implements Serializable {
private static final long serialVersionUID = 20140401
String tokenValue
String username
Date dateCreated
@ajbrown
ajbrown / fix_intellij_permissions.sh
Last active August 29, 2015 14:04
Fixes permissions of IntelliJ app folder on MacOSX when being used by multiple accounts
#!/bin/bash
# @author A.J. Brown <aj@ajbrown.org>
# Permissions will sometimes get screwed up when using Intelli from multiple accounts on the
# same machine (For example, one user for work, one for home). I've had success doing the following
# steps. Note you may need to run the permissions update part of this multiple times after upgrading
# or installing a license. It's safe to run this entire script multiple times as-is, though.
#
IDEA_PATH="/Applications/IntelliJ\ IDEA\ 13.app"
@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 / 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 / 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 / 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
<?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 / 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'