Skip to content

Instantly share code, notes, and snippets.

View sergeimuller's full-sized avatar

Sergei Müller sergeimuller

View GitHub Profile
@sergeimuller
sergeimuller / gist:2107101
Created March 19, 2012 10:40 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@sergeimuller
sergeimuller / characterCount.js
Last active October 4, 2015 12:37
Dialog Character Count
//characterCount function specified on dialog node
function (textbox, max) {
var count = max - document.getElementById(textbox.el.id).value.length;
var counter = textbox.container.dom.nextElementSibling;
if (count < 0) {
counter.innerHTML = '<b>Max characters: (' + max + ')</b> <span style=\"color:#fb4c50;\">Remaining: (' + count + ')</span><br /><br />' + textbox.fieldDescription;
} else {
counter.innerHTML = '<b>Max characters: (' + max + ')</b> Remaining: (' + count + ')<br /><br />' + textbox.fieldDescription;
}
}
@sergeimuller
sergeimuller / gist:2916697
Last active August 25, 2023 03:52
CQ5 curl commands
Note 1: The following CQ curl commands assumes a admin:admin username and password.
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
Example: -F"":operation=delete""
Note 3: Quotes around name of package (or name of zip file, or jar) should be included.
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Install a bundle
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
@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=
@sergeimuller
sergeimuller / gist:3121577
Created July 16, 2012 08:40
Wordpress Recommended File & Folder Permissions
Root directory 0755
wp-admin 0755
wp-content 0755
wp-includes 0755
.htaccess 0640
readme.html 0400
wp-config.php 0644
wp-admin/index.php 0644
wp-admin/.htaccess 0640
@sergeimuller
sergeimuller / font-face.css
Last active October 7, 2015 09:27
Cross-browser @font-face syntax
/* Sample @font-face declaration for EOT & TTF/OTF recommended by Paul Irish */
@font-face {
font-family: 'Graublau Web';
src: url('GraublauWeb.eot?') format('eot'),
url('GraublauWeb.woff') format('woff'),
url('GraublauWeb.ttf') format('truetype');
}
/* Read the full article: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/ */
@sergeimuller
sergeimuller / keybase.md
Last active August 29, 2015 14:12
keybase.md

Keybase proof

I hereby claim:

  • I am sergeimuller on github.
  • I am sergeimuller (https://keybase.io/sergeimuller) on keybase.
  • I have a public key whose fingerprint is B0C7 DE13 3C3C D056 A6AC 49E7 9188 8FF9 A362 CC37

To claim this, I am signing this object:

@sergeimuller
sergeimuller / welcome-screen.md
Last active May 2, 2017 10:51
AEM Welcome Screen Customisation

Modules

Module Path
Websites /libs/wcm/core/content/siteadmin
Digital Assets /libs/wcm/core/content/damadmin
Communities /libs/collab/core/content/admin
Campaigns /libs/mcm/content/admin
Inbox /libs/cq/workflow/content/inbox
Users /libs/cq/security/content/admin
@sergeimuller
sergeimuller / tar.sh
Last active May 21, 2020 15:24
Handy commands
# Compress directory into 500MB archives
tar cvzf - dir/ | split -b 500000000 - output.tar.gz.
# Extract multi-archive tar.gz files
cat output.tar.gz.* | tar xzvf -
@sergeimuller
sergeimuller / JcrQueryLibrary.md
Created September 25, 2017 11:44 — forked from floriankraft/JcrQueryLibrary.md
Some useful JCR queries (XPATH, SQL2) for AEM/CQ development.

SQL2

All nodes with a specific name

SELECT * FROM [nt:unstructured] AS node
WHERE ISDESCENDANTNODE(node, "/search/in/path")
AND NAME() = "nodeName"

All pages below content path