This can be used to encode a string using huffman compression in Python and decode it in Python or c.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import subprocess | |
inFile = "./frontend/linboosselectionrow.cpp" | |
with open(inFile, "rt") as fin: | |
with open("tmp.cpp", "wt") as fout: | |
translationId = "" | |
translationIdPrefix = "" | |
for line in fin: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
certificateFile="SomeCert.crt" | |
certificateName="Some Name" | |
for certDB in $(find ~/.mozilla* ~/.thunderbird -name "cert9.db") | |
do | |
certDir=$(dirname ${certDB}); | |
#log "mozilla certificate" "install '${certificateName}' in ${certDir}" | |
certutil -A -n "${certificateName}" -t "TCu,Cuw,Tuw" -i ${certificateFile} -d sql:${certDir} | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import subprocess | |
import os | |
import xml.etree.ElementTree as ET | |
import csv | |
from datetime import datetime, timedelta | |
def listWorkstations(school): | |
""" | |
Generate a dict with workstations and parameters out of devices file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
set $monitorId <YOUR_ID>; | |
server_name status.<YOUR_DOMAIN>; | |
listen 80; | |
location / { | |
proxy_set_header Host "stats.uptimerobot.com"; | |
proxy_set_header Accept-Encoding ""; | |
proxy_pass_request_headers on; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in $(docker ps -a | cut -f 1 -d ' ' | xargs); do docker rm $i; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3-alpine | |
RUN pip install tenda4g09 | |
COPY ./run.py /run.py | |
COPY ./reboot.py /reboot.py | |
CMD ["/usr/local/bin/python3", "-u", "/run.py"] |
Scripts for Linuxmuster import of custom E-Mail Adresses.
This may break your LDAP, use at your own risk and only if you know what you are doing!
- Put
initializeUsersCreatedInLastImport.py
,ldapHelper.py
andlmnListImportFilterScript.py
into/root/scripts
on the school server. - Link
initializeUsersCreatedInLastImport.py
to/etc/linuxmuster/sophomorix/hooks/sophomorix-add.d/50-set-firstpassword-and-email.py
- Go to the WebUI in
Globale Einstellungen > Listenimport > Pfad zum Filterskript
(at the very bottom) - Enter
/root/scripts/lmnListImportFilterScript.py
into the students.csv field and save