Skip to content

Instantly share code, notes, and snippets.

Avatar

John Dorrance jdorrance

View GitHub Profile
@jdorrance
jdorrance / OGJ before.json
Created Mar 19, 2014
ogj & MAE before and after
View OGJ before.json
{
"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"
View useradminOverride.coffee
CQ.Ext.ns "UserAdminOverride"
class UserAdminOverride
@originalLoadRecord = CQ.security.UserProperties.prototype.loadRecord
@connectRoomItem =
xtype: "textfield"
fieldLabel: "url field"
anchor: "100%"
vtype: "url"
View CQ5findReplace.groovy
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"))
}
View cq5-media.coffee
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
View yt.coffee
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")
View carousel.jsp
@jdorrance
jdorrance / mongoose.conf
Created Nov 25, 2013
place this in the same folder of your mongoose EXE file
View mongoose.conf
# 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
View gist:7601738
/*
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
View Felix config switch
javascript:(function() { window.location.href = (window.location.protocol +"//" + window.location.host + "/system/console/configMgr"); })()
View cqovrride.coffee
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 "-"