Skip to content

Instantly share code, notes, and snippets.

@dcava
dcava / setup.sh
Created January 16, 2023 05:11 — forked from bradp/setup.sh
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 "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@dcava
dcava / WireGuard on OSMC RBP3
Created October 28, 2017 05:02
Instructions to setup wireguard on Raspberry pi 2/3 and get it working with streisand
# Install repo
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' > /etc/apt/preferences.d/limit-unstable
apt update
#unstall kernel sources headers (not sure if need both)
apt install libmnl-dev rbp2-headers-$(uname -r) rbp2-source-$(uname -r) build-essential pkg-config
#ln the build dir to kernel headers
@dcava
dcava / gist:77049d346094d0771fe6c0cee0bf3079
Created January 28, 2019 11:43
Wireguard compile for synology
https://www.reddit.com/r/synology/comments/a2erre/guide_intermediate_how_to_install_wireguard_vpn/
[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.
WARNING
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
dcava / openVPN synology.txt
Created January 17, 2017 12:36
Setup OpenVPN on Synology DSM6
Personal reminder guide on how to more securely setup OpenVPN on Synology DSM 6.2+ (Jan 2017)
Issues fixed:
1. Default OpenVPN is secured with auth-use-pass only
2. no HMAC
3. no client certificate
4. no DH
Problems:
@dcava
dcava / README.md
Last active March 22, 2020 21:35 — forked from pamolloy/README.md
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/FossoresLP/vyatta-wireguard/releases 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
dcava / vyatta_wireguard_build.sh
Created January 6, 2019 06:11 — forked from aswild/vyatta_wireguard_build.sh
Download and build the wireguard kernel module and tools for EdgeOS. see https://github.com/Lochnair/vyatta-wireguard
#!/bin/bash
WIREGUARD_TAG=0.0.20181218
THISDIR=$(readlink -f $(dirname $0))
SYSROOT=$THISDIR/sysroot
TARGET=mips64-octeon-linux-gnu
MUSL_CC=$SYSROOT/bin/musl-gcc
export PATH=$THISDIR/toolchain/bin:$PATH
Accessing docker container private network easily from your boot2docker host
-----
(from http://ispyker.blogspot.com/2014/04/accessing-docker-container-private.html)
add a Host-only adapter in VirtualBox
OSX:
# 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
dcava / install-r.sh
Created July 31, 2018 12:14 — forked from inventionate/install-r.sh
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
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) <lbusett@gmail.com>
bibtex_2academic <- function(bibfile,
outfold,
abstract = FALSE,
overwrite = FALSE) {
require(RefManageR)