Skip to content

Instantly share code, notes, and snippets.

@defenestratexp
defenestratexp / launch_remote_container.yml
Created May 13, 2020 18:33
Failing ansible playbook
# playbooks/launch_container.yml
---
- hosts: cloud_servers
connection: lxd
tasks:
- name: Launch a container on remote
lxd_container:
trust_password: myhellasecurepasskey
url: https://lxdremote.example.com:8443
name: sandbox1
@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'),
execute 'install_vim_plugins' do
command 'cd /home/myuser;vim +PluginInstall +qall'
user 'myser'
end
#!/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.
@defenestratexp
defenestratexp / vizioparallel error output
Last active August 29, 2015 14:15
Updated script dies with 400 error when trying to create new container
(production)ubuntu@ip-10-33-182-80:~/production/bin$ python -m zoo.admin --env PROD2 --zoo vizioparallel
2015-02-10T23:11:45.051 [INFO] (8933:139898555668288:ipdb.py:23) Creating new tvis and events DBs
2015-02-10T23:11:45.051 [INFO] (8933:139898555668288:ipdb.py:43) Writing mysql script
2015-02-10T23:11:45.052 [INFO] (8933:139898555668288:ipdb.py:48) Running /home/ubuntu/PROD2_vizioparallel.zoo/mysql_create.sh
Creating an empty databases for new zoo tvis and events
Dumping data from tables that we need to carry over
Dumping events
Copying schema over
Copying needed data over
Copying events over
Thu Dec 11 23:29:16 2014 packets received 0
proc stats on 7 proc(s) -- 0 SCR's -- 0 List -- 0 Del
(-- 0 Dets -- 0 Reuse -- 0 Released -- 0 Free) (0 PointReceiverSize)
(dropped packets 0) (out of order packets 0) (deleted users 0) (num users 0) (UDP tx 0) (UDP tx fail 0)
- rcv rslt xPMs PMs Sec TVs Det/s %Det Out Drops Late TCPin TCPpop TCPWait Largest
- 0 0 0 3 128 0 0 0.0 0 0 0 0 0 0 :0
- 0 0 0 3 128 0 0 0.0 0 0 0 0 0 0 :0
- 0 0 0 3 128 0 0 0.0 0 0 0 0 0 0 :0
- 0 0 0 3 128 0 0 0.0 0 0 0 0 0 0 :0
- 0 0 0 3 128 0 0 0.0 0 0 0 0 0 0 :0