Skip to content

Instantly share code, notes, and snippets.

View helms-charity's full-sized avatar

Charity Helms helms-charity

View GitHub Profile
@helms-charity
helms-charity / gist:c8d2b269d8a32fe80acf6afebfb0b12a
Last active November 20, 2023 14:41
System76 Serval with Ubuntu 22.04
Fresh install of Ubuntu. No DisplayLink driver installed.
Switched to Nvidia dirver 535.129.03 open from the x.org per https://support.system76.com/articles/upgrade-ubuntu, which says:
To add PPA deb https://ppa.launchpadcontent.net/system76-dev/stable/ubuntu/ jammy main
(more info at https://launchpad.net/~system76-dev/+archive/ubuntu/stable)
and to install the System76 Driver on an NVIDIA based system:
```sudo apt-get install -y system76-driver-nvidia```
More info: https://launchpad.net/~system76-dev/+archive/ubuntu/stable
---
import org.apache.jackrabbit.oak.spi.commit.CommitInfo
import org.apache.jackrabbit.oak.spi.commit.EmptyHook
import org.apache.jackrabbit.oak.spi.state.NodeState
import org.apache.jackrabbit.oak.spi.state.NodeBuilder
class LibsCleaner {
def session
def scanBundles(remove = false) {
@helms-charity
helms-charity / childCountWarning.groovy
Created February 12, 2022 21:10 — forked from stillalex/childCountWarning.groovy
counts number of nodes in tree, logging a warn is the number of child nodes exceeds a certain threshold
import java.util.concurrent.atomic.AtomicInteger
import org.apache.jackrabbit.oak.api.Type
import org.apache.jackrabbit.oak.plugins.segment.SegmentBlob
import org.apache.jackrabbit.oak.spi.state.NodeState
def countNodes(NodeState n, String path = "/", Integer flush = 1000000, Long warnAt = 1000, AtomicInteger count = new AtomicInteger(0), AtomicInteger binaries = new AtomicInteger(0), root = true) {
if(root) {
println "Counting nodes in tree ${path}"
}
@helms-charity
helms-charity / rmNode.groovy
Created February 12, 2022 21:09 — forked from stillalex/rmNode.groovy
Groovy script to remove a node at a given path
import org.apache.jackrabbit.oak.spi.commit.CommitInfo
import org.apache.jackrabbit.oak.spi.commit.EmptyHook
import org.apache.jackrabbit.oak.spi.state.NodeStore
import org.apache.jackrabbit.oak.commons.PathUtils
def rmNode(def session, String path) {
println "Removing node ${path}"
NodeStore ns = session.store
def nb = ns.root.builder()
import java.io.InputStream;
import java.util.concurrent.atomic.AtomicInteger
import org.apache.jackrabbit.oak.api.Type
import org.apache.jackrabbit.oak.plugins.segment.SegmentBlob
import org.apache.jackrabbit.oak.spi.state.NodeState
def countNodes(NodeState n, deep = false, String path = "/", Integer flush = 50000, AtomicInteger count = new AtomicInteger(0), AtomicInteger binaries = new AtomicInteger(0), root = true) {
if(root) {
println "Counting nodes in tree ${path}"
}
@helms-charity
helms-charity / archive.applescript
Created November 11, 2017 05:45 — forked from davejlong/archive.applescript
Rebuilding Quick Actions in Outlook for Mac
(*
Script to Mark Item as Read and Move to folder "Archive"
For Microsoft Outlook 15
*)
tell application "Microsoft Outlook"
activate
set msgSet to current messages
if msgSet = {} then
error "No Messages selected. Select at least one message."
@helms-charity
helms-charity / InternalContentFilter.java
Last active May 11, 2016 12:50
Internal Content Filter - cq 5.6
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.wmd.filter.impl;
import com.day.cq.replication.ReplicationContentFilter;
import com.day.cq.wcm.api.NameConstants;
@helms-charity
helms-charity / cq5 startup script
Created February 2, 2016 04:06
Startup script for Adobe CQ 5.6, tested on CentOS 6.5
+-----------------------+
| /etc/rc.d/init.d/cq5 |
+-----------------------+
#!/bin/bash
#
# cq5 Startup script for Adobe AEM/CQ5
#
# chkconfig: 345 80 20
# description: Startup script for Adobe AEM/CQ5
@helms-charity
helms-charity / cqmgr
Last active August 29, 2015 14:01 — forked from klcodanr/cqmgr
#!/bin/bash
# a script to make it easier for developers to start multiple CQ instances
# instructions here http://labs.sixdimensions.com/blog/2014-04-28/my-aem-dev-setup/
# Default Settings
version=5.6.1
root=~/dev/cq
publish=
debug="true"
@helms-charity
helms-charity / gist:64a57309b96566697347
Created May 21, 2014 13:15
X-path in query builder
> I'm interested in finding a list of child pages of a node with a specific tag e.g.
>
> type=cq:Page
> path=/content/geometrixx/en/toolbar
> p.hits=full
> property=jcr:content/cq:tags
> property.operation=equals
> property.value=geometrixx-media:events/concerts
>
> However, the query does a deep search and returns a list of all the pages whose path starts with the aforesaid value. I do not want to do deep search. I'm interested in the immediate child nodes only.