Skip to content

Instantly share code, notes, and snippets.

@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>
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
Validating a broken DNSSEC domain:
trying to resolve a domain that has DNSSEC issues should only return a SERVFAIL returncode without any DNS data:
~ dig www.dnssec-failed.org
; <<>> DiG 9.7.2-P2 <<>> www.dnssec-failed.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 17692
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
@jfeilbach
jfeilbach / gist:811b73e790c8072fc8c38fba7da3b10e
Last active May 20, 2018 15:51
replace_tracker.sh update transmission client torrents matching tracker string with new tracker URL
#!/bin/bash
# Borrowed from https://gist.github.com/Adadov/e352c05cf2f90031e5b9b623509a02da
GNU='/usr/local/bin/gsed'
if [ "$(uname)" == "Darwin" ]; then
echo "macOS detected. Using GNU sed instead of built-in."
if [[ -f "$GNU" ]]; then
echo "GNU sed found at $GNU."
SED=${GNU}
$ sudo pmset -g live
System-wide power settings:
SleepDisabled 0
Currently in use:
standby 1
Sleep On Power Button 1
womp 1
autorestart 0
hibernatefile /var/vm/sleepimage
powernap 1
@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"
rsync -P -avz user@host:/onefolder otherfolder/ | python $basename.py
import progressbar
import sys
def read_stdin():
line = ''
while sys.stdin:
try:
c = sys.stdin.read(1)
@jfeilbach
jfeilbach / gist:76330a038dbb8ac06975c5da651d1184
Last active May 30, 2018 19:26
brew install imagemagick
brew install gcc
brew -v update
brew install imagemagick --with-librsvg --with-openmp --with-pango --with-webp --with-fontconfig --with-fftw --with-openjpeg --with-openexr --with-opencl --with-libwmf --with-perl --with-little-cms --with-little-cms2 --with-ghostscript --with-liblqr --with-x11 --with-hdri --with-libheif
The Publish production Tomcat app servers have crashed. Please restart the app servers by running ' service tcat restart'. If OOM killer has been running reboot the hosts by running 'sudo shutdown -r now'. You can check by running. 'dmesg | egrep -i 'killed process''.
-- The hostnames are l14270 and l14271.
-- SSH alias is publish.app.prod[1,2]
@jfeilbach
jfeilbach / settings.json
Last active September 22, 2018 16:43
transmission daemon config file ~/.config/transmission-daemon/settings.json
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "192.168.1.53",
"bind-address-ipv6": "::",