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 -w- | |
# --------------------------------------------------------------------- # | |
# ftp-debian-mirror-state Get debian mirror status for CoE ftp # | |
# from DMC -- debian mirror check! # | |
# # | |
# version 0.2 - cj (2007-08-14) fixed up version. # | |
# version 0.3 - cj (2010-01-25) change site name from # | |
# ftp.coe.psu.ac.th to ftp.th.debian.org. # | |
# version 0.4 - cj (2010-01-29) no proxy needed. Transparent proxy is # |
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
#!/bin/sh | |
# --------------------------------------------------------------------- # | |
# mirrorstate - Check debian mirror state, keep in log file, and also # | |
# sending mail to admins. # | |
# # | |
# version 0.1 - cj (2010-05-14) also monitor other up/down stream # | |
# push mirror. # | |
# version 0.1a - cj (2011-05-30) add ftp.jp.debian.org to the list. # | |
# version 0.1b - cj (2013-03-23) add ftp.kr.debian.org to the list. # |
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
#!/bin/bash | |
# --------------------------------------------------------------------- # | |
# dmtc - Debian Mirror Trace Check # | |
# Check projects/trace directory in debian's mirror to # | |
# see which mirror has more up-to-date data. # | |
# # | |
# version 0.1 - cj (2013-05-17) init. # | |
# version 0.2 - cj (2013-05-17) some bug fixed. # | |
# version 0.2a - cj (2013-05-18) archive in progress detection added. # |
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
#!/bin/sh | |
# --------------------------------------------------------------------- # | |
# dmesg-datestamp - Show dmesg in time/date stamp like in system # | |
# log. Since my brain can't interpret uptime # | |
# that well. # | |
# # | |
# version 0.1 - cj (2013-03-25) init. # | |
# --------------------------------------------------------------------- # |
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
#!/bin/bash | |
SITES=" | |
ftp.th.debian.org | |
ftp.kr.debian.org | |
ftp.jp.debian.org | |
ftp.tw.debian.org | |
ftp.nz.debian.org | |
ftp.debianclub.org | |
mirror1.ku.ac.th |
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
#!/bin/bash | |
# --------------------------------------------------------------------- # | |
# buildvdimage - Build raw disk image for VirtualBox and install # | |
# debian system on it. So we can start using the new # | |
# virtual machine immediately without to install and # | |
# configure that system manually. # | |
# # | |
# Part of this script was modified from # | |
# http://blog.quinthar.com/2008/07/ # |
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
#!/bin/sh | |
# --------------------------------------------------------------------- # | |
# psuautosigned Signed-in with PSU Login to access internet. # | |
# # | |
# version 0.1 - cj (2010-06-11) modified from engautosign-3 # | |
# version 0.1a - cj (2010-06-14) read login/password from user # | |
# if any of them doesn't provide from $CONF # | |
# version 0.1b - cj (2010-06-15) uses of function bug fixed. # | |
# thanks to aj. Panyarak for this. # |
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
#!/bin/bash | |
# --------------------------------------------------------------------- # | |
# install-changetrack - Install changetrack on debian/ubuntu host. # | |
# # | |
# version 0.1 - cj (2010-08-24) init. # | |
# --------------------------------------------------------------------- # | |
ADMIN="sysadmin@localhost" | |
CONF="/etc/changetrack.conf" |
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
#!/bin/bash | |
MYSQLDIR="/var/lib/mysql" | |
cd $MYSQLDIR | |
LIST=$( find . -maxdepth 1 -type d -mtime +365 -print |\ | |
sed -e 's/^\.\///' |\ | |
grep ^s4 ) | |
for d in $LIST; do | |
echo "drop database $d;" |
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 -w- | |
# --------------------------------------------------------------------- # | |
# ban-ip-ssh-attack - using iptable to filter ip that try to # | |
# guess root's and other account's password. # | |
# # | |
# version 0.1 - cj (2005-05-05) initial version. # | |
# version 0.2 - cj (2005-05-09) working version. # | |
# version 0.3 - cj (2005-05-31) takasila version. # | |
# --------------------------------------------------------------------- # |