Skip to content

Instantly share code, notes, and snippets.

View ThomasLeister's full-sized avatar

Thomas Leister ThomasLeister

View GitHub Profile
@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
#!/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}
@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 / 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
###
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 / 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 / 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 / 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 / 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"