Skip to content

Instantly share code, notes, and snippets.

View gmcclins's full-sized avatar

Geoffrey McClinsey gmcclins

View GitHub Profile
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@gmcclins
gmcclins / interfaces
Created June 14, 2016 05:54
bridged interface setup [lxd]
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
@gmcclins
gmcclins / plex.service
Last active May 18, 2016 01:03
systemd unit to start plex on boot
# Place the following as plex.service file in ~/.config/systemd/user
# sudo systemctl enable ~/.config/systemd/user/plex.service
# sudo systemctl daemon-reload
# sudo systemctl restart service.service
[Unit]
Description=Plex service
Requires=docker.service
After=docker.service
@gmcclins
gmcclins / vagrant-hostname-down.sh
Created May 26, 2015 15:57
manage a vagrant host with systemd
#!/usr/bin/env bash
#
# script to stop vagrant box for use with systemd
# place scripts into /usr/lib/systemd/scripts/
# be sure to put the .service file in /lib/systemd/system/
#
# -- Geoffrey McClinsey
VAGRANTUSR=vagrant # user you want vagrant box to run as
VAGRANTBOXPATH= # add path to Vagrantfile
@gmcclins
gmcclins / non-ascii-del
Created April 26, 2015 05:51
cleans up text files by removing non-ascii
#!/usr/bin/env bash
# This script cleans up text files by removing non-ascii
# Geoffrey McClinsey
set -e
echo what file has the non-ascii text? #include path to file if not in same location as script
read dirty
echo -e "\v"
@gmcclins
gmcclins / .bash_aliases
Last active August 29, 2015 14:19
alias file
# start a fresh docker container and delete changes on exit
alias docker-fresh='docker run --rm -i -t ubuntu:15.04 /bin/bash'
# Git commit log
alias git-get='git log --oneline --graph'