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 / nginx-gitweb.md
Created March 6, 2017 03:33 — forked from mcxiaoke/nginx-gitweb.md
Set up Gitweb + Nginx from scratch on Debian Wheezy

This guide offers the least time-consuming way of setting up Nginx for serving Git repositories over HTTP using Gitweb. The stuff here has been tested with Git 1.9.1 and Nginx 1.6.0 on Debian Wheezy. Probably also works for Ubuntu, etc.

Total time ~ 10 minutes.

Install

Enable wheezy-backports by adding this line to /etc/apt/sources.list:

deb http://http.debian.net/debian wheezy-backports main
@jpartain89
jpartain89 / vb.monit.plist
Created December 26, 2016 05:15 — forked from viktorbenei/vb.monit.plist
Monit OS X Launch Agent Plist file
<!--
Don't forget to set the /path/to/.monitrc path!
* Save this into: ~/Library/LaunchAgents/vb.monit.plist
* Load with (auto loaded at user login): launchctl load ~/Library/LaunchAgents/vb.monit.plist
* Unload with: launchctl unload ~/Library/LaunchAgents/vb.monit.plist
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
@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.

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

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