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 | |
| # Buchan Milne <[email protected]> 20051213 | |
| # Script to monitor OpenLDAP performance and sync-replication status via | |
| # Hobbit (may also still work with BigBrother). | |
| # | |
| # 1)Install Net::LDAP (perl-ldap) and Date::Manip (perl-DateManip) | |
| # 2)Run as task from hobbitserver.cfg (or BBEXT in bbdef.sh for BigBrother) | |
| # 3)Use ncv in hobbit to collect data: | |
| # -add "ol=ncv" to TEST2RRD, and "ncv" to GRAPHS in hobbitserver.cfg |
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/env python | |
| # coding=utf8 | |
| # author=evi1m0 | |
| # website=linux.im | |
| ''' | |
| 12306 Captcha Picture: | |
| author: Evi1m0@20150316 | |
| 1. Download Captcha | |
| 2. Pic Conver Text |
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 | |
| wget http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest -O apnic-ip | |
| echo "@echo off" >cn_route_via_local.bat | |
| cat apnic-ip |grep "^apnic"|grep ipv4|grep CN|awk -F'|' '{print $4,$5}'|while read ip count | |
| do | |
| echo $ip,$count | |
| count=`expr $count - 1` | |
| count=`echo "obase=2;$count"|bc|awk '{print length($0)}'` | |
| mask_count=`expr 32 - $count` | |
| echo "route add $ip/$mask_count 172.16.70.1" >>cn_route_via_local.bat |
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 | |
| #cd ~ | |
| #mkdir ganglia_packages | |
| #cd ganglia_packages | |
| yum install gcc make glibc-devel rrdtool-devel apr-devel expat-devel pcre-devel -y | |
| #yum install libconfuse -y | |
| #wget http://savannah.nongnu.org/download/confuse/confuse-2.7.tar.gz | |
| tar zxf confuse-2.7.tar.gz | |
| cd confuse-2.7 |
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 | |
| bs="512 4k 8k 16k 32k 64k" | |
| dir=/data/8 | |
| disk=/dev/sdi | |
| for i in $bs | |
| do | |
| echo "bs=$i" | |
| iostat -x $disk 1 >iostat.$i & |
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
| require 'irb/ext/save-history' | |
| IRB.conf[:SAVE_HISTORY] = 100 | |
| IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" | |
| Kernel.at_exit do | |
| IRB.conf[:AT_EXIT].each do |i| | |
| i.call | |
| end | |
| end |
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 | |
| function echo_color(){ | |
| if [[ "x$1" == "x--color" ]]; then | |
| shift | |
| case "$1" in | |
| black) | |
| shift | |
| echo -e "\033[1;30m$@\033[0m" |