Skip to content

Instantly share code, notes, and snippets.

View mshuler's full-sized avatar
💭
ヽ(´ー`)ノ

Michael Shuler mshuler

💭
ヽ(´ー`)ノ
View GitHub Profile
#!/bin/sh
#
# stop manually started cassandra service, remove dtest cruft,
# and wipe data and logs
#
# set user or leave commented out for current user from env
#USER=cassandra
# set REPODIR to the git checkout, so we can clean 2.1+ data/logs
REPODIR=$HOME/git/cassandra
#! /bin/bash
# Kill processes orphaned by Jenkins
# Work around Java's use of SIGTERM rather than SIGKILL and
# Jenkins's lack of any workaroud in the box.
# here is the relevant bug:
# https://issues.jenkins-ci.org/browse/JENKINS-17116
# Suggested usage:

This is a mini-HOWTO for setting up Linux Containers (LXC) on Ubuntu. This guide focuses on the creation of a web server with good process isolation and firewalling.

Dependencies

apt-get install lxc

Create a container

@mshuler
mshuler / star2000_etime_mod.py
Created March 8, 2014 13:58
Star2000 CSV etime Timestamp Modification
#!/usr/bin/env python
# vim: ai ts=4 sw=4 sts=4 et
#
# http://www.star.bnl.gov/
# http://crd-legacy.lbl.gov/~kewu/fastbit/data/samples.html
#
# star2000 etime column date format examples:
# 20000625.0617250018
# 20000625.061728999
# 20000625.062128
@mshuler
mshuler / lxc-ubuntu.sh
Created March 12, 2014 16:35
Script to generate LXC containers for EC2
#!/bin/bash
#
# Template script for generating ubuntu container for LXC with the same
# ubuntu relase as the host
#
# This script is based on lxc-debian for EC2 (Daniil Kulchenko <daniil@kulchenko.com>)
# wich itself is based on lxc-debian (Daniel Lezcano <daniel.lezcano@free.fr>)
#
@mshuler
mshuler / upgrade.sh
Created March 28, 2014 00:01
debian testing daily upgrade
#!/bin/sh
yesno()
{
while true; do
read -p "=====> Would you like to $message [Y/n]? " yn
case $yn in
''|[Yy]* ) answer="yes"; break;;
* ) answer="no"; exit;;
esac
#!/bin/sh
#
# stop manually started cassandra service, remove dtest cruft,
# and wipe data and logs
#
# set user or leave commented out for current user from env
#USER=cassandra
# kill all CassandraDaemons
while pgrep -f CassandraDaemon; do
#!/bin/sh
#
# Update all the git repositories under a directory.
#
################
# ToDo: handle multiple remotes?
################
#
# If script is placed in your $PATH, then hardcode REPODIR,
@mshuler
mshuler / cassandra_build_server_setup-trusty.sh
Last active August 29, 2015 14:07
Configure an Ubuntu Trusty 14.04 server for Cassandra and Driver build/test environment
#!/bin/sh
if [ $(id -ru) -ne 0 ]; then
echo "$0 must be run as root or with sudo"
exit 1
fi
RELEASE=$( lsb_release --short --codename )
CHECK="true"
if [ "$CHECK" = "true" ]; then
@mshuler
mshuler / cassandra_ubuntu_ppa_build.sh
Created October 10, 2014 22:22
Ubuntu PPA deb build hack to include downloaded jars in Apache Cassandra source package
#!/bin/sh
CREPO=~/git/cassandra
BRANCH=$1
if [ "x$BRANCH" = "x" ]; then
echo "Gimme a branch/tag to build.."
exit 1
fi
cd $CREPO