Skip to content

Instantly share code, notes, and snippets.

@starkers
starkers / bash-prompt
Created February 2, 2015 14:55
bash git prompt
# I wanted a dead simple reminder if I'm in a git managed directory
# This takes the standard ubuntu $PS1 and adds (branch-name) in "default" terminal colour just before your $ / #
#
# the correct way on centos is to add it to something like /etc/sysconfig/bash-prompt-{xterm,default,screen}
# I can't be arsenaled... -david@starkers.org
#
# centos6: add to /etc/bashrc
# ubuntu14/mint: add to /etc/bash.bashrc
# vim:ts=2:sw=2
@starkers
starkers / make-bundle
Last active June 10, 2019 03:01
Generate a new client for OpenVPN, create a .ovpn file and bundle it into a zip
#!/usr/bin/env bash
# NB: I use this on centos 6 but should work on other stuff
#
# Ensure that reverse DNS works so it can lookup its IP/hostname
# Also relies on "zip" and dig
#
# ....I should probably do some more checks on:
# Destination folders existence
# client cert is correctly inserted into the index
# host lookup worked