Skip to content

Instantly share code, notes, and snippets.

View jdorrance's full-sized avatar

John Dorrance jdorrance

View GitHub Profile
@jdorrance
jdorrance / OGJ before.json
Created March 19, 2014 04:18
ogj & MAE before and after
{
"results": [{
"path": "/content/ogj/en/site-license/pennwell/jcr:content/leftinheritedtop/text_0",
"type": "nt:unstructured"
}, {
"path": "/content/ogj/en/index/search/jcr:content/leaderads2/text",
"type": "nt:unstructured"
}, {
"path": "/content/ogj/en/site-license/petrobras/jcr:content/leftinheritedtop/text",
"type": "nt:unstructured"
CQ.Ext.ns "UserAdminOverride"
class UserAdminOverride
@originalLoadRecord = CQ.security.UserProperties.prototype.loadRecord
@connectRoomItem =
xtype: "textfield"
fieldLabel: "url field"
anchor: "100%"
vtype: "url"
import groovy.json.JsonSlurper
def nodesToProcess = getNodes("admin" , "admin" , "localhost:4502" , "geometrixx")
def sites = getSites("https://mavendc-utils.s3.amazonaws.com/test/data.json")
processSite("geometrixx" , nodesToProcess, sites , false)
def getSites(json){
new JsonSlurper().parseText(new URL(json).getText("UTF-8"))
}
define ["jquery", "mediaElement", "cq5-flowplayer"], ($, mediaelementplayer) ->
# boot up flash video
# legacy first
# proper HTML5 video and audio player using mediaelement
# be sure to set the plugin path so that when minified the flash and silverlight plugins
# are working as fallbacks, specificaly mp3 for FF.
# Youtube and vimeo component - fluid width video
init: ->
console.log "Media Players loaded using jQuery ", $.fn.jquery
define ["jquery"], ($) ->
init: ->
tag = document.createElement("script")
tag.src = "https://www.youtube.com/iframe_api"
firstScriptTag = document.getElementsByTagName("script")[0]
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag)
window.onYouTubePlayerAPIReady = ->
$(".acs-youtube-player").each ->
config = $(@).data("youtube")
@jdorrance
jdorrance / mongoose.conf
Created November 25, 2013 20:55
place this in the same folder of your mongoose EXE file
# Mongoose web server configuration file.
# For detailed description of every option, visit
# https://github.com/valenok/mongoose/blob/master/UserManual.md
# Lines starting with '#' and empty lines are ignored.
# To make a change, remove leading '#', modify option's value,
# save this file and then restart Mongoose.
listening_ports 80
error_log_file C:\Users\John\Google Drive\work\apps\MDC\localassets\error.log
document_root C:\apache\geo-media
/*
Syntax error: File to import not found or unreadable: mixins.
Load paths:
C:/Users/John/Google Drive/work/apps/acs/acs-bootstrap/sass
C:/PROGRA~2/Heroku/RUBY-1~1.2/lib/ruby/gems/1.9.1/gems/compass-0.12.2/frameworks/blueprint/stylesheets
C:/PROGRA~2/Heroku/RUBY-1~1.2/lib/ruby/gems/1.9.1/gems/compass-0.12.2/frameworks/compass/stylesheets
C:/Users/John/Google Drive/work/apps/acs/acs-bootstrap/components/sass-bootstrap/lib
Compass::SpriteImporter
on line 13 of C:/Users/John/Google Drive/work/apps/acs/acs-bootstrap/sass/acs-bootstrap.scss
@jdorrance
jdorrance / Felix config switch
Created November 15, 2013 21:31
CQ5 bookmarklets
javascript:(function() { window.location.href = (window.location.protocol +"//" + window.location.host + "/system/console/configMgr"); })()
CQ.Ext.override CQ.wcm.Sidekick,
addButtons: ->
bbar = @getBottomToolbar()
bbar.removeAll true
bbar.add [@editButton, @previewButton]
bbar.add @designButton if ACS.wcm.Page.canViewDesignMode()
bbar.add @scaffoldingButton if ACS.wcm.Page.canViewScaffoldingMode()
bbar.add @liveCopyStatusButton
bbar.add @clientContextButton if ACS.wcm.Page.canViewClientContext()
bbar.add "-"