Skip to content

Instantly share code, notes, and snippets.

View cameronoxley's full-sized avatar

Cameron Oxley cameronoxley

  • Klick Inc
  • Toronto, Canada
View GitHub Profile
@floriankraft
floriankraft / JcrQueryLibrary.md
Last active May 3, 2024 05:50
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

@cameronoxley
cameronoxley / Clock Progress
Last active December 28, 2015 02:59
Draws a clock face in ascii to simulate progress for bash scripts
#!/bin/bash
# Draws a 'progress bar' using ascii clocks
# $1 : Seconds to delay
function delay() {
delay_time=$(echo "$1/24" | bc -l);
clear;
echo $'\xf0\x9f\x95\x90' #1
sleep $delay_time;
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active June 18, 2024 18:27
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh