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 | |
AMBARI_USER='admin' | |
AMBARI_PASSWORD='PWPWPW' | |
AMBARI_HOST='ambari.local' | |
CLUSTER_NAME='hdp' | |
MOVE_FROM='node1.local' | |
MOVE_TO='node2.local' | |
SSH_USER=john.doe |
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 | |
AMBARI_USER='admin' | |
AMBARI_PASSWORD='PWPWPW' | |
AMBARI_HOST='localhost' | |
CLUSTER_NAME='mitate' | |
MOVE_FROM='old-host.mitate.com' | |
MOVE_TO='new-host.mitate.com' | |
SSH_USER=john.doe |
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/ruby | |
require 'socket' | |
abort('Upgrade ruby or die...') if RUBY_VERSION < "1.9" | |
pidfile = '/var/run/haproxy_gmetric.pid' | |
if File.exist?(pidfile) | |
pid = File.read(pidfile).to_i | |
begin | |
Process.kill(0, pid) |
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
--- httperf/src/httperf.c 2015-03-17 15:34:53.523565000 +0100 | |
+++ httperf/src/httperf.c.patch 2015-03-17 15:38:00.748836588 +0100 | |
@@ -808,7 +808,7 @@ | |
SSLeay_add_ssl_algorithms (); | |
/* for some strange reason, SSLv23_client_method () doesn't work here */ | |
- ssl_ctx = SSL_CTX_new (SSLv3_client_method ()); | |
+ ssl_ctx = SSL_CTX_new (TLSv1_client_method ()); | |
if (!ssl_ctx) | |
{ |
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
import pprint | |
import httplib | |
try: | |
import json | |
except ImportError: | |
json = None | |
import sys | |
descriptors = list() |
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
class DiskTempPlugin(RRDBase): | |
vertical_label = "Celcius" | |
def get_title(self): | |
title = self.identifier.replace("disk-", "") | |
return 'Disk Temperature (%s)' % title | |
def get_identifiers(self): | |
ids = [] |
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 | |
# URL https://gist.github.com/Raboo/eda65914c4bcb2af2b32 | |
# add following to sudo | |
# Cmnd_Alias SMARTCTL = /usr/local/sbin/smartctl | |
# daemon ALL=(ALL) NOPASSWD: SMARTCTL | |
# add following to /usr/local/etc/collectd.conf | |
# LoadPlugin exec |
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 | |
# Write some general information | |
echo System Temperatures - `date` | |
uptime | awk '{ print "\nSystem Load:",$10,$11,$12,"\n" }' | |
# Write CPU temperatures | |
echo "CPU Temperature:" | |
sysctl -a | egrep -E "cpu\.[0-9]+\.temp" |
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 | |
#DEBUG_INFO= &>> debug.log | |
TERM_APP=gnome-terminal | |
DESKTOP=`xdotool get_desktop` | |
echo Desktop: $DESKTOP $DEBUG_INFO | |
SEARCH_CMD="xdotool search --onlyvisible --desktop $DESKTOP --limit 1 --class $TERM_APP" | |
#SEARCH_CMD="xdotool search --onlyvisible --desktop $DESKTOP --limit 0 --class $TERM_APP" | |
echo Search command: $SEARCH_CMD $DEBUG_INFO |
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
$ emerge --oneshot --nodeps sys-devel/binutils | |
--- snip --- | |
>>> Unpacking binutils-2.22-patches-1.2.tar.bz2 to /usr/local/gprefix/var/tmp/portage/sys-devel/binutils-2.22-r1/work | |
* Applying various patches (bugfixes/updates) ... | |
* 03_all_binutils-2.15.92.0.2-ppc64-pie.patch ... [ ok ] | |
* 08_all_binutils-RPATH_ENVVAR-smack.patch ... [ ok ] | |
* 10_all_binutils-2.22-ppc-textrels.patch ... [ ok ] | |
* 12_all_sh-targets.patch ... [ ok ] |