Coolcode is a cool plugin which is made by andot. Now it is not compatible with WP 2.6.5. Ifix it, and you can download new version from here.
2008-11-29
2008-11-28
Fix Nginx “411 Length Required” Problem
When using POST method to request via Nginx 0.6.33 without any post body data, you may get this error: 411 Length Required. Download nginx-0.6.33-length_required patch Save the attachment and run this command in the root path of nginx 0.6.33 source code: patch ./src/http/ngx_http_request.c<nginx-0_6_33-length_required.patch Then "make && make install && sudo /sbin/service nginx restart" and enjoy your AJAX function.
2008-07-23
自动阻止SYN、DoS攻击
除了告警敦促人工处理SYN、DoS攻击,可以将嫌疑犯先抓起来再说:
netstat -na | grep :80 |awk '{print $5}'|awk -F '::ffff:' '{print $2}' | grep ':' | awk -F: '{print $1}' | sort | uniq -c | sort -r | awk -F' ' '{if ($1 > 50) print $2}' | sed 's/^.*$/iptables -I RH-Firewall-1-INPUT 1 -p tcp -m tcp -s & --dport 80 --syn -j REJECT/' | sh
该脚本基于的基础是认为从一个IP过来的连接数过大(超过50个),则该IP可能在进行攻击。实际上可能误杀掉一些只能通过代理服务器访问的大公司用户,或者某些有点贪心的网络爬虫。可以在脚本中加入一些白名单以防止误杀,如:
netstat -na | grep :80 |awk '{print $5}'|awk -F '::ffff:' '{print $2}' | grep ':' | awk -F: '{print $1}' | sort | uniq -c | sort -r | awk -F' ' '{if ($1 > 50) print $2}' | grep -v xxx.xxx.xxx.xxx | sed 's/^.*$/iptables -I RH-Firewall-1-INPUT 1 -p tcp -m tcp -s & --dport 80 --syn -j REJECT/' | sh
2008-05-16
自动短信提醒进行服务器状态告警
定时启动的脚本:
df | grep “/var” | awk ‘{ print $5 }’ | awk -F”%” ‘{print $1}’ | awk ‘{ if ($1 > 90){print “alert.sh \”139xxxxxxxx\” \”insufficient disk space on /var. “,$1,”\”"} }’ | csh
ps -ef | grep httpd | grep -v cronolog | grep -v grep | grep -v root | wc -l | awk ‘{ if ($1 > 3000){print “alert.sh \”139xxxxxxxx\” \”apache process “, $1,”\”"} }’ | csh
echo ‘show processlist’ | mysql | grep -v Id | grep -v processlist | wc -l | awk ‘{ if ($1 > 3000){print “alert.sh \”139xxxxxxxx\” \”mysql process “, $1,”\”"} }’ | csh
alert.sh 脚本:
echo $2
echo -e “From:monitor<>\nReply-to:support <support.labs@etentec.com>\nSubject:$2\n\n$2\n.” | /usr/sbin/sendmail $1@139.com
一个监视服务器状态的shell脚本
#! /bin/bash
for1
do
clear
date
echo -n ‘httpd process: ‘;ps -ef | grep httpd | grep -v cronolog | grep -v grep | grep -v root | wc -l
echo -n ‘http connection: ‘;netstat -an | grep :80 | grep ESTABLISHED | wc -l
echo -n ‘mysql process: ‘;echo ‘show processlist’ | mysql | grep -v Id | grep -v processlist | wc -l
echo -n ‘mysql connection: ‘;netstat -an | grep 3306 | grep ESTABLISHED | wc -l
echo ‘tcp connection stats:’;netstat -n | awk ‘/^tcp/ {++S[$NF]} END {for(a in S) print “ “,a, S[a]}’
echo ‘sorted ESTABLISHED connections: ‘;netstat -na|grep ESTABLISHED|awk ‘{print $5}’|awk -F: ‘{print $1}’|sort|uniq -c|sort -r +0n
echo ‘sorted SYN connections: ‘; netstat -na|grep SYN|awk ‘{print $5}’|awk -F: ‘{print $1}’|sort|uniq -c|sort -r +0n
sleep 5
done
- ; ; [↩]
2007-12-20
Make Source In Sight Supports PHP language
Import the attachment in the language option dialog of Source in sight. Passed for Source in Sight 3.50.
php-script.zip
2007-07-31
2007-07-13
猎头
一个猎头机会,我觉得还是不错的,有意的朋友可以联系一下。
Title: Software Development Engineer Lead
We’re looking for the next generation of leaders to help define and lead the next era of innovation. It’s an exciting time to be at Center – especially if you’re an innovator leading the way. At Center of the company China R&D in Beijing, you get to experience the energy of a start-up company and the resources of the most successful software company in the world. Your potential is limitless. Come to enjoy the thrill of designing a great product and the rush of developing it with people as passionate as you.
Center ICE (Innovation, Consumer, and Emerging) team is working on several projects and products that will define a new category of applications, next generations of services, and innovative solutions in Consumer space (Education, HealthCare and New application and experience). We are looking for talented Development Leads with great leadership skills and a passion for agility, quality, efficiency, and the desire and ability to learn new techniques and drive innovation. We invite you to lead and/or build dedicated team of high-caliber individuals who greatly enjoy working together as we deliver on our technology across both Developed and Emerging markets.
The primary responsibilities include: recruiting, building, mentoring and maintaining a high performance team; working closely with other teams in Program Management and Test as well as with Product Design; driving sound architecture, design, and implementations; ensuring designs and implementations meet quality, performance, scale, and manageability requirements as well as cross team dependencies; initiating, promoting and implementing engineering best practices; project planning and tracking for your team.
As a successful candidate,
- You should demonstrated success in building a strong development team, mentoring, delivering excellence in code quality and engineering process.
- You must be a respected development leader with a proven track record of shipping products through multiple product cycles while dealing with challenges such as cross-team dependencies, rapid shipping schedules, being able to analyze diverse requirements and make recommendations as to implementation strategies and estimate development costs.
- You must have strong communication skills (verbal and written).
- You should also have solid fundamental computer science skills and have a passion for cutting-edge technologies.
- You need to be proficient in at least two of the following: C#, ASP.net, JScript/Javascript, AJAX, Web Service/SOAP, WPF, Server application and Web protocols.
- Experience with C++/Win32, SQL, SharePoint technology, and a solid background in Computer Science are all big pluses.
- BS/MS in Computer Science or Engineering, or equivalent are required. Travel to Redmond may be required.
2007-04-27
你把公司当什么?
联想又要裁员了,上次裁员的时候,有位员工写了篇《联想不是家》打动了很多联想人的心。每位职场中人可能都想过:“我把公司当什么”。
我想,首先公司不是家。对于绝大部分人来说,家是个温馨安全的港湾,你哪都去不了的时候,家总能包容你。而公司的文化再怎么追求人文,一旦经营不善就可能什么都不是。
很多人想创业,要追求自己的事业,为什么在公司就找不到自己的事业呢?作为员工来说,如果公司是你的家,你作为家庭成员应该想方设法把你的家建设好;如果你只是把公司当作赚生活费的地方,得过且过就行了。个人认为在很多公司里采取第二种想法的人应该是占很大一部分的。
其实对于很多公司经营的人来说,不管是不是老板,都有一种认同感,这种认同感并不完全在于薪酬、股权等利益上,而是公司提供了一个供他事业发展的平台。尤其体现在有活力的小公司里,在这样的公司里,每个人都能找到自己的位置,为集体作出最大的贡献。所有的有希望的公司都非常看重有激情的员工,这些员工都是公司的核心价值。所有的有希望的公司都注重给员工个体和集体提供共同发展的平台,这样的平台是公司的支柱。
公司是你个人事业发展的平台,你的成功源于此,你的失败公司帮你顶住。那么,你把公司当作什么?