Skip to content

Instantly share code, notes, and snippets.

@cherti
cherti / alert.sh
Created December 9, 2016 13:47
send a dummy alert to prometheus-alertmanager
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
@chetanmeh
chetanmeh / oakRepoStats.groovy
Last active June 25, 2024 16:30
Groovy script to get various stats related to Oak repository
import com.codahale.metrics.ConsoleReporter
import com.codahale.metrics.MetricRegistry
import com.google.common.base.Predicate
import com.google.common.base.Stopwatch
import com.google.common.collect.AbstractIterator
import com.google.common.collect.FluentIterable
import com.google.common.collect.Iterators
import com.google.common.collect.PeekingIterator
import com.google.common.collect.Sets
import com.google.common.collect.TreeTraverser
@frieder
frieder / aem63_systemd.txt
Last active June 30, 2022 10:55
AEM 6.x systemd start script
The following start script has been tested with SLES 12 SP2, AEM 6.3 and Java 8u161.
-------------------------------------------------------------------------------------------------------------
cat << 'EOF' > /etc/systemd/system/aem.service
[Unit]
Description=Adobe Experience Manager
After=network.target
[Service]
Type=forking
@joemaffia
joemaffia / AEM cURL
Last active July 18, 2023 00:09
AEM cURL commands
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
bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles
Build a bundle
curl -u admin:admin -F bundleHome=/apps/centrica/bundles/name of bundle -F
descriptor=/apps/centrica/bundles/com.centrica.cq.wcm.core-bundle/name_of_bundle.bnd
@mid9commander
mid9commander / change Fn key mod in ubuntu for MBP
Created November 9, 2010 15:56
fn key mode in ubuntu for MBP
Change Function Key behavior
This section of the document describe how to change the behavior of 'fn' key to better match what user expect. (See #201711, #162083)
Here a description of each behavior :
0 = disabled : Disable the 'fn' key. Pressing 'fn'+'F8' will behave like you only press 'F8'
1 = fkeyslast : Function keys are used as last key. Pressing 'F8' key will act as a special key. Pressing 'fn'+'F8' will behave like a F8.
2 = fkeysfirst : Function keys are used as first key. Pressing 'F8' key will behave like a F8. Pressing 'fn'+'F8' will act as special key (play/pause).
Ubuntu 9.04 and Newer
Temporarily