Skip to content

Instantly share code, notes, and snippets.

Austin austinhappel

Block or report user

Report or block austinhappel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

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 / 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
austinhappel / making-webfonts.md
Created May 23, 2014
Quick gist on making webfonts - converting otf to ttf to eot.
View making-webfonts.md

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 / ping2csv.py
Last active Aug 29, 2015
pipe `ping` command into this and get csv-friendly data for graphing. Usage: `ping -D | ./ping2csv.py > file.csv`. Note: the `-D` might not be supported on your implementation of `ping`.
View ping2csv.py
#!/usr/bin/python
import sys
import datetime
import re
# usage: `ping -D google.com | ./ping2csv.py > file.csv`
try:
buff = ''
while True:
@austinhappel
austinhappel / get-pia-openvpn-iptables.sh
Created Jan 20, 2014
Bash script for creating iptables directives to block all network connections, except for those through a PrivateInternetAccess.com openvpn tunnel.
View get-pia-openvpn-iptables.sh
#!/bin/bash
# vars
IPTABLESFILE="/tmp/iptables.vpn"
# Get openvpn configuration zip from PIA
echo "piavpn: getting openvpn.zip"
mkdir -p /tmp/pia
@austinhappel
austinhappel / compress-pdf.md
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…
View compress-pdf.md

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
@austinhappel
austinhappel / readme.md
Last active Aug 5, 2019
Creating an HTTP(S) proxy for mobile devices using TinyProxy
View readme.md

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
    
View adding_geolocation_to_photos_with_python.md

Adding geolocation to photos with Python

Introduction

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

Photo Another Photo

@austinhappel
austinhappel / convertAudio.sh
Last active Feb 2, 2018
Converts wav, ogg, mp3 to al html5-friendly formats: wav, ogg, mp3. Requires ffmpeg to be installed globally and available via `ffmpeg`.
View convertAudio.sh
#!/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 Jul 18, 2013
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
View throttle.sh
#/bin/bash
THROTTLE=200
PORT="any"
LINE="--------------------------------------------------------------------------------"
start()
{
echo "Throttling data from port $PORT to $THROTTLE KByte/s"
unit="KBytes/s"
You can’t perform that action at this time.