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
@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 &
#! /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 / 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
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 / 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 \
@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

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 / .bash_profile
Created June 26, 2016 15:42 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management

Building an SSH key management tool with Elixir

Sipping the Elixir

After being inspired by David's talk on Elixir at Hardhat, we decided to try and build our own SSH public key management tool, PubKeys, in Elixir. We're delighted to report back that Elixir is amazing.

Things we love about Elixir:

  • Writing code in a functional style encourages us to break the code into small chunks of functions.
  • Through the use of the function composition operator |>, the code is readable and elegant.
  • Pattern matching is great.
@jpartain89
jpartain89 / pedantically_commented_playbook.yml
Created July 12, 2016 01:40 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.