Skip to content

Instantly share code, notes, and snippets.

Avatar

Justin P jpartain89

  • JPCDI, LLC
  • Dallas, Tx
View GitHub Profile
@jpartain89
jpartain89 / nginx-gitweb.md
Created Mar 6, 2017 — forked from mcxiaoke/nginx-gitweb.md
Set up Gitweb + Nginx from scratch on Debian Wheezy
View nginx-gitweb.md

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 Dec 26, 2016 — forked from viktorbenei/vb.monit.plist
Monit OS X Launch Agent Plist file
View vb.monit.plist
<!--
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 Sep 26, 2016
Builds Monit from their BitBucket repo
View build_monit.sh
#!/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"
View dnsmasq.conf
# 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
View 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 Jul 12, 2016 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
View pedantically_commented_playbook.yml
---
# ^^^ 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.
View Building SSH Key management tool with Elixir.md

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 Jun 26, 2016 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
View .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 Jun 14, 2016
pia Port Forwarding with openvpn
View pia_port_forward
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.