Skip to content

Instantly share code, notes, and snippets.

View jpartain89's full-sized avatar

Justin P jpartain89

  • JPCDI, LLC
  • Dallas, Tx
View GitHub Profile

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2015-09-24-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@jpartain89
jpartain89 / updateaptkeys
Created June 8, 2016 01:05
Update Ubuntu APT Keys
#!/bin/bash
# Retrieves missing keys from keyserver.ubuntu.com from user-input pubkey.
# The "pubkey" is the string of letters and numbers that apt-get will spit out
# when the private key isn't saved. Its the "public key," thus "pubkey."
echo "Paste in the GPG Keys that need to be retrieved: "
read -r gpgkey
@jpartain89
jpartain89 / AutoStartVBoxVMs
Last active June 6, 2016 11:50 — forked from reidransom/gist:6042016
Auto-starting VirtualBox VMs on OS X
# Auto-starting VirtualBox VMs on OS X
After finding a lot of other posts on the topic that didn't work out for me this one did the trick so I'm reposting for my own sense of self preservation.
[Link to original article.](http://rcaguilar.wordpress.com/2013/01/07/auto-starting-virtualbox-vms-on-os-x/)
Copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.
sudo cp \
/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist \
description "Transmission daemon for user"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
# give time to send info to trackers
kill timeout 30
expect fork
respawn
@jpartain89
jpartain89 / path_delete
Last active February 18, 2016 02:18 — forked from firstval/path_delete
Removing PATH on LINUX
Create a script called remove_path_part with the contents
echo ":$PATH:" | sed "s@:$1:@:@g;s@^:\(.*\):\$@\1@"
and a script called prepend_path_part with the contents
if echo ":$PATH:" | grep -q ":$1:"; then echo "$PATH"; else echo "$1:$PATH"; fi
and a script called append_path_part with the contents
#! /bin/bash
# Shell Script to quickly pull my git repos
main ()
{
for f in $git_dir*/;
do
if [[ -d "$f" ]]; then
cd "$f" || exit;
@jpartain89
jpartain89 / tmux.cheat
Created December 20, 2015 10:05 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &