Skip to content

Instantly share code, notes, and snippets.

View markdaugherty's full-sized avatar

Mark Daugherty markdaugherty

View GitHub Profile
@justinedelson
justinedelson / add-video.groovy
Created March 30, 2013 21:01
Geb script which demonstrates how to add a component to a parsys in AEM 5.6
/**
*
* In this sample Geb script, we are going to add a video component to a page in AEM
* using the context menu.
*
*/
@Grapes([
@Grab("org.codehaus.geb:geb-core:0.7.2"),
@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;