Skip to content

Instantly share code, notes, and snippets.

View aeells's full-sized avatar

Andrew Eells aeells

View GitHub Profile
dn:dc=my-domain,dc=com
objectClass:dcObject
objectClass:organizationalUnit
dc:my-domain
ou:MyDomain
dn: ou=people,dc=my-domain,dc=com
objectClass: organizationalUnit
ou: people
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /private/etc/openldap/schema/core.schema
include /private/etc/openldap/schema/cosine.schema
include /private/etc/openldap/schema/nis.schema
include /private/etc/openldap/schema/inetorgperson.schema
#
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
BASE dc=my-domain,dc=com
URI ldap://localhost:389
import javax.naming.Context;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
import java.util.Hashtable;
@aeells
aeells / gist:e89cd2d1c6d94d473470
Created August 27, 2014 09:38
where's the test!?
@Test
public void modifySecurityCredentials() throws PasswordValidationException {
Customer blCustomer = new CustomerImpl();
blCustomer.setPassword("testpassword");
when(customerService.readCustomerByUsername(any(String.class))).thenReturn(blCustomer);
when(customerService.isPasswordValid(any(String.class), any(String.class), any(Customer.class))).thenReturn(true);
PasswordChangeDTO passwordChange = new PasswordChangeDTO();
@aeells
aeells / sonar-runner.properties
Created February 13, 2015 18:05
sonar-runner.properties for MySQL server running on localhost
sonar.host.url=http://localhost:9000
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.sourceEncoding=UTF-8
sonar.login=admin
sonar.password=admin
@aeells
aeells / sonar.properties
Created February 13, 2015 18:09
sonar.properties for MySQL server running on localhost
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
@aeells
aeells / systems-engineer
Created April 11, 2012 17:12
Senior Systems Engineer - DevOps, automation, London
Looking for a strong Systems Engineer with development experience, preferable 10 years or 10,000 hours, with experience of the following:
- Linux, AWS, DevOps, Puppet, automation
- Continuous Integration / Deployment and release pipelines
- Production infrastructure and monitoring
- Tomcat, Apache, MySQL, Capistrano, Ruby, Java
- Non-functional requirements - security, performance
Very good team and working environment and competitive salary / benefits.
@aeells
aeells / gist:4595649
Last active December 11, 2015 11:39
Basic JDBI data access.
@RegisterMapper(MyObjectResultSetMapper.class) public interface MyDao
{
// get objects
@SqlQuery("SELECT * FROM list WHERE ... LIMIT 200")
List<MyObject> get();
void close();
}