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 bash | |
# Adapted from https://github.com/zfsonlinux/zfs/wiki/Ubuntu-18.04-Root-on-ZFS | |
# Should be executed from a live CD environment | |
set -e | |
## CONFIG VARS | |
set -x | |
# Disk drive ids (symlinks in /dev/disk/by-id) | |
bootdisk='usb-SanDisk_Cruzer_AAAAAAAAAAAAAAAAAAAA-0:0' | |
rdisk1='ata-SanDisk_SDSSDHII120G_AAAAAAAAAAAA' |
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
/* | |
* Configure the Jenkins EC2 Plugin via Groovy Script | |
* EC2 Plugin URL: https://wiki.jenkins-ci.org/display/JENKINS/Amazon+EC2+Plugin | |
*/ | |
import hudson.model.* | |
import jenkins.model.* | |
import hudson.plugins.ec2.* | |
import com.amazonaws.services.ec2.model.InstanceType | |
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 | |
# tested with boto 2.38.0 | |
import boto | |
import boto.cloudtrail | |
import json | |
import logging | |
import re | |
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
console.log('Loading function'); | |
var AWS = require('aws-sdk'), | |
s3 = new AWS.S3(), | |
s3Bucket = 'archive-bucket', | |
s3Prefix = 'kinesis-archive-test', | |
s3Partitions = 2; | |
exports.handler = function (event, context) { | |
//console.log(JSON.stringify(event, null, 2)); |
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 | |
trap "echo SIGNAL 1" 1 | |
trap "echo SIGNAL SIGHUP" SIGHUP | |
trap "echo SIGNAL 2" 2 | |
trap "echo SIGNAL SIGINT" SIGINT | |
trap "echo SIGNAL 3" 3 | |
trap "echo SIGNAL SIGQUIT" SIGQUIT | |
trap "echo SIGNAL 4" 4 | |
trap "echo SIGNAL SIGILL" SIGILL |
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
# setup ssh-agent | |
agent_env_file=~/.ssh/agent.env | |
agent_sock=~/.ssh/agent.sock | |
if [ -f $agent_env_file ] ; then | |
. $agent_env_file > /dev/null | |
if ! kill -0 $SSH_AGENT_PID > /dev/null 2>&1; then | |
echo "Stale agent file found. Spawning new agent ..." | |
eval `ssh-agent -t 4h -a $agent_sock | tee $agent_env_file` | |
ssh-add | |
fi |