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
for i in {a..z}; do smartctl -H -x /dev/sd${i}; done |
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
# Hadoop check | |
#!/bin/sh | |
woot() { | |
if [ -n "$( lsmod | grep -i megaraid_sas )" ]; | |
then | |
echo "Hadoop host has LSI MegaRAID" | |
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll | egrep -i 'Raw Size:|count|^Device Id: |firmware state' | grep -v 'Count: 0' | perl -p -e 's/Firmware state: (.*)$/Firmware state: $1\n/' | ruby -ne 'puts " " * 4 + $_' |
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
install_deps () | |
{ | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install git dialog | |
} | |
#---------------------------------------------------------------------------------------------------------------------- | |
RetroPie-git () | |
{ |
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 | |
### create file appconfig.py | |
### requires application & ENV id in this format | |
### copy the text below and adjust in appconfig.py | |
### applications = [('app-name', 'XXXXXX-XXXXX-XXXXX'), | |
#### print(applications, "printing APP and env_id") | |
""" Mulesoft log collection script in json format output | |
""" |
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 | |
# API log call | |
##### SUBJECT TO CHANGE!!!!!!####### | |
# Matthew Morcaldi 2016 | |
show_menu(){ | |
NORMAL=`echo "\033[m"` | |
MENU=`echo "\033[36m"` #Blue | |
NUMBER=`echo "\033[33m"` #yellow | |
FGRED=`echo "\033[41m"` |
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
require 'uri' | |
require 'net/http' | |
require 'colorize' | |
url = URI("") ### add api key URI | |
http = Net::HTTP.new(url.host, url.port) | |
http.use_ssl = true | |
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/sh | |
CPUFILE=/proc/cpuinfo | |
test -f $CPUFILE || exit 1 | |
NUMPHY=`grep "physical id" $CPUFILE | sort -u | wc -l` | |
NUMLOG=`grep "processor" $CPUFILE | wc -l` | |
if [ $NUMPHY -eq 1 ] | |
then | |
echo This system has one physical CPU, | |
else | |
echo This system has $NUMPHY physical CPUs, |
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 | |
setjdk() { | |
if [ $# -ne 0 ]; then | |
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin' | |
if [ -n "${JAVA_HOME+x}" ]; then | |
removeFromPath $JAVA_HOME | |
fi | |
export JAVA_HOME=`/usr/libexec/java_home -v $@` | |
export PATH=$JAVA_HOME/bin:$PATH | |
fi |
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
install_deps () | |
{ | |
apt-get -y install \ | |
subversion | |
} | |
git_tomcat_configs () | |
{ | |
cd / | |
svn export --force svn+ssh://svn.kqed.org/var/svn/repo/config/trunk/tomcat/tomcat_config_java_7/ . | |
ls -ls /vagrant |
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 | |
checkroot() { | |
if [ $UID -ne 0 ] ; then | |
echo "User has insufficient privilege." | |
exit 4 | |
fi | |
} |