Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# names of latest versions of each package
export NGINX_VERSION=1.25.2
export VERSION_PCRE=pcre-8.45
export VERSION_LIBRESSL=libressl-3.8.1
export VERSION_NGINX=nginx-$NGINX_VERSION
export SPNEGO_VERSION=1.1.1
export GEOIP2_VERSION=3.4
export VERSION_SPNEGO=v${SPNEGO_VERSION}
# dot.kshrc
. /etc/ksh.kshrc
case $TERM in
screen-256color|xterm*)
HOST=`hostname`
HOST=${HOST%%.*}
PS1='\[\033[0;31m\]${USER}\[\033[0m\]@\[\033[0;32m\]${HOST}\[\033[0m\] \[\033[0;36m\]${PWD##${HOME}/}\[\033[0m\] \$ '
;;
## Script to copy LetsEncrypt certificates to InspIRCd
## Run this after certbot renew !
## Dorian Harmans <contact@dorianharmans.nl>
## ---------------------------------------------------
#!/bin/bash
LETSENCRYPTDIR="/etc/letsencrypt/live"
IRCSERVERNAME="irc.domain.tld"
[Unit]
Description=InspIRCd IRC server
After=syslog.target network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c 'cd /home/ircuser/inspircd/run/bin && ./inspircd start'
ExecReload=/bin/bash -c 'cd /home/ircuser/inspircd/run/bin && ./inspircd rehash'
ExecRestart=/bin/bash -c 'cd /home/ircuser/inspircd/run/bin && ./inspircd restart'
#!/bin/bash
mkdir -p Amsterdam
cd Amsterdam
rm -f {Activiteiten,EtenDrinken,Evenementen,Festivals,MuseaGalleries,Shoppen,Tentoonstellingen,Theater,UitInAmsterdam}.json
wget http://open.data.amsterdam.nl/Activiteiten.json
wget http://open.data.amsterdam.nl/EtenDrinken.json
wget http://open.data.amsterdam.nl/Evenementen.json
wget http://open.data.amsterdam.nl/Festivals.json
wget http://open.data.amsterdam.nl/MuseaGalleries.json
wget http://open.data.amsterdam.nl/Shoppen.json
@woohooyeah
woohooyeah / openvpn-002-libressl_fix.patch
Last active March 24, 2018 16:51
a patch for OpenVPN 2.4.5 to prevent errors when compiling with LibreSSL 2.7.0/2.7.1
--- src/openvpn/openssl_compat.h 2018-03-23 21:15:33.469068148 +0100
+++ src/openvpn/openssl_compat.h 2018-03-23 21:21:55.194909901 +0100
@@ -661,7 +661,7 @@
#define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT RSA_F_RSA_EAY_PRIVATE_ENCRYPT
#endif
-#if !HAVE_DECL_SSL_CTX_GET_MIN_PROTO_VERSION
+#if 0
/** Return the min SSL protocol version currently enabled in the context.
* If no valid version >= TLS1.0 is found, return 0. */
@woohooyeah
woohooyeah / openvpn-001-libressl_fix.patch
Last active March 24, 2018 15:33
a patch for OpenVPN 2.4.5 to prevent errors when compiling with LibreSSL 2.6.4
diff --git a/configure.ac b/configure.ac
index 88d1e09..7db5c79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -935,6 +935,18 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then
EC_GROUP_order_bits
]
)
+ AC_CHECK_DECL(
+ [
--- a/shared/nm-service-defines.h 2018-03-23 00:31:56.180066624 +0100
+++ b/shared/nm-service-defines.h 2018-03-23 00:32:29.185250406 +0100
@@ -93,6 +93,8 @@
#define NM_OPENVPN_AUTH_SHA256 "SHA256"
#define NM_OPENVPN_AUTH_SHA384 "SHA384"
#define NM_OPENVPN_AUTH_SHA512 "SHA512"
+#define NM_OPENVPN_AUTH_STREEBOG256 "streebog256"
+#define NM_OPENVPN_AUTH_STREEBOG512 "streebog512"
#define NM_OPENVPN_CONTYPE_PASSWORD "password"
*/10 * * * * ( /root/make-spammers-list.sh >/dev/null 2>&1 ) && /root/insert-spammers-into-iptables.sh
*/10 * * * * ( /root/make-spammers-list-ipv6.sh >/dev/null 2>&1 ) && /root/insert-spammers-into-ip6tables.sh
## Script to copy LetsEncrypt certificates to ZNC
## Run this after certbot renew !
## Dorian Harmans <contact@dorianharmans.nl>
## ---------------------------------------------------
#!/bin/bash
LETSENCRYPTDIR="/etc/letsencrypt/live"
ZNCSERVERNAME="znc.domain.tld"