Webbprogrammering http://his.se/DA330G
Anton Lindström [email protected]
# -*- sh -*- | |
## Bridged | |
(network-script 'network-bridge netdev=dummy0') | |
(vif-script vif-bridge) | |
(dom0-min-mem 196) | |
(dom0-cpus 0) |
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 |
#!/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 |
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 |
#!/usr/bin/ruby | |
# | |
# Tests for rules in mod_security | |
require 'test/unit' | |
require 'net/http' | |
require 'rubygems' | |
require 'uri' | |
class TestRules < Test::Unit::TestCase |
#!/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; } |
# 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 |
<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 |
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("@") |
Webbprogrammering http://his.se/DA330G
Anton Lindström [email protected]