Skip to content

Instantly share code, notes, and snippets.

dcava /
Created January 16, 2023 05:11 — forked from bradp/
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo " \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
dcava /
Last active March 22, 2020 21:35 — forked from pamolloy/
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
dcava / gist:77049d346094d0771fe6c0cee0bf3079
Created January 28, 2019 11:43
Wireguard compile for synology
[Guide] [Intermediate] How to install Wireguard VPN
After lots of trial and error I figured out how to compile Wireguard for my DS718+. The first thing I did was search in this sub for a guide but didn't find any.
Wireguard is still experimental software. You should stay up-to-date with the daily snapshots.
This guide also requires familiarity with the command line and how to build software from source.
dcava /
Created January 6, 2019 06:11 — forked from aswild/
Download and build the wireguard kernel module and tools for EdgeOS. see
THISDIR=$(readlink -f $(dirname $0))
export PATH=$THISDIR/toolchain/bin:$PATH
Accessing docker container private network easily from your boot2docker host
add a Host-only adapter in VirtualBox
# show route table
netstat -nr

set up root and replace default user

pi@raspberrypi:~# sudo su
root@raspberrypi:/home/pi# passwd
root@raspberrypi:/home/pi# reboot

log in as root and set up new user

root@raspberrypi:~# useradd -d /home/user user
root@raspberrypi:~# passwd user
dcava /
Created July 31, 2018 12:14 — forked from inventionate/
Install R with OpenBLAS via Homebrew
# Stat Installation
# XCode CLT
xcode-select --install
# Update Homebrew
brew update
# Check for broken dependencies and/or outdated packages
brew doctor
dcava / bibtex_2academic.R
Created April 25, 2018 10:58 — forked from lbusett/bibtex_2academic.R
script for importing publications from a "bibtex" file to a hugo-academic website
#' @title bibtex_2academic
#' @description import publications from a bibtex file to a hugo-academic website
#' @author Lorenzo Busetto, phD (2017) <>
bibtex_2academic <- function(bibfile,
abstract = FALSE,
overwrite = FALSE) {
dcava /
Created February 20, 2018 11:58 — forked from superjamie/
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.


Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

dcava / osxvpnrouting.markdown
Created December 5, 2017 10:26 — forked from taldanzig/osxvpnrouting.markdown
Routing tips for VPNs on OS X

Routing tips for VPNs on OS X

When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.

Specific cases

Case 1: conflicting additional routes.

In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN: