Skip to content

Instantly share code, notes, and snippets.

# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@schatterjee4
schatterjee4 / AEMDevResources
Created November 21, 2017 06:02 — forked from MikeNats/AEMDevResources
Adobe Experience Manager Resources for Developers
Documentation
-------------
AEM: http://docs.adobe.com
Recent updates: https://docs.adobe.com/docs/en/aem/recent-documentation-updates.html
AEM Docs daily changes: http://adobedocsdiff.headwire.com/sitediff/
API References
@kuckmc01
kuckmc01 / AEM-Touch-UI-Tab-Dialog-sample.xml
Last active April 23, 2021 22:20
AEM Touch UI Tab Dialog sample that has placeholders for adding tab content
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured"
jcr:title="Compare Products Services" sling:resourceType="cq/gui/components/authoring/dialog"
mode="edit" helpPath="style-guide.html#compare-rows-services">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<layout
@Fuxy22
Fuxy22 / bash_aliases.sh
Last active November 7, 2021 01:36
Bash Script functions to Manage /etc/hosts file for adding/removing hostnames.
# remove specified host from /etc/hosts
function removehost() {
if [[ "$1" ]]
then
HOSTNAME=$1
if [ -n "$(grep $HOSTNAME /etc/hosts)" ]
then
echo "$HOSTNAME Found in your /etc/hosts, Removing now...";
sudo sed -i".bak" "/$HOSTNAME/d" /etc/hosts
# SSH Agent Functions
# Mark Embling (http://www.markembling.info/)
#
# How to use:
# - Place this file into %USERPROFILE%\Documents\WindowsPowershell (or location of choice)
# - Import into your profile.ps1:
# e.g. ". (Resolve-Path ~/Documents/WindowsPowershell/ssh-agent-utils.ps1)" [without quotes]
# - Enjoy
#
# Note: ensure you have ssh and ssh-agent available on your path, from Git's Unix tools or Cygwin.
@refo
refo / remove-leading-slash
Created June 5, 2015 13:27
javascript - Remove leading slashes
'/example/string/'.replace(/^\/+/g, '');
// Should remove all leading slashes and return 'example/string/'
@un33k
un33k / sed cheatsheet
Created August 22, 2011 13:28
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
async function supportsImgType(type) {
// Create
//
// <picture>
// <source srcset="data:,x" type="{type}" />
// <img />
// </picture>
//
// (where "data:,x" is just a minimal URL that is valid but doesn't trigger network)
let img = document.createElement('img');
anonymous
anonymous / app.dockerfile
Created January 2, 2017 11:02
FROM php:7.0.4-fpm
RUN apt-get update && apt-get install -y libmcrypt-dev \
mysql-client libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-install mcrypt pdo_mysql
@floriankraft
floriankraft / JcrQueryLibrary.md
Last active April 5, 2024 14:09
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