Skip to content

Instantly share code, notes, and snippets.

@pamolloy
pamolloy / README.md
Last active October 16, 2024 20:40
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/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
@omalley
omalley / github schema
Last active September 26, 2018 08:16
Auto-discovered Apache Hive schema for githubarchive.org's JSON logs
create table github (
actor: string,
actor_attributes: struct <
blog: string,
company: string,
email: string,
gravatar_id: binary,
location: string,
login: string,
name: string,
@rsvp
rsvp / freqy.sh
Created February 18, 2012 15:43
freqy.sh : sort lines by their frequency count -- a very useful idiom as Linux bash script.
#!/usr/bin/env bash
# bash 3.2.25(1) Ubuntu 7.10 Date : 2012-02-15
#
# _______________| freqy : sort and order lines by frequency of appearance.
#
# Usage: freqy [optional: file(s)]
#
# Notes: Will work in a pipe.
# Does not alter the file(s) themselves.
#