Skip to content

Instantly share code, notes, and snippets.

@jfhbrook
jfhbrook / LICENSE.txt
Created May 27, 2011 04:45 — forked from 140bytes/LICENSE.txt
<140 byte sparktweet helper
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Joshua Holbrook <http://jesusabdullah.github.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@msulliva
msulliva / cq54-aem56-upgrade.md
Last active December 18, 2015 02:19
Old Dominion University recently did a 5.4 to 5.6 upgrade (this was our first upgrade) and there was some interest here, and we figured we would share our lessons learned and checklist with the group.

Overview

We upgraded directly from 5.4 to 5.6 with an in place upgrade using the "-unpack" method. We did the Author on a Saturday, and the Publishers on the Sunday, mostly because we ran into the Publisher permissions problem on Saturday night, and stayed on 5.4 publishers while trying to resolve.

Overview of changes that caused us some pain

New Publisher Permissions

Anonymous User Permissions on Publishers are more restrictive, pretty much just has access to /content and /etc on the publishers in 5.6. So any assets that may have been used from /apps even if not through the public interface should probably move under etc. We had XSL transformations that the component couldn't read the .xsl file under /apps. I think this also is the root cause of the ResourceResolver issues.

@BenoitZugmeyer
BenoitZugmeyer / LICENSE.txt
Created June 23, 2011 22:32 — forked from 140bytes/LICENSE.txt
Array.prototype.reduce
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Benoît Zugmeyer <alk at graou dot fr>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@wh5a
wh5a / QuickCheck.scala
Created November 10, 2013 05:09
Coursera Reactive Scala Programming #1 - Quickcheck
package quickcheck
import common._
import org.scalacheck._
import Arbitrary._
import Gen._
import Prop._
import Math._
@stevegrossi
stevegrossi / jmeter.rb
Last active March 19, 2018 16:16
Sample JMeter test plan using the ruby-jmeter gem
#!/usr/bin/env ruby
require 'ruby-jmeter'
test do
defaults domain: 'beta.stevegrossi.com'
cookies clear_each_iteration: true
@skrings
skrings / LICENSE.txt
Created June 23, 2011 19:17 — forked from 140bytes/LICENSE.txt
140byt.es -- scriptLoader
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@hrwgc
hrwgc / translate.sh
Created December 12, 2012 20:34
Command line translator application using Bing's free Translator service.
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
echo 'Usage: translate.sh ["Original Text"] ["Source Language"] ["Target Language"]'
echo 'Example: translate.sh "Hello World" "en" "fr"'
declare -a LANG_NAMES=('Arabic' 'Czech' 'Danish' 'German' 'English' 'Estonian' 'Finnish' 'French' 'Dutch' 'Greek' 'Hebrew' 'Haitian Creole' 'Hungarian' 'Indonesian' 'Italian' 'Japanese' 'Korean' 'Lithuanian' 'Latvian' 'Norwegian' 'Polish' 'Portuguese' 'Romanian' 'Spanish' 'Russian' 'Slovak' 'Slovene' 'Swedish' 'Thai' 'Turkish' 'Ukrainian' 'Vietnamese' 'Simplified Chinese' 'Traditional Chinese');
declare -a LANG_CODES=('ar' 'cs' 'da' 'de' 'en' 'et' 'fi' 'fr' 'nl' 'el' 'he' 'ht' 'hu' 'id' 'it' 'ja' 'ko' 'lt' 'lv' 'no' 'pl' 'pt' 'ro' 'es' 'ru' 'sk' 'sl' 'sv' 'th' 'tr' 'uk' 'vi' 'zh-CHS' 'zh-CHT');
for IX in $(seq 0 $((${#LANG_CODES[@]} - 1))); do
echo ${LANG_CODES[$IX]}: ${LANG_NAMES[$IX]};
done
@nodesocket
nodesocket / gist:3102236
Created July 13, 2012 01:49
Textarea MaxLength Enforced
$(document).ready(function() {
$("textarea[maxlength]").bind("keyup input paste", function() {
var limit = parseInt($(this).attr('maxlength'));
var text = $(this).val();
var chars = text.length;
if(chars > limit){
var new_text = text.substr(0, limit);
$(this).val(new_text);
}
@sergeimuller
sergeimuller / gist:2916721
Created June 12, 2012 10:10
Frequently Used CQ5 URLs
Assuming the base URL to be this (need to edit to fit yours):
http://cqauthor1.company.com:4502
SEARCH
Search UI:
/crx/explorer/ui/search.jsp?Path=&Query=
;; try this form-by-form at a REPL
(require '[clojure.spec.alpha :as s])
;; create an inline DSL to describe the FizzBuzz world
(defmacro divides-by
[nm n]
`(s/def ~nm (s/and pos-int? #(zero? (mod % ~n)))))
;; specify FizzBuzz
(divides-by ::fizz 3)