Skip to content

Instantly share code, notes, and snippets.

Guy Elsmore-Paddock GuyPaddock

Block or report user

Report or block GuyPaddock

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
GuyPaddock / gist:8d576858dea79d6bd27b
Created Apr 7, 2015
Additional fixes for the Toolbar in the Progressive premium theme for Drupal 7.
View gist:8d576858dea79d6bd27b
.toolbar.fixed-header.hidden-top .header {
margin-top: 1em;
.toolbar-drawer.fixed-header.hidden-top .header {
margin-top: 3em;
GuyPaddock / opendj-server-legacy-pom.xml
Last active Dec 4, 2016
Modified OpenDJ Legacy Maven Build to include (Q)uick profile
View opendj-server-legacy-pom.xml
<?xml version="1.0" encoding="UTF-8"?>
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License"). You may not use this file except in compliance
! with the License.
! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
GuyPaddock / gradle_aop_agent.gradle
Created Mar 25, 2017
Getting Gradle to resolve path to agent dependencies
View gradle_aop_agent.gradle
// BEGIN: Dynamic agent JAR config
configurations {
// END: Dynamic agent JAR config
buildscript {
ext {
springBootVersion = '1.5.2.RELEASE'
GuyPaddock /
Created Apr 15, 2017
Scripts to package, install locally, and publish ForgeRock projects to the Rosie Artifactory
#Run script first in the same folder from:
function build() {
mvn clean deploy
if [ $? -ne 0 ] ; then
exit 1;
GuyPaddock /
Last active Apr 18, 2017 — forked from sukharevd/
Script to install JBoss Wildfly 10.x as service in Linux
/usr/bin/authbind --deep /usr/bin/java "$@"
GuyPaddock / opendj.log
Created Jul 25, 2017
Debian dpkg behavior for all cases
View opendj.log
# Deps available; regular install, remove, and purge
dpkg -i opendj-deb-standard-repack.deb
Selecting previously unselected package opendj.
(Reading database ... 128058 files and directories currently installed.)
Unpacking opendj (from opendj-deb-standard-repack.deb) ...
/var/lib/dpkg/ Arguments: install
Setting up opendj (3.0.0) ...
/var/lib/dpkg/info/opendj.postinst Arguments: configure
Processing triggers for ureadahead ...
GuyPaddock / simple_table.rb
Last active Nov 22, 2017
Enhanced Simple Table for ActiveAdmin + Arbre
View simple_table.rb
module ActiveAdmin
module Views
# Exposes Arbre's table support as a simple control for use in ActiveAdmin.
# Example usage:
# ```
# simple_table [ [ "User count", User.count ],
# [ "Item count", Item.count ],
# [ "Total Wishes", Wish.count ],
GuyPaddock / have_validation_errors.rb
Created Feb 13, 2018
An RSpec matcher for doing precise checks on active model validations errors.
View have_validation_errors.rb
# An RSpec matcher for checking Rails validation errors on an object.
# Usage:
# # Expect exactly three validation errors:
# # - field1 must not be empty
# # - field1 must be a number
# # - field2 must be greater than zero
# expect(x).to have_validation_errors
# .related_to(:field1)
GuyPaddock / verify_ssl_cert.rb
Created Mar 8, 2018
Verifying SSL certificates with Ruby and OpenSSL
View verify_ssl_cert.rb
# This will only run in `irb -ropenssl`
require "socket"
require "openssl"
host = ""
port = 443
cert_store =
GuyPaddock / RSA-OAEP--A128CBC--openidm.rb
Last active Apr 26, 2018
How to use AES/CBC/PKCS5Padding and RSA/ECB/OAEPWithSHA-1AndMGF1Padding with Ruby 2.0.0 and Java
View RSA-OAEP--A128CBC--openidm.rb
# The ONLY example on the web of using Ruby 2.0.0 to encrypt a password with the
# hybrid encryption required for interoperability with ForgeRock OpenIDM / Wren
# Security Wren:IDM.
# In this example, a password is first encrypted with a symmetric,
# 128-bit AES cipher in cipher-block-chaining (CBC) mode. The symmetric cipher
# is initialized with a random "session key" (i.e. a random symmetric encryption
# key). Then, the RSA public key of an SSL certificate is used to encrypt
# that encryption key.
You can’t perform that action at this time.