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- | |
use strict; | |
use warnings; | |
use DateTime; | |
use Data::Dumper; | |
my $locale = DateTime->DefaultLocale; | |
print Dumper($locale); |
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 | |
MSG="$1" | |
[ -z "$MSG" ] && exit | |
RES="/tmp/sendMessage.$$" | |
LOG="/tmp/bot_sendmessage.log" | |
BOTTOKEN="${HOME}/.tgbot-token" |
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 | |
MAILSVR="mailscan.in.psu.ac.th" | |
R4=`echo "quit" | nc -w 3 -4 $MAILSVR 25` | |
R6=`echo "quit" | nc -w 3 -6 $MAILSVR 25` | |
D=`date '+%Y%m%d %H:%M'` | |
echo -n "$D " |
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 | |
# --------------------------------------------------------------------- # | |
# setnextfreeunixid : Set nextfreeunixid in ldap server allow # | |
# smbldap-tools to start adding account at the # | |
# appropriate place. # | |
# # | |
# version 0.1 : cj (2004-12-20) initial. # | |
# --------------------------------------------------------------------- # |
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- | |
# --------------------------------------------------------------------- # | |
# 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. # | |
# --------------------------------------------------------------------- # |
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 | |
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 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 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 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 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. # |
OlderNewer