Skip to content

Instantly share code, notes, and snippets.

[client]
port = 3306
socket = /var/lib/mysql/m0/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/lib/mysql/m0/mysqld.sock
# cat create_mysql_symlinks.sh
PORT=$1
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_bin_relay_log
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_commands
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_connections
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_files_tables
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_innodb_bpool
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_innodb_bpool_act
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_innodb_checkpoint_age
%w{libmysqlclient16 mysql-common}.each do |pkg|
script "uninstall_default_mysql" do
only_if "dpkg -s #{pkg}"
interpreter "bash"
user "root"
cwd "/tmp"
code <<-EOH
apt-get remove -y pkg
apt-get -y autoremove
EOH
#!/bin/bash -ex
# Add chef master hostname
cat <<EOL > /etc/hosts
127.0.0.1 localhost.localdomain localhost
10.2.170.5 chef.mycloud.com
10.22.162.3 mysite.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
#! /bin/sh
### BEGIN INIT INFO
# Provides: chef-client
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start a chef-client.
### END INIT INFO
#
#!/bin/bash -ex
# Add chef master hostname
cat <<EOL > /etc/hosts
127.0.0.1 localhost.localdomain localhost
10.2.170.5 chefmaster
10.22.162.3 mysite.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
TEMPL = """
<html>
<head>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable(%(json)s,0.6);
var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
[xcache-common]
extension = xcache.so
[xcache.admin]
xcache.admin.user = "xc"
; xcache.admin.pass = md5($your_password)
xcache.admin.pass = ""
[xcache]
; ini only settings, all the values here is default unless explained
; select low level shm/allocator scheme implemenation
xcache.shm_scheme = "mmap"
#!/bin/sh
#
# init.d script with LSB support.
#
# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org>
#
# This is free software; you may redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2,
# or (at your option) any later version.
#!/bin/sh
#
# init.d script with LSB support.
#
# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org>
#
# This is free software; you may redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2,
# or (at your option) any later version.