Skip to content

Instantly share code, notes, and snippets.

@EWouters
EWouters / install_pivpn.sh
Created Jul 5, 2018
Example unattended pivpn install
View install_pivpn.sh
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 / install_spreed_webrtc.sh
Created Mar 9, 2017
Script to install Spreed WebRTC. Will not work by itself.
View install_spreed_webrtc.sh
#!/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
@EWouters
EWouters / Cell magic 2to3.ipynb
Created Dec 11, 2016
Jupyter notebook that shows cell magic to run python2 code in python3 kernel
View Cell magic 2to3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.