Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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

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 / 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:
@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