Skip to content

Instantly share code, notes, and snippets.

View frieder's full-sized avatar

Frieder Heugel frieder

  • Basel, Switzerland
View GitHub Profile
@frieder
frieder / fail2ban-nexus3-nginx
Created November 12, 2023 13:07
Fail2ban configuration for Nexus3 via nginx reverse proxy
Following is a fail2ban configuration to identify failed login
attempts to Nexus 3 OSS via an nginx reverse proxy.
------------------------------------------------------------------------------
/etc/fail2ban/jail.d/nexus.conf
------------------------------------------------------------------------------
[nexus]
enabled = true
port = https
filter = nexus-login
@frieder
frieder / examples.sql2
Created September 17, 2018 19:37
JCR-SQL2 examples (AEM6)
Find all videos below a specific DAM path
-----------------------------------------
SELECT * FROM [dam:Asset] AS asset
WHERE ISDESCENDANTNODE(asset, '/content/dam')
AND asset.[jcr:content/metadata/dc:format] LIKE 'video/%'
Find all pages with a specific template and an alias
----------------------------------------------------
@frieder
frieder / gist:42af600026d089b3871e2aab4fad183c
Created October 8, 2017 03:56
Remove systemd restriction from Proxmox DAB
This snippet is a response to https://bitbucket.org/flybyte/dab-templates to enable Proxmox DAB to
create Debian LXC templates that use systemd as the default init system. Following are the instructions
on what to do to get DAB creating a systemd LXC Debian template.
===
# Make a copy of DAB.pm
cp /usr/share/perl5/PVE/DAB.pm /usr/share/perl5/PVE/DAB.pm.bak
---
This snippet shows how to create a LXC template by using debootstrap. Done. This is a response to https://bitbucket.org/flybyte/dab-templates which does the same but has the limitation that it will result in a system that uses sysvinit while with this approach the system will use systemd.
===
mkdir -p /opt/debian && cd /opt/debian
---
debootstrap --arch amd64 --variant=minbase jessie /opt/debian/root http://ftp.ch.debian.org/debian
@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