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
Loopia.config.set_domain("example.com") | |
pp Loopia.dns.get_domains | |
pp Loopia.dns.add_subdomain("subdomain") | |
pp Loopia.dns.get_subdomains | |
pp Loopia.dns.get_zonerecords("@") |
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
<IfModule mod_security2.c> | |
# Basic configuration options | |
SecRuleEngine On | |
SecRequestBodyAccess On | |
SecResponseBodyAccess On | |
# Handling of file uploads | |
# TODO Choose a folder private to Apache. | |
# SecUploadDir /opt/apache-frontend/tmp/ | |
SecUploadKeepFiles Off |
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
# Define the Virtual machines | |
def vms | |
vm = Hash.new | |
vm["vm-name"] = { :port => "2030", :natif => "3", :user => "root" } | |
vm["centos-test"] = { :port => "2031", :natif => "1", :user => "root" } | |
vm["gentoo-dev"] = { :port => "2032", :natif => "1", :user => "root" } | |
vm | |
end |
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 | |
# | |
#http://www.pps.jussieu.fr/~jch/software/ipv6-connectivity.html | |
set -e | |
ip4=$1 | |
echo "$ip4" | grep -q '^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*$' || \ | |
{ echo 'Syntax: $0 a.b.c.d'; exit 1; } |
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/ruby | |
# | |
# Tests for rules in mod_security | |
require 'test/unit' | |
require 'net/http' | |
require 'rubygems' | |
require 'uri' | |
class TestRules < Test::Unit::TestCase |
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
root@test:~# time dd if=/dev/zero of=/var/lib/mysql/test1 bs=1M count=10000 | |
10000+0 records in | |
10000+0 records out | |
10485760000 bytes (10 GB) copied, 10.6842 s, 981 MB/s | |
real 0m10.685s | |
user 0m0.008s | |
sys 0m10.677s |
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/bash | |
#$Id: keepalivepin,v 1.2 2006/02/27 07:30:41 hmy Exp hmy $ | |
#use dig check the powerdns's status. | |
#in the dns database,have a IN TXT RR keepalivepin.vmmatrix.net,content is "AaBbCcDdEeFf" | |
# Source: http://puppet-manifest-share.googlecode.com/svn/trunk/vmx-puppet/modules/lvs/files/keepalived.dns-pin | |
# | |
RR=keepalivepin.vmmatrix.net | |
[ $# -le 1 ]&&{ echo "usage: ${0} -h <ip>"; exit 126;} | |
while getopts "h:" OPT;do | |
case $OPT in |
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
set -g default-terminal "screen-256color" | |
set -g history-limit 2000 | |
# Keys | |
bind-key a last-window | |
bind-key @ confirm-before kill-window | |
bind-key r source-file ~/.tmux.conf # reload | |
bind-key v split-window -h | |
bind-key ^V split-window -h |
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
# -*- sh -*- | |
## Bridged | |
(network-script 'network-bridge netdev=dummy0') | |
(vif-script vif-bridge) | |
(dom0-min-mem 196) | |
(dom0-cpus 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 -w | |
# vim:ts=4 | |
# | |
# Check RAID status. Look for any known types | |
# of RAID configurations, and check them all. | |
# Return CRITICAL if in a DEGRADED state, since | |
# if the whole array has failed you'll have already noticed it! | |
# Return UNKNOWN if there are no RAID configs that can be found. | |
# Return WARNING if rebuilding or initialising | |
# |