-
nginx dynamic url rewrite
Aug062010I have such a request, will rewrite url to google’s search site,type http://mysite/search/search.html?t=laday gaga –> http://www.google.com/search?q=lady%20gagaI donn’t want to use other tools(php/java etc.) except nginx.For a long time googleing, finally find how to setting ...
阅读全文1条评论
-
Get memcached all items and deleted them if needed.
Jul142010I see there are so many api to operate memcached,such as get and set,but no list all items,so i write a shell just list all the items in memcached and we can delete the items when we don’t know the exactly items key. #!bin/bash# get_items_from_memcached.sh# Usge: sh get_ ...
阅读全文作者:u2 | 分类:OpenSource | 标签:memcached
-
write nagios nrpe plugin
Jul012010Scripts and executables must do two things (at a minimum) in order to function as Nagios plugins:1.Exit with one of several possible return values2.Return at least one line of text output to STDOUT Plugin Return Code Service State Host State0 OK UP1 WARNING UP or DOWN/UNREACHABLE*2 CRITICAL DOWN ...
阅读全文
-
finding netcard driver type in linux
Jun292010
-
write a own tools of WorldTime with pytz
Jun292010require : python2.6 pytz #!/usr/bin/env python# -*- coding: gbk -*-from datetime import datetime, timedeltafrom time import gmtime, strftimefrom pytz import timezoneimport pytz, time,os #def convert_datetime(unix_timestamp=1143408000, tz=1, long_fmt=1): def convert_datetime(dt=’2007-01-01 ...
阅读全文write a own tools of WorldTime with pytz已关闭评论
-
notice Hostnames should not contain an ‘_’
Jun172010notice Hostnames should not contain an ‘_’: such as vm_test01.2hei.net Please have a look at RFC952 (http://tools.ietf.org/html/rfc952) Hostnames should not contain an ‘_’! ASSUMPTIONS: 1. A “name” (Net, Host, Gateway, or Domain name) is a text ...
阅读全文作者:u2 | 分类:OpenSource | 标签:rfcnotice Hostnames should not contain an ‘_’已关闭评论
-
replacing_hard_disks_in_a_raid1_array
Jun092010cat /proc/mdstat Personalities : [raid1] read_ahead 1024 sectors md1 : active raid1 sda3[0] sdb3[1] 522048 blocks [2/2] [U_] md0 : active raid1 sda2[0] sdb2[1] 4192896 blocks [2/2] [U_] md2 : active raid1 sda1[0] sdb1[1] 128384 blocks [2/2] [U_] unused devices: < ...
阅读全文replacing_hard_disks_in_a_raid1_array已关闭评论
-
linux sz rz tools
May302010
-
python解析xml的字符集问题的处理
May072010
-
SHELL中的2进制、10进制、8进制、16进制之间的转换
May042010一、16进制转换成10进制printf %d 0xF15或者echo $((16#F))15 二、10进制转换成16进制printf %x 15f或者echo “obase=16;15″|bcF 三、10进制转换成8进制printf %o 911 四、8进制转换成10进制echo $((8#11))9 五、同理二进制转换成10进制echo $((2#111))7 六、10进制转换成二进制echo “obase=2;15̸ ...
阅读全文SHELL中的2进制、10进制、8进制、16进制之间的转换已关闭评论