Skip to content

Instantly share code, notes, and snippets.

View aitseitz's full-sized avatar
⚜️

Alexander Seitz aitseitz

⚜️
View GitHub Profile
@hi-ko
hi-ko / md4hash.py
Last active May 3, 2021 09:23
generate initial password for alfresco admin (by mt and AFaust from discord)
#!/usr/bin/python3
import hashlib
import sys
# import os
#hash = hashlib.new('md4', os.environ['ALF_ADMIN_PASS'].encode('utf-16le')).digest()
hash = hashlib.new('md4', sys.argv[1].encode('utf-16le')).digest()
print(bytes.hex(hash))
@rmalchow
rmalchow / solr_pw_hash.md
Last active August 21, 2023 12:33
how to generate password hash and salt for basic auth in solr

solr has a basic authentication module. the description of how to generate the necessary hash + salt string is very hazy. there is this:

https://github.com/ansgarwiechers/solrpasswordhash

project with java code extracted from the solr source .... and then there is this:

@AFaust
AFaust / reset_alf_auth_script.sql
Last active January 23, 2025 12:10
Reset Alfresco Authorised Users tracking (only meant for fixing errors, i.e. MNT-16663, or false-positive 'manual changes' detection - not to circumvent subscription terms)
-- clear all user license states
delete from alf_auth_status;
-- remove old checksum and keystore
-- ns_id = 1 should always be the system model, store_id = 2 always the system store
delete from alf_node_properties where qname_id in (
select id from alf_qname where ns_id = 1 and local_name in ('keyStore', 'authorizationChecksum')
) and node_id in (
select id from alf_node where store_id = 2
);
@AFaust
AFaust / alfresco
Created May 2, 2017 07:26
Alfresco logrotate.d examples - able to handle compress and clear historic timestamped log files
/opt/alfresco/tomcat/logs/catalina.out {
daily
rotate 27
notifempty
missingok
compress
delaycompress
copytruncate
}
@skitazaki
skitazaki / gist:2359180
Created April 11, 2012 13:04
Simple access_log analysis
# Calculate by response status code.
cat /usr/local/nginx/latest/logs/access.log |
awk '$9 < 200 || $9 >= 600 { print $0 > "/dev/stderr"; }
$9 >= 200 && $9 < 600 { print $9; }' |
sort |
uniq -c
# Show raw lines of specific response status code line.
cat /usr/local/nginx/latest/logs/access.log |
awk '$9 == 301 { print $0 ; }'
@jvhaarst
jvhaarst / movedigiphotos.bash
Last active April 9, 2025 13:05
Bash script to move images, based on exif data and file timestamp
#!/bin/bash
# Reads EXIF creation date from all .JPG files in the
# current directory and moves them carefully under
#
# $BASEDIR/YYYY/YYYY-MM/YYYY-MM-DD/
#
# ...where 'carefully' means that it does not overwrite
# differing files if they already exist and will not delete
# the original file if copying fails for some reason.