Skip to content

Instantly share code, notes, and snippets.

View moomindani's full-sized avatar

Noritaka Sekiyama moomindani

View GitHub Profile
@moomindani
moomindani / install-jq
Last active March 12, 2021 14:20
install jq (64bit system)
wget http://stedolan.github.io/jq/download/linux64/jq
chmod +x ./jq
sudo cp jq /usr/bin
@moomindani
moomindani / install-pip
Created June 16, 2014 05:13
Installing pip using get-pip.py
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
sudo python get-pip.py
@moomindani
moomindani / dirmon.sh
Created June 15, 2014 13:25
Monitoring directory using inotifywait
#!/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
@moomindani
moomindani / install-aws-sdk-ruby
Created June 9, 2014 06:10
Installing the aws-sdk gem on EC2 using the Amazon Linux AMI (2014.3)
sudo yum install -y rubygems ruby-devel gcc patch
sudo gem install aws-sdk
@moomindani
moomindani / wpa_supplicant.conf
Created April 30, 2014 03:53
Enable wifi on raspberry pi and connect to Apple TimeCapsule
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
}
@moomindani
moomindani / corosync.conf
Created April 29, 2014 08:17
using udpu
# Please read the corosync.conf.5 manual page
compatibility: whitetank
aisexec {
user: root
group: root
}
service {
name: pacemaker
@moomindani
moomindani / ha.cf
Created April 28, 2014 06:27
ha.cf (using ucast)
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