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 / build_monit.sh
Created September 26, 2016 10:54
Builds Monit from their BitBucket repo
#!/bin/bash
# This builds monit with the --enable-optimized flag set.
monit_dir=/home/$USER/git/monit
if [[ ! -e "$monit_dir" ]]; then
echo ""
echo "Monit's git directory missing."
echo "Cloning"
# Configuration file for dnsmasq.
#
# Format is one option per line, legal options are the same
# as the long options legal on the command line. See
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
# Listen on this specific port instead of the standard DNS port
# (53). Setting this to zero completely disables DNS function,
# leaving only DHCP and/or TFTP.
#port=5353
@jpartain89
jpartain89 / keybase.md
Created July 19, 2016 06:06
keybase.md

Keybase proof

I hereby claim:

  • I am jpartain89 on github.
  • I am jpartain89 (https://keybase.io/jpartain89) on keybase.
  • I have a public key whose fingerprint is D182 E203 7AA3 39AD 5873 2D81 AF51 1EBA 2248 1781

To claim this, I am signing this object:

@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
@jpartain89
jpartain89 / pia_port_forward
Created June 14, 2016 11:01
pia Port Forwarding with openvpn
1. wget https://www.privateinternetaccess.com/installer/port_forward.sh
2. chmod +x port_forward.sh
3. Make sure you are connected in one of the gateways that supports port forwarding
3. ./port_forward.sh <user> <password>
It should return something like: { "port": 23423 }
You can then enter this port into your software.