Skip to content

Instantly share code, notes, and snippets.

@pcwerk
pcwerk / WireGuard_Setup.txt
Created April 15, 2020 15:18 — forked from chrisswanda/WireGuard_Setup.txt
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
yum -y update
yum -y install qemu-kvm libvirt libvirt-python libguestfs-tools virt-install
systemctl enable libvirtd
systemctl start libvirtd
usermod --append --groups libvirt localadmin
# source https://www.cyberciti.biz/faq/how-to-install-kvm-on-centos-7-rhel-7-headless-server/
@pcwerk
pcwerk / docker.sh
Created April 8, 2020 15:02
centos 7 install docker
sudo yum check-update
curl -fsSL https://get.docker.com/ | sh
sudo systemctl start docker
sudo systemctl status docker
sudo systemctl enable docker
sudo usermod -aG docker localadmin
@pcwerk
pcwerk / tag_map.clj
Created July 13, 2016 02:09
Good way to get a tag a string and a map
(ns tag-map.clj
(:gen-class))
(defn tag
[word]
(str "`" word "`"))
(def line-str "This is a test to see if this works. It's a cool dog test. One must work hard to get the right answer.")
(def keywords
@pcwerk
pcwerk / tag_map.clj
Created July 13, 2016 02:08
Good way to get a tag a string and a map
(ns tag-map.clj
(:gen-class))
(defn tag
[word]
(str "`" word "`"))
(def line-str "This is a test to see if this works. It's a cool dog test. One must work hard to get the right answer.")
(def keywords
@pcwerk
pcwerk / levmarq.c
Created May 20, 2016 10:56 — forked from rbabich/ levmarq - Levenberg-Marquardt in plain C
A simple implementation of the Levenberg-Marquardt algorithm in plain C
/*
* levmarq.c
*
* This file contains an implementation of the Levenberg-Marquardt algorithm
* for solving least-squares problems, together with some supporting routines
* for Cholesky decomposition and inversion. No attempt has been made at
* optimization. In particular, memory use in the matrix routines could be
* cut in half with a little effort (and some loss of clarity).
*
* It is assumed that the compiler supports variable-length arrays as