Skip to content

Instantly share code, notes, and snippets.

@ibspoof
ibspoof / Gruntfile.js
Created April 27, 2013 23:02
Grunt 0.4 Gruntfile.js Example
/*global $:false */
var path = require('path');
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var folderMount = function folderMount(connect, point)
{
return connect.static(path.resolve(point));
};
[posturl]
enabled=1
# levels can be comma delimited list of any of the following:
# DEBUG,INFO,WARN,ERROR,CRITICAL,ALERT
# If left empty, will listen for all levels
levels=
# clusters is a comma delimited list of cluster names for which
# this alert config will be eligible to run.
package com.github.ibspoof.connection;
import com.datastax.driver.core.*;
import com.datastax.driver.core.policies.*;
import java.util.concurrent.TimeUnit;
public class ConnectionExample {
'F-14D Super Tomcat' Grumman 1987 2.34
'MiG-23 Flogger' Russian-made 1964 2.35
'Su-27 Flanker' U.S.S.R. 1981 2.35
from fabric.api import *
from fabric.api import env
import time
import re
# env.hosts = ['10.200.20.146', '10.200.20.156', '10.200.20.168', '10.200.20.154']
env.hosts = ['10.200.20.158', '10.200.20.146', '10.200.20.156', '10.200.20.168', '10.200.20.154']
env.user = 'datastax'
nmap -p9042 10.200.20.0/24 --open
SNAPS=$(ls -R /app/cassandra/datastax/dse-data* | grep 1469291 | grep app)
while read -r line; do
MOVE_FROM=$(echo $line | awk -F":" '{print $1}')
#echo "MOVE_FROM = $MOVE_FROM"
TABLE_NAME=$(echo $line | awk -F"/" '{print $7}' | awk -F"-" '{print $1}')
#echo "TABLENAME = $TABLE_NAME"
EPOCH_START=1472838
JBOD_DRIVES=/app/cassandra/datastax/dse-data*
SNAPSHOT_DATE="Sep 2"
SNAPSHOT_TIME="10:4"
## don't edit below
declare -A refresh_tables
SNAPS=$(ls -R $JBOD_DRIVES | grep $EPOCH_START | grep "app/")
@ibspoof
ibspoof / dse_5_0_x_installer.sh
Last active May 19, 2017 01:09
Azure/AWS Installer Script for DSE 5.0.x
#!/bin/bash
########################################################################
### ###
### Install Script to install DSE 5.0 on Ubuntu or CentOS ###
### created by Brad Vernon brad.vernon@datastax.com ###
### ###
########################################################################
# AWS Instance gathering, do not delete