This file contains hidden or 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
wget http://labs.consol.de/wp-content/uploads/2011/08/check_mysql_health-2.1.7.tar.gz | |
tar xfz check_mysql_health-2.1.7.tar.gz | |
cd check_mysql_health-2.1.7/ | |
./configure | |
make && make install | |
Depends on Perl MySQL DBI / DBD | |
English docs: http://labs.consol.de/lang/en/nagios/check_mysql_health/ |
This file contains hidden or 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
Control a VIP based on a location constrain but not the actual resource ... | |
node $id="55f27a97-c277-4287-997e-79da9ebfe879" node-1 | |
node $id="bd7d0d7a-4e5a-43f7-9065-24ee3da8617d" node-2 | |
primitive apache lsb:apache2 \ | |
meta is-managed="false" \ | |
op monitor interval="60s" |
This file contains hidden or 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
file "/opt/local-user.txt" do | |
action :create | |
owner "root" | |
group "root" | |
content "jmara" | |
mode 00644 | |
end | |
if File.exist?("/opt/local-user.txt") | |
user = File.read("/opt/local-user.txt") |
This file contains hidden or 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
do shell script "xcode-select --install" | |
do shell script "sleep 1" | |
tell application "System Events" | |
tell process "Install Command Line Developer Tools" | |
keystroke return | |
click button "Agree" of window "License Agreement" | |
end tell | |
end tell |
This file contains hidden or 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
include_recipe "apache" | |
include_recipe "php" | |
# Just to make it clear ;) | |
node.default["myface"]["template"] = "production.conf.erb" | |
if node.recipes.include?("myface::dev") | |
include_recipe "myface::dev" | |
end |
This file contains hidden or 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 | |
name="chefdk-0.3.2-1" | |
dmg="https://opscode-omnibus-packages.s3.amazonaws.com/mac_os_x/10.8/x86_64/${name}.dmg" | |
pkg="${name}.pkg" | |
mnt="/Volumes/Chef Development Kit" | |
test -f ${name}.dmg||curl -O ${dmg} | |
hdiutil attach ${name}.dmg |
This file contains hidden or 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
<?php | |
// Simple socket server | |
// See http://php.net/manual/en/function.stream-socket-server.php | |
$port = $argv[1]; | |
$mysql_port = $argv[2]; | |
$mysql = "/usr/bin/mysql"; | |
$query = "SHOW SLAVE STATUS"; | |
function set_weight($lag){ | |
# Write your own rules here | |
if ($lag == 'NULL'){ |
This file contains hidden or 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 sys | |
from jenkinsapi.jenkins import Jenkins | |
# Requirement: https://github.com/salimfadhley/jenkinsapi | |
# pip install jenkinsapi | |
if len(sys.argv) == 1: | |
print "Usage: %s Jenkins-URL" % sys.argv[0] | |
exit(1) |
This file contains hidden or 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
[2015-02-18T18:17:01+01:00] DEBUG: Plugin Ruby threw #<TypeError: can't convert nil into String> | |
[2015-02-18T18:17:01+01:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.4.1/lib/ohai/plugins/ruby.rb:70:in `join' | |
[2015-02-18T18:17:01+01:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.4.1/lib/ohai/plugins/ruby.rb:70:in `block (3 levels) in <main>' | |
[2015-02-18T18:17:01+01:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.4.1/lib/ohai/plugins/ruby.rb:68:in `map' | |
[2015-02-18T18:17:01+01:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.4.1/lib/ohai/plugins/ruby.rb:68:in `block (2 levels) in <main>' | |
[2015-02-18T18:17:01+01:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.4.1/lib/ohai/dsl/plugin/versionvii.rb:90:in `instance_eval' | |
[2015-02-18T18:17:01+01:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.4.1/lib/ohai/dsl/plugin/versionvii.rb:90:in `run_plugin' | |
[2015-02-18T18:17:01+01:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai |
This file contains hidden or 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 | |
# | |
# Bash script to setup headless Selenium (uses Xvfb and Chrome) | |
# (Tested on Ubuntu 12.04) | |
# Add Google Chrome's repo to sources.list | |
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list | |
# Install Google's public key used for signing packages (e.g. Chrome) | |
# (Source: http://www.google.com/linuxrepositories/) |
OlderNewer