Skip to content

Instantly share code, notes, and snippets.

View joshdurbin's full-sized avatar

Josh Durbin joshdurbin

View GitHub Profile
@joshdurbin
joshdurbin / matchFaces
Last active April 19, 2017 20:15
Groovy, Guava, AWS Rekognition SDK, Indexes faces and queries indexes looking for similar faces
#!/usr/bin/env groovy
@Grapes([
@Grab(group='com.amazonaws', module='aws-java-sdk-rekognition', version='1.11.117'),
@Grab(group='com.google.guava', module='guava', version='21.0')
])
import com.amazonaws.auth.AWSCredentials
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain
import com.amazonaws.auth.profile.ProfileCredentialsProvider

Keybase proof

I hereby claim:

  • I am joshdurbin on github.
  • I am zippydurbs (https://keybase.io/zippydurbs) on keybase.
  • I have a public key whose fingerprint is E3D9 99F1 4985 C2F2 97E5 3269 F31A 9362 C7CC 295B

To claim this, I am signing this object:

@joshdurbin
joshdurbin / DefaultSelectorOverrideDefinition.groovy
Created September 16, 2013 14:08
The Excessive Selector Removal Filter is aimed at increasing security for sling/CQ/AEM instances with specific focus on selector-based denial-of-service attacks. The filter examines incoming, resource-based requests, looking for servlets that are registered for said resource. The filter will then build a list of the potential selectors and compa…
package com.citytechinc.services.selectorverification
import org.apache.felix.scr.annotations.Activate
import org.apache.felix.scr.annotations.Component
import org.apache.felix.scr.annotations.ConfigurationPolicy
import org.apache.felix.scr.annotations.Modified
import org.apache.felix.scr.annotations.Property
import org.apache.felix.scr.annotations.Service
import org.apache.sling.commons.osgi.OsgiUtil
package com.citytechinc.cq.library.services;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheStats;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.slf4j.Logger;