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
[maxscale] | |
threads=4 | |
[PXC Monitor] | |
type=monitor | |
module=galeramon | |
servers=node1,node2,node3 | |
user=maxscale | |
passwd=maxscale | |
monitor_interval=1000 |
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
select engine, table_schema, table_name from information_schema.TABLES | |
WHERE table_schema NOT IN ('performance_schema','information_schema','mysql') | |
and engine != 'Innodb'; | |
select table_schema, engine, count(*) as non_innodb_tables from information_schema.TABLES where table_schema NOT IN ('performance_schema','information_schema','mysql') | |
and engine != 'Innodb' group by table_schema, engine with rollup; | |
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
global | |
log 127.0.0.1 local2 | |
chroot /var/lib/haproxy | |
pidfile /var/run/haproxy.pid | |
maxconn 4000 | |
user haproxy | |
group haproxy | |
daemon |
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
Vagrant.configure("2") do |config| | |
config.vm.box = "perconajayj/centos-x86_64" | |
config.vm.provider :aws do |aws, override| | |
aws.instance_type = 'm1.small' | |
aws.region = 'us-east-1' | |
aws.access_key_id = "YOUR KEY" | |
aws.secret_access_key = "YOUR SECRET KEY" | |
aws.keypair_name = "KEYPAIR NAME" | |
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
// To Install: (requires EPEL) | |
// yum install nodejs nodejs-async -y | |
// To start: | |
// export NODE_PATH=/usr/lib/node_modules/ | |
// screen node scoreboard.js | |
var http = require('http'); | |
var async = require('async'); |
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
vrrp_script chk_pxc { | |
script "/usr/bin/clustercheck" | |
interval 1 | |
} | |
vrrp_instance PXC { | |
state MASTER | |
interface eth1 | |
virtual_router_id 51 | |
priority 100 | |
nopreempt |
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
[mysqld] | |
datadir = /var/lib/mysql | |
query_cache_size=0 | |
query_cache_type=0 | |
binlog_format = ROW | |
innodb_buffer_pool_size = 128M | |
#^^ or however much you can allocate to MySQL on this machien |
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
tell application "System Events" | |
tell current location of network preferences | |
set VPNservice to service "My VPN" -- name of the VPN service | |
if exists VPNservice then connect VPNservice | |
repeat until (connected of current configuration of VPNservice) | |
delay 1 | |
end repeat | |
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
#!/usr/bin/perl | |
my $stats = "/var/lib/bitcasa/stats"; | |
my %patterns = ( | |
'max_cache' => qr/Maximum Cache Size Setting: (.*)$/, | |
'current_cache' => qr/Current Cache Size: (.*)$/, | |
'available_cache' => qr/Available Cache Space: (.*)$/, | |
'used_cache' => qr/Used Cache Space: (.*)$/, |
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
#!/usr/bin/perl | |
use Text::CSV; | |
use Data::Dumper; | |
my $headers = <STDIN>; | |
my $csv = new Text::CSV; | |
print "Last, First, Mobile, \"Phone (work)\", \"Email (work)\", \"Skype (work)\"\n"; |