Skip to content

Instantly share code, notes, and snippets.

@jfeilbach
jfeilbach / gist:a568110297dca3f3c5b60b515a909aa5
Created March 9, 2018 01:28
Configuring node stores and data stores in AEM 6.3
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.config
# Units are in bytes. You don't need to specify the units.
# Examples:
# 1) 64GB
cacheSize="68719476736"
#2) 64MB
cacheSize="67108864"
org.apache.jackrabbit.oak.segment.SegmentNodeStoreService
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
#!/bin/bash
# Creates a report with all files in listed directories.
# Checks if those files are x265 compression or not.
# Outputs all files that are not.
# Created on Nov 7th 2015 by steelbox.
# Modified on Nov 26th 2016 for Github.
# Verify script usage.
#!/bin/sh
# Input Parameters
ARG_PATH="$3"
ARG_NAME="$2"
ARG_LABEL="N/A"
CONFIG_OUTPUT="${HOME}/Media" # Filebot's final destination for the renamed file
# filebot used to extract any rar
filebot -extract "${ARG_PATH}/${ARG_NAME}/" --output "${ARG_PATH}/${ARG_NAME}/"
@jfeilbach
jfeilbach / gist:18b08ea0ed9eaf844d643ab092905973
Last active June 16, 2024 18:04
tvOS.xml for plex (modified) for use with AppleTV 4k
<?xml version="1.0" encoding="utf-8"?>
<Client name="tvOS">
<!-- Author: Plex Inc. -->
<!-- This profile is used by A10X-based tvOS (Apple TV 4K) devices using the MPV ("experimental") video player. Currently, this requires a Plex Pass subscription. -->
<!-- Because Plex does not currently support TrueHD or DTS-MA playback in the client, this audio is transcoded to FLAC. -->
<Settings>
<Setting name="DirectPlayStreamSelection" value="true" />
<Setting name="StreamUnselectedIncompatibleAudioStreams" value="true" />
</Settings>
<TranscodeTargets>
@jfeilbach
jfeilbach / gist:53b768169051ab4a3d1bf983af675a91
Last active May 21, 2018 04:02
a watched pot never boils; time machine status and time remaining
RUN=$(tmutil status |grep 'Running' | awk '{ print $3 }' | tr -d ";")
if [[ "$RUN" = "1" ]]
then
echo running
while true
do
secs=$(tmutil status | grep 'TimeRemaining' |awk '{ print $3 }' | tr -d ";")
STATUS=$(tmutil status | awk '/_raw_Percent/ {print $3}' | grep -o '[0-9].[0-9]\+' | awk '{print $1*100}')
REM=$(printf '%dh:%dm:%ds\n' $(($secs/3600)) $(($secs%3600/60)) $(($secs%60)))
echo "$STATUS% complete $REM remaining"
@jfeilbach
jfeilbach / gist:3f0c03494bbabb73b7cc84de8b7e855e
Created April 12, 2018 20:17
start aem 6.4 with systemd and actually have it work properly
[Unit]
Description=Adobe Experience Manager
After=network.target
[Service]
Type=simple
User=aem
ExecStart=/opt/aem/author/crx-quickstart/bin/start
ExecStop=/opt/aem/author/crx-quickstart/bin/stop
RemainAfterExit=yes
@jfeilbach
jfeilbach / gist:0781b1777c48a1e41bbf31a186e04fb2
Last active March 14, 2023 23:50
Bash script to dump UPnP NAT entries
#!/bin/bash
url=$1
soap_head=’<?xml version=”1.0” encoding=”utf-8”?><s:Envelope s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:s=”http://schemas. xmlsoap.org/soap/envelope/”><s:Body><u:GetGenericPortMappingEntry xmlns:u=”urn:upnp- org:serviceId:WANIPConnection.1#GetGenericPortMappingEntry”><NewPortMappingIndex>’ soap_tail=’</NewPortMappingIndex></u:GetGenericPortMappingEntry></s:Body></ s:Envelope>’
for i in `seq 1 1000`; do
payload=$soap_head$i$soap_tail
curl -H ‘Content-Type: “text/xml;charset=UTF-8”’ -H ‘SOAPACTION: “urn:schemas-
upnp-org:service:WANIPConnection:1#GetGenericPortMappingEntry”’ --data “$payload” “$url”
echo “” done
Affected Manufacturers/Models:
ASUS
DSL-AC68R, DSL-AC68U, DSL-N55U, DSL-N55U-B, MTK7620, RT-AC3200, RT-AC51U, RT-AC52U, RT-AC53, RT-AC53U, RT-AC54U, RT-AC55U, RT-AC55UHP, RT- AC56R, RT-AC56S, RT-AC56U, RT-AC66R, RT-AC66U, RT-AC66W, RT-AC68P, RT-AC68R, RT-AC68U, RT-AC68W, RT-AC87R, RT-AC87U, RT-G32, RT-N10E, RT-N10LX, RT- N10P, RT-N10PV2, RT-N10U, RT-N11P, RT-N12, RT-N12B1, RT-N12C1, RT-N12D1, RT-N12E, RT-N12HP, RT-N12LX, RT-N12VP, RT-N14U, RT-N14UHP, RT-N15U, RT-N16, RT- N18U, RT-N53, RT-N56U, RT-N65R, RT-N65U, RT-N66R, RT-N66U, RT-N66W, RTN13U, SP-AC2015, WL500
D-Link
DIR-601, DIR-615, DIR-620, DIR-825, DSL-2652BU, DSL- 2750B, DSL-2750B-E1, DSL-2750E, DVG-2102S, DVG- 5004S, DVG-N5402SP, RG-DLINK-WBR2300
@jfeilbach
jfeilbach / gist:42bd85d0315a3826fb782fbdcf09d0f3
Created April 25, 2018 20:15
org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore.config
file ::= (comment) (header) *
comment ::= '#' <any>
header ::= prop '=' value
prop ::= symbolic-name // 1.4.2 of OSGi Core Specification
symbolic-name ::= token { '.' token }
token ::= { [ 0..9 ] | [ a..z ] | [ A..Z ] | '_' | '-' }
value ::= [ type ] ( '[' values ']' | '(' values ')' | simple )
values ::= simple { ',' simple }
simple ::= '"' stringsimple '"'
type ::= <1-char type code>