Skip to content

Instantly share code, notes, and snippets.

austinhappel /
Created Feb 8, 2020
How to create a bootable encrypted root drive for Manjaro ARM

How to create a bootable encrypted root drive for Manjaro ARM

Written Saturday November 4, 2019

Specifically, this guide is for Manjaro ARM on a Raspberry Pi 4. I don't see why this wouldn't work for other ARM Linux operating systems, however.

General steps

  1. Install the dependencies to support encryption

Keybase proof

I hereby claim:

  • I am austinhappel on github.
  • I am austinhappel ( on keybase.
  • I have a public key ASDiMqns1umB2m8AcLmoqgbJx2TH5n6nf2nteE1hGVBM6wo

To claim this, I am signing this object:

austinhappel / bootstrap-viewport-size.js
Last active Aug 18, 2017
A simple script to retrieve the viewport size of a bootstrap application. Add the JS and the HTML to your page, and you should be able to retrieve the current breakpoint with `window.VP.getViewportSize()`
View bootstrap-viewport-size.js
(function (global) {
'use strict';
window.VP = window.VP || {};
* Gets the viewport size using pure css to check which div in the test
* is visible. This allows JS to reliably get the viewport width without
* having to measure the DOM width (and calculate scrollbar width, etc.)
* NOTE: This can only be run after the DOM is ready.
austinhappel /
Created May 23, 2014
Quick gist on making webfonts - converting otf to ttf to eot.

Converting Fonts

This is a quick and dirty process for converting otf fonts to TTF fonts, then converting those TTF fonts into M$-compatible eot fonts.

NOTE This process has only been tested to work in osx, using macports.


austinhappel /
Last active Aug 29, 2015
pipe `ping` command into this and get csv-friendly data for graphing. Usage: `ping -D | ./ > file.csv`. Note: the `-D` might not be supported on your implementation of `ping`.
import sys
import datetime
import re
# usage: `ping -D | ./ > file.csv`
buff = ''
while True:
austinhappel /
Created Jan 20, 2014
Bash script for creating iptables directives to block all network connections, except for those through a openvpn tunnel.
# vars
# Get openvpn configuration zip from PIA
echo "piavpn: getting"
mkdir -p /tmp/pia
austinhappel /
Last active Dec 22, 2015
Say you just scanned a multi-page PDF, and it's like 200MB in size, for 10 pages. Obviously, 200MB for 10 pages is ridiculous, and usually you can't email that to your banker or whomever needs it. This scenario happens often when scanning in PDF's in OSX as multi-page PDF's. OSX scans your images as TIFF or some other lossless format, and even a…

How to compress a PDF using automator and preview (no quartz filters)

  1. Download this.
    • It's a zip file containing the automator workflow and automator app for converting a PDF to JPG's.
  2. Open up
  3. Select your PDF
  4. your multi-page pdf will be converted to 50% quality, 300DPI images onto your desktop.
  5. open up the first image in Preview
  6. Export it as a PDF
  7. open up this exported PDF
austinhappel /
Last active Aug 5, 2019
Creating an HTTP(S) proxy for mobile devices using TinyProxy

Creating an HTTP(S) proxy for mobile devices using TinyProxy

TinyProxy isn't as easy to set up as a SOCKS proxy, but HTTP proxies are much easier to set up on mobile devices than SOCKS proxies are. So, after the initial setup on your desktop/server, it should be a piece of cake to set up other mobile devices to use the proxy.

Your computer

  1. Install TinyProxy. If you have macports, you can run:

         sudo port install TinyProxy

Adding geolocation to photos with Python


I like to hike. On these hikes, I take photographs:

Photo Another Photo

austinhappel /
Last active Dec 16, 2019
Converts wav, ogg, mp3 to al html5-friendly formats: wav, ogg, mp3. Requires ffmpeg to be installed globally and available via `ffmpeg`.
printf "This baby converts your folder of .wav, .ogg, and .mp3 files into all the formats needed for HTML5 audio!\n\n"
printf "Usage: cd /folder/to/files && sh path/to/\n\n"
printf "Defaults to 128k bitrate.\n\n"
echo "Choose what format are your files in:"
echo "1) wav"
echo "2) ogg"
echo "3) mp3"
You can’t perform that action at this time.