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/perl | |
use strict; | |
use warnings; | |
my $debug = 1; | |
my $wmctrl = '/usr/bin/wmctrl'; | |
my $window_name = shift; |
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/perl | |
use strict; | |
use warnings; | |
our $current_desk; | |
our @desks; | |
my $wmctrl = "/usr/bin/wmctrl"; |
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/perl | |
# | |
# This script is managed by puppet. | |
# | |
# This check determines if the Hadoop Namenode fsimage file is older | |
# than the edits file by some threshold. If the fsimage is older than | |
# the edits by some significant value, this is a sign that the secondary | |
# namenode may not be properly working because it's not able to produce | |
# the merged edits+fsimage file that gets sent back to the namenode. | |
# |
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 | |
if [ -x /usr/bin/hadoop ] ; then | |
chk_hdfs=`/usr/bin/hadoop fsck / | grep 'filesystem under path'` | |
case $chk_hdfs in | |
*HEALTHY*) | |
echo "OK - HDFS is healthy" | |
exit 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
#!/usr/bin/perl | |
# | |
# This script is managed by puppet. | |
# | |
use strict; | |
use warnings; | |
use File::stat; | |
use Getopt::Long; |
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/perl | |
# | |
# This script is managed by puppet. | |
# | |
use strict; | |
use warnings; | |
use IO::File; | |
use Getopt::Long; |
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 | |
HOST=$1 | |
PORT=$2 | |
TIMEOUT=5 | |
if [ ! -x /usr/bin/nc ] ; then | |
echo "/usr/bin/nc is missing; required for $0 to run" | |
exit 3 |
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
# this define allows us to inject a file into the catalog so it | |
# transfers over to the client in one big blog, instead of the client having to | |
# hit up the puppet file server for each file (meaning, 1 additional HTTP request | |
# per file) | |
define ops::install_file( | |
$ensure = present, | |
$filetype = "bin", | |
$module = $module_name, | |
$filename = $name, |
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
# this calls ops::install_file to install each file in our directory defined in | |
# ops::install_file ... in our case, /usr/local/ops/bin by default. | |
class ops::mysql_scripts { | |
ops::install_file{[ | |
"mye", | |
"mysql-init", | |
"mysql-vars", | |
]:} |
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
rot13 () | |
{ | |
if [ $# = 0 ]; then | |
tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]"; | |
else | |
tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]" < $1; | |
fi | |
} |
OlderNewer