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 | |
#expand cmd line variable hadoop and replace it with local var hadoop | |
hadoop=/home/hadoop | |
ls -al ${!1} |
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
# #export PATH=$PATH:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin | |
# export HADOOP_HOME=/Users/Ashrith/HADOOP/hadoop-0.20.203.0/ | |
# export JAVA_HOME=$(/usr/libexec/java_home) | |
# export PATH=$PATH:$HADOOP_HOME/bin | |
# export PATH=$PATH:/Users/Ashrith/HADOOP/elastic-mapreduce-cli/ | |
# export PATH=$PATH:/Users/Ashrith/HADOOP/csshX-0.74/ | |
# | |
# PATH="/Library/Frameworks/Python.framework/Versions/3.2/bin:${PATH}" | |
# PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}" |
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 | |
#################### | |
# | |
# Wrapper script to manage virtual machines in rackspace using nova-client & rackspace api v2 | |
# Author: Ashrith | |
# | |
#################### | |
##NOVA AUTH VARIABLES | |
export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/ |
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
if [[ $- != *i* ]] ; then | |
# Shell is non-interactive. Be done now! | |
return | |
fi | |
#enable bash completion | |
[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion | |
#enable git completion | |
[ -f ~/.git-completion.bash ] && source ~/.git-completion.bash |
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 eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
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
sudo cp /etc/network/interfaces /etc/network/interfaces_backup | |
sudo vi /etc/network/interfaces | |
## leave this alone | |
## auto lo | |
## iface lo inet loopback | |
## edit the eth0 to have static ip address 192.168.1.11 | |
auto eth0 |
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 ruby | |
# --- | |
# => Script to generate random data required for data analytics | |
# Author: Ashrith | |
# --- | |
require 'rubygems' | |
require 'fileutils' | |
require 'benchmark' | |
require 'parallel' #gem install parallel | |
require 'ruby-progressbar' #gem install ruby-progressbar |
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 ruby | |
require 'socket' | |
require 'timeout' | |
unless ARGV.length == 2 | |
abort "Usage: ruby #{__FILE__} HOST PORT" | |
end | |
def port_open?(ip, port, seconds=1) | |
# => checks if a port is open or not on a remote host | |
Timeout::timeout(seconds) do |
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 | |
# === | |
# Script to start hbase also handles starting/stopping osx's ssh as a dependecy | |
# Author: Ashrith | |
# === | |
HBASE_START_SCRIPT="/Users/ashrith/HADOOP/hbase/bin/start-hbase.sh" | |
HBASE_STOP_SCRIPT="/Users/ashrith/HADOOP/hbase/bin/stop-hbase.sh" |
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 | |
#Author: Ashrith | |
#Arrays to store hosts and their regionsOnLine respectively | |
declare -a HOSTS_ARRAY | |
declare -a REGIONS_ARRAY | |
message="" | |
EXIT_STATUS=0 |
OlderNewer