Skip to content

Instantly share code, notes, and snippets.

@EWouters
EWouters / install_pivpn.sh
Created July 5, 2018 01:25
Example unattended pivpn install
do_install_pivpn() {
#curl -L https://install.pivpn.io | bash
setupVars=/etc/pivpn/setupVars.conf
if [ -e "${setupVars}" ]; then
sed -i.update.bak '/pivpnUser/d;/UNATTUPG/d;/pivpnInterface/d;/IPv4dns/d;/IPv4addr/d;/IPv4gw/d;/pivpnProto/d;/PORT/d;/ENCRYPT/d;/DOWNLOAD_DH_PARAM/d;/PUBLICDNS/d;/OVPNDNS1/d;/OVPNDNS2/d;/SERVER_NAME/d;' "${setupVars}"
else
mkdir -p /etc/pivpn
touch "${setupVars}"
fi
@EWouters
EWouters / Cell magic 2to3.ipynb
Created December 11, 2016 08:54
Jupyter notebook that shows cell magic to run python2 code in python3 kernel
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EWouters
EWouters / install_spreed_webrtc.sh
Created March 9, 2017 02:40
Script to install Spreed WebRTC. Will not work by itself.
#!/bin/bash
# The repo for Spreed WebRTC will not work, therefore:
ASK_INSTALL_SPREED=2
CPUS=$(grep ^processor /proc/cpuinfo | wc -l)
do_install_spreed_webrtc() {
if [ -f $LOCK_DIR/spreed_webrtc-installed.lock ]; then
echo && echo "Spreed WebRTC is already installed and configured. Continuing..." && echo && sleep 1