Skip to content

Instantly share code, notes, and snippets.

@austinhappel
austinhappel / manjaro-encrypted-root-how-to.md
Created February 8, 2020 22:46
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
@austinhappel
austinhappel / how-to-connect-an-iOS-device-to-your-computer-using-SOCKS.md
Last active September 25, 2023 22:56
How to connect an iOS device to your computer via a SOCKS proxy. Say you're running a virtual machine on your work computer. Say this machine, for whatever reason, can only connect to the internet over NAT - as in, it does not get it's own IP address. Say this VM is running a webserver, and you need a device outside of your computer to connect t…

How to connect an iOS device to your computer via a SOCKS proxy

Say you're running a virtual machine on your work computer. Say this machine, for whatever reason, can only connect to the internet over NAT - as in, it does not get it's own IP address. Say this VM is running a webserver, and you need a device outside of your computer to connect to it.

If only there was a way to get your work computer to 'share' it's network, so that you could get at that VM… Here's how you do it!

For all instructions, I assume your work computer is a mac

  1. Get your computer's IP address:

Adding geolocation to photos with Python

Introduction

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

Photo

I am a nerd, and use my iPhone as a GPS while hiking.

@austinhappel
austinhappel / making-webfonts.md
Created May 23, 2014 23:39
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.

Requirements

@austinhappel
austinhappel / throttle.sh
Created July 18, 2013 20:39
This is a very simple bash script to throttle your bandwidth for testing purposes. Right after writing this I discovered that someone else also wrote something similar: https://gist.github.com/j-manu/1409218
#/bin/bash
THROTTLE=200
PORT="any"
LINE="--------------------------------------------------------------------------------"
start()
{
echo "Throttling data from port $PORT to $THROTTLE KByte/s"
unit="KBytes/s"
@austinhappel
austinhappel / convertAudio.sh
Last active May 14, 2021 15:50
Converts wav, ogg, mp3 to al html5-friendly formats: wav, ogg, mp3. Requires ffmpeg to be installed globally and available via `ffmpeg`.
#!/bin/bash
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/convertAudio.sh\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"
@austinhappel
austinhappel / get-pia-openvpn-iptables.sh
Created January 20, 2014 19:54
Bash script for creating iptables directives to block all network connections, except for those through a PrivateInternetAccess.com openvpn tunnel.
#!/bin/bash
# vars
IPTABLESFILE="/tmp/iptables.vpn"
# Get openvpn configuration zip from PIA
echo "piavpn: getting openvpn.zip"
mkdir -p /tmp/pia
@austinhappel
austinhappel / keybase.md
Created August 23, 2016 05:33
keybase proof

Keybase proof

I hereby claim:

  • I am austinhappel on github.
  • I am austinhappel (https://keybase.io/austinhappel) on keybase.
  • I have a public key ASDiMqns1umB2m8AcLmoqgbJx2TH5n6nf2nteE1hGVBM6wo

To claim this, I am signing this object:

@austinhappel
austinhappel / remove_svn.py
Last active July 12, 2016 14:41
A few different ways to delete all .svn files from a git repository's history.
#!/bin/python
# USAGE:
# 1) cd /path/to/git/repository
# 2) execute the script with: `python /path/to/remove_svn.py`
# NOTE: By default this code does a dry-run. To actually delete files from history, remove the
# "n" flag from the 'git rm -rfn' around line 20.
import subprocess
p = subprocess.Popen(['find', '.', '-name', '*.svn'], stdout=subprocess.PIPE)
@austinhappel
austinhappel / compress-pdf.md
Last active December 22, 2015 22:39
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 pdf-to-images.app
  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