Skip to content

Instantly share code, notes, and snippets.

View ajbrown's full-sized avatar

A.J. Brown ajbrown

View GitHub Profile
$service = new \FlyMuch\Service\AccountService();
$service->setEntityManager( $this->getEntityManager() );
$account = $service->findAccountByEmail( 'aj@ajbrown.org' );
return $this->entityManager
->getRepository( self::ENTITY_PATH )
->findBy( array(
'accountId' => $accountId,
'deleted' => false
) )
;
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
@ajbrown
ajbrown / venueseen_ui_ux_developer.mkd
Last active December 21, 2015 07:19
Venueseen UX/UI Developer Job Description

UX/UI Developer

Venueseen is searching for an excellent User Interface designer with UX experience who's passionate about creating fun, clean, and simple to use web applications.

As UI/UX Designer, you will be tasked with using your UX knowledge to develop a simple, elegant experience for our customers, and implementing that experience with your UI coding skills. We don't want just a thinker, we want a do-er as well. You will work closely with stakeholders as

@ajbrown
ajbrown / gist:6281644
Created August 20, 2013 13:45
Failure output from testing `grails-jaxrs` springtest_dep_removal branch
AJs-MacBook-Pro:grails-jaxrs ajbrown$ grails compile
| Compiling 57 source files.
| Error Compilation error: startup failed:
Compile error during compilation with javac.
/Users/ajbrown/Projects/venueseen/grails-jaxrs/src/java/org/grails/jaxrs/springframework/mock/web/MockHttpServletRequest.java:163: cannot find symbol
symbol : class HeaderValueHolder
location: class org.grails.jaxrs.springframework.mock.web.MockHttpServletRequest
private final Map<String, HeaderValueHolder> headers = new LinkedCaseInsensitiveMap<HeaderValueHolder>();
^
/Users/ajbrown/Projects/venueseen/grails-jaxrs/src/java/org/grails/jaxrs/springframework/mock/web/MockHttpServletRequest.java:163: cannot find symbol
@ajbrown
ajbrown / quartz_jdbc_store.sql
Created December 12, 2013 04:19
The following script creates the schema required to use Postgres as the JDBC store for clustering Quartz. This was tested on Quartz 2.2.1 in Postgres 9.1 and 9.3
CREATE TABLE qrtz_blob_triggers (
trigger_name character varying(80) NOT NULL,
trigger_group character varying(80) NOT NULL,
blob_data text,
sched_name character varying(120) DEFAULT 'TestScheduler'::character varying NOT NULL
);
CREATE TABLE qrtz_calendars (
calendar_name character varying(80) NOT NULL,
calendar text NOT NULL,
@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"