Skip to content

Instantly share code, notes, and snippets.

View aitseitz's full-sized avatar
⚜️

Alexander Seitz aitseitz

⚜️
View GitHub Profile
@aitseitz
aitseitz / enable_tmp_mount.sh
Last active March 14, 2024 16:01
Temporary Directories Linux
#!/bin/bash
# This scripts enabled /tmp as RAM disc
function checkTmpDirectoryStatus(){
echo "Check your /tmp directory"
df -h /tmp
echo ""
echo "Check status of systemd tmp.mount"
sudo systemctl status tmp.mount
}
@aitseitz
aitseitz / cleanup_alfresco_lost_and_found.sh
Created January 26, 2024 08:45
Cleanup Alfresco's Lost&Found Folder in the Repository
#!/bin/bash
echo "$(date +"%Y-%m-%d %H:%M:%S,%3N") - This Script automatically cleanups the nodes underneath Lost & Found folder"
# Variables:
ALFRESCO_HOST_URL='https://localhost:8443'
AUTH_PASS="YWRtaW46YWRtaW4="
LOST_N_FOUND_FOLDER_NODE_ID="2f849cd8-9737-477d-9584-1af99a3b4b0e"
# Optional Variables
MAX_ITEMS=1000
@aitseitz
aitseitz / acs_systemd.md
Last active July 21, 2023 15:59
Alfresco & Systemd "best practices"

Systemd Config for Alfresco Content-Services (ACS)

Systemd Unit file located at

/etc/systemd/system/acs.service

[Unit]
Description=Alfresco Content Services (ACS)
@aitseitz
aitseitz / Alfresco Search Services Useful Link & Query Collection
Last active July 22, 2023 05:47
Alfresco Search Services Usefull Link & Query Collection
@aitseitz
aitseitz / resolve_hosts.sh
Last active September 29, 2023 16:15
Quickly get IP Adresses from a hostlist
#!/bin/bash
while read -r line || [[ -n $line ]];
do
# exlucde lines starting with a '#' character
if [[ ! $line =~ ^\# ]]; then
host "$line"
fi
done < resolve_hosts.txt | awk '{print($1 " --> "$4)}';
@aitseitz
aitseitz / check_memory_usage.sh
Last active September 29, 2023 16:16
Checks for RAM and SWAP Usage
#!/bin/bash
echo "free -m:"
free -m
echo " "
echo "------"
echo "sysctl vm.swappiness :"
sysctl vm.swappiness
@aitseitz
aitseitz / sar_intervall.sh
Created January 3, 2023 09:04
Collect system activity information with SAR
#!/bin/bash
INTERVAL=${1:-5}
COUNT=${2:-59}
today=`date +%Y-%m-%d`
sar -u $INTERVAL $COUNT >> ~/log/sarstat-${today}.out
@aitseitz
aitseitz / opendailywork.sh
Last active October 26, 2022 09:19
How I startup my dailywork.sh in Linux (Mint)
#!/bin/bash
# This is a Script to automatically open the applications and webpages I need
# for daily work and it places them on the correct linux workspace
# I took some code & ideas from:
# https://github.com/lu0/dotfiles_linuxMint/blob/master/scripts/startup_session.sh
#
# Author: Alexander Seitz
# Repo: https://gist.github.com/aitseitz
#
@aitseitz
aitseitz / alfresco.xml
Last active September 29, 2023 16:23
Alfresco Deployment Descriptor for Tomcat 9
<?xml version='1.0' encoding='utf-8'?>
<Context crossContext="true" docBase="{{ acs_home }}/ecm_war_delivery/alfresco.war">
<Resources cacheMaxSize="{{ tomcat_resource_cache }}" cacheObjectMaxSize="1024">
<PostResources base="${catalina.base}/../modules/platform"
className="org.apache.catalina.webresources.DirResourceSet"
webAppMount="/WEB-INF/lib"/>
</Resources>
</Context>