Skip to content

Instantly share code, notes, and snippets.

View ThomasLeister's full-sized avatar

Thomas Leister ThomasLeister

View GitHub Profile
@ThomasLeister
ThomasLeister / sa-practise
Last active August 29, 2015 14:03
Teach Spamassassin
#!/bin/sh
###
### The full path to a user's mailbox is: /var/vmail/domain/user/mail/
### This script runs through the users' mailboxes and runs the sa-learn command to practise
### Spamassassin based on the mailbox contents. Spam is collected in the Spam/ directory of every single mailbox
###
DOMAINS="domain1 domain2 domain3"
@ThomasLeister
ThomasLeister / uptimerobot-statuspage.php
Last active August 29, 2015 14:04
Catches the current Uptimerobot status and displays it on a webpage
<?php
/****************************************************************
* Copyright 2014 Thomas Leister
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@ThomasLeister
ThomasLeister / conky_deepsea
Last active August 29, 2015 14:04
Conky Theme Deep Sea
#==============================================================================
# Deep Sea Conky Template
# Author: Thomas Leister
# License: Public Domain
#==============================================================================
background yes
update_interval 1
@ThomasLeister
ThomasLeister / wma-to-mp3
Created May 30, 2015 13:04
.wma to mp3 ffpmeg
#!/bin/sh
for f in *.wma;
do
echo "Processing $f"
ffmpeg -i "$f" -acodec libmp3lame -ab 128k "output/${f%}.mp3"
done
@ThomasLeister
ThomasLeister / convert-mp4-to-mp3
Created July 24, 2014 08:24
Converts MP4 video files to MP3 audio files via ffmpeg
#!/bin/sh
for f in *.mp4;
do
echo "Processing $f"
ffmpeg -i "$f" "output/${f%}.mp3"
done
@ThomasLeister
ThomasLeister / usesystemtrust.js
Created February 23, 2017 10:23
Let Firefox use Windows CA trust store
/*
* Store this script in your Firefox application directory:
* C:\Program Files (x86)\Mozilla Firefox\defaults\pref
* ... and restart Firefox. Firefox should use the Windows trust store after the next start
*/
/* Activate Windows trust store support (experimental)*/
pref("security.enterprise_roots.enabled", true);
@ThomasLeister
ThomasLeister / 10-atom-inotify.conf
Created March 20, 2017 16:49
Atom Editor unable to watch path. Create file: /etc/sysctl.d/10-atom-inotify.conf
fs.inotify.max_user_watches = 32768
@ThomasLeister
ThomasLeister / pdf-remove-password.sh
Last active June 4, 2017 09:49
PDF Passwortschutz entfernen
### Execute in directory with .pdf files in it.
dnf install qpdf
mkdir out
find . -maxdepth 1 -type f -iname '*.pdf' -printf '%f\0' | xargs -0 -I '{}' qpdf --password="MYPASSWORD" --decrypt '{}' out/'{}'
@ThomasLeister
ThomasLeister / le-cert-verification-multiple-hosts.txt
Created August 12, 2017 19:12
Let's Encrypt Zertifikatsbestätigungen sammeln
###
### Let's Encrypt Zertifikatsbestätigungen sammeln
### (nur möglich im manual mode und mit webroot-verifizierung)
Auf allen anderen Hosts:
### /etc/nginx/global/letsencrypt-auth.conf
location /.well-known/acme-challenge {
location ~ /.well-known/acme-challenge/(.*) {
return 301 http://le-auth.650thz.de$request_uri;
@ThomasLeister
ThomasLeister / fedora_latest_stable_kernel
Created September 5, 2017 20:13
Latest official vanilla linux kernel
Add this into /etc/yum.repos.d/fedora-kernel-vanilla-stable.repo
# Place this file in your /etc/yum.repos.d/ directory
[fedora-kernel-vanilla-stable]
name=Linux vanilla kernels for Fedora, stable series
baseurl=http://repos.fedorapeople.org/repos/thl/kernel-vanilla-stable/fedora-$releasever/$basearch/
enabled=1