Skip to content

Instantly share code, notes, and snippets.

#!/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
#!/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
@Raboo
Raboo / haproxy_gmetric.rb
Last active October 27, 2015 10:30 — forked from macros/gist:553c2ef4d4b0594154f5
haproxy multi socket gmetric
#!/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)
@Raboo
Raboo / httperf_tls.patch
Created March 18, 2015 12:01
httperf SSLv3 to TLSv1 patch
--- 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)
{
import pprint
import httplib
try:
import json
except ImportError:
json = None
import sys
descriptors = list()
@Raboo
Raboo / rrd.py
Created October 12, 2014 18:03
What I think(haven't tested) could be a working class for freenas/gui/reporting/rrd.py
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 = []
@Raboo
Raboo / collectd_temp.sh
Last active July 19, 2020 07:34
FreeBSD collectd hdd temperature script
#!/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
@Raboo
Raboo / temperature.sh
Last active August 29, 2015 14:07 — forked from fkleon/temperature.sh
FreeNAS 9 temperature script
#!/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"
@Raboo
Raboo / gttab.sh
Created April 11, 2013 09:19
gttab.sh - a script to run gnome-terminal in new tabs.
#!/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
@Raboo
Raboo / gist:3304520
Created August 9, 2012 14:13
gentoo-prefix bootstraping failed on binutils..
$ 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 ]