Skip to content

Instantly share code, notes, and snippets.

@defenestratexp
defenestratexp / sample.ovpn
Created April 3, 2019 18:19 — forked from seuros/sample.ovpn
Sample OpenVPN client config
client
dev tun
proto tcp
remote 192.168.1.1 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca [inline]
cert [inline]
@defenestratexp
defenestratexp / boto3-list-instances.py
Created September 7, 2018 17:43 — forked from ableasdale/boto3-list-instances.py
Using Boto 3 to list out AWS EC2 instance information
import boto3
from termcolor import colored
ec2 = boto3.resource('ec2')
for i in ec2.instances.all():
print("Id: {0}\tState: {1}\tLaunched: {2}\tRoot Device Name: {3}".format(
colored(i.id, 'cyan'),
colored(i.state['Name'], 'green'),
#!/usr/bin/env bash
# Generate timestamped filename
TIMESTAMPED_TAG=`date +%Y-%m-%d-%H%M%S`
BACKUP_ARCHIVE="./jenkins-backup-${TIMESTAMPED_TAG}.tar.gz"
# Inconceivable race condition avoidance
if [-f $BACKUP_ARCHIVE ]; then
rm ${BACKUP_ARCHIVE}
fi
@defenestratexp
defenestratexp / bumpversion.sh
Created November 7, 2017 19:02 — forked from pete-otaqui/bumpversion.sh
Bump a software project's VERSION, add the CHANGES, and tag with GIT
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.