Skip to content

Instantly share code, notes, and snippets.

View ThomasLeister's full-sized avatar

Thomas Leister ThomasLeister

View GitHub Profile

Keybase proof

I hereby claim:

  • I am thomasleister on github.
  • I am thomasleister (https://keybase.io/thomasleister) on keybase.
  • I have a public key whose fingerprint is 2500 F4F5 2F77 AE69 E22B 331D 2AB6 AD36 9DFD 2A65

To claim this, I am signing this object:

@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 / 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 / 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
insert into tlspolicies (domain, policy, params) values ('email.de', 'secure', 'match=.web.de');
insert into tlspolicies (domain, policy, params) values ('freenet.de', 'secure', 'match=.freenet.de');
insert into tlspolicies (domain, policy, params) values ('gmx.at', 'dane-only', '');
insert into tlspolicies (domain, policy, params) values ('gmx.biz', 'secure', 'match=.gmx.net');
insert into tlspolicies (domain, policy, params) values ('gmx.ch', 'dane-only', '');
insert into tlspolicies (domain, policy, params) values ('gmx.co.uk', 'secure', 'match=.gmx.net');
insert into tlspolicies (domain, policy, params) values ('gmx.com', 'dane-only', '');
insert into tlspolicies (domain, policy, params) values ('gmx.com.my', 'secure', 'match=.gmx.net');
insert into tlspolicies (domain, policy, params) values ('gmx.de', 'dane-only', '');
insert into tlspolicies (domain, policy, params) values ('gmx.es', 'secure', 'match=.gmx.net');
@ThomasLeister
ThomasLeister / install-root-ca.sh
Created February 23, 2017 10:19
Firefox, Thunderbird, Chromium, Chrome Root CA certificate installer
#!/bin/bash
### Script installs root.cert.pem to certificate trust store of applications using NSS
### (e.g. Firefox, Thunderbird, Chromium)
### Mozilla uses cert8, Chromium and Chrome use cert9
###
### Requirement: apt install libnss3-tools
###
@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);
#!/bin/sh
libressl_version=libressl-2.5.1
libressl_archive=${libressl_version}.tar.gz
if [ -f ${libressl_archive} ]
then
:
else
wget -O ${libressl_archive} https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${libressl_archive}