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
pacemaker on | |
# | |
# There are lots of options in this file. All you have to have is a set | |
# of nodes listed {"node ...} one of {serial, bcast, mcast, or ucast}, | |
# and a value for "auto_failback". | |
# | |
# ATTENTION: As the configuration file is read line by line, | |
# THE ORDER OF DIRECTIVE MATTERS! | |
# | |
# In particular, make sure that the udpport, serial baud rate |
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
# Please read the corosync.conf.5 manual page | |
compatibility: whitetank | |
aisexec { | |
user: root | |
group: root | |
} | |
service { | |
name: pacemaker |
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
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="moomin_wireless_network" | |
proto=WPA2 | |
key_mgmt=WPA-PSK | |
pairwise=TKIP CCMP | |
group=TKIP CCMP | |
psk=xxx | |
} |
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
sudo yum install -y rubygems ruby-devel gcc patch | |
sudo gem install aws-sdk |
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 | |
/usr/bin/inotifywait -e create,delete,modify,move,attrib \ | |
-mrq /etc | while read line; do | |
echo $line | tee -a /var/log/dirmon.log | |
dirmon_count=`cat /tmp/dirmon_count` | |
echo `expr $dirmon_count + 1` > /tmp/dirmon_count | |
done |
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
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py | |
sudo python get-pip.py |
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
wget http://stedolan.github.io/jq/download/linux64/jq | |
chmod +x ./jq | |
sudo cp jq /usr/bin |
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 | |
require "socket" | |
require "ipaddr" | |
udps = UDPSocket.open() | |
saddr = Socket.pack_sockaddr_in(10000, "239.192.1.2") | |
mif = IPAddr.new("172.31.4.93").hton | |
udps.setsockopt(Socket::IPPROTO_IP, Socket::IP_MULTICAST_IF, mif) | |
udps.send("HELLO", 0, saddr) |
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 | |
require "socket" | |
require "ipaddr" | |
udps = UDPSocket.open() | |
udps.bind("0.0.0.0", 10000) | |
mreq = IPAddr.new("239.192.1.2").hton + IPAddr.new("0.0.0.0").hton | |
udps.setsockopt(Socket::IPPROTO_IP, Socket::IP_ADD_MEMBERSHIP, mreq) | |
p udps.recv(65535) |
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 | |
str = "a"*100 | |
open("hoge.txt", "a") {|f| f.write str} |
OlderNewer