This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Play with AWS EC2 describe_instance_types | |
""" | |
from boto3.session import Session | |
sess = Session() | |
ec2c = sess.client('ec2') | |
resp = ec2c.describe_instance_types() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################## | |
# ossa.sh - Open Source Security Assessment | |
# | |
# | |
# Author(s): Craig Bender <craig.bender@canonical.com> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, version 3 of the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
set -o pipefail | |
# Run a command and report status to https://healthchecks.io | |
usage() { | |
echo "Usage: $0 <healthchecks.io UUID> <command>" | |
exit 1 | |
} | |
trap usage EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get SSH-config for nodes | |
vagrant ssh-config node0 > node0.ssh-config | |
vagrant ssh-config node1 > node1.ssh-config | |
# get teh SSH key path from the ssh-config | |
node0_ssh_key=$(ssh -F ./node0.ssh-config -G node0 | grep -m1 -oP "(?<=identityfile ).*") | |
echo ${node0_ssh_key} | |
node1_ssh_key=$(ssh -F ./node1.ssh-config -G node1 | grep -m1 -oP "(?<=identityfile ).*") | |
echo ${node1_ssh_key} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# This is how I used it: | |
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history | |
import sys | |
import time | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
LAUNCHPAD_USER="" | |
LAUNCHPAD_USER_STRING="" | |
GIT_HUB_USER="" | |
GIT_HUB_USER_STRING="" | |
SSH_KEY="" | |
SSH_KEY_STRING="" | |
CREATE_BACKDOOR_USER="false" | |
PLAIN_TEXT_PASSWORD="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import faulthandler | |
import functools | |
import logging | |
import sys | |
import click | |
from debian import debian_support |
OlderNewer