进入coolplayer的后台设置页面:http://xxxx/wp-admin/options- general.php?page=coolplayer/options.php,将“RPC 服务器地址”设置为 http://rocky.blog.kingtch.com/wp-content/plugins/coolplayer/rpc.php 即可。
如果你想使用自己的rpc,可以从这里下载coolplayer- youtube-patch.zip,解压后将rpc.php覆盖原来目录/wp-content/plugins /coolplayer/下的rpc.php文件即可。
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.
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.
除了告警敦促人工处理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
定时启动的脚本:
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
#! /bin/bash
for
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
Import the attachment in the language option dialog of Source in sight. Passed for Source in Sight 3.50.
php-script.zip
1、精通MTK、展讯平台应用开发的技术总监,工作地点:深圳
2、具有2年C/C++工作经验的工程师,工作地点:新加坡或北京
一个猎头机会,我觉得还是不错的,有意的朋友可以联系一下。
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.
按照J2ME规范写了J2ME程序,可是部署到真实手机上,稀奇古怪的问题就会出来,别大惊小怪,写JAVA虚拟机的也是普通人,照样会犯错。在此列举一些,以供后来者踩着先驱者死掉的无数脑细胞前仆后继。
1、中文问题:Nokia 6681上在Alert的内容中的中文都显示为“口”,而标题则正常。其余的控件也有类似的问题,即title可中的中文正常,string或者text中的中文显示为“口”。在Nokia 6600上,JAD中不能使用中文,否则直接告诉安装失败。
2、Alert显示问题:Nokia 6600上,Display.setCurrent(Alert alert, Displayable nextDisplayable)工作不正常,可直接使用Display.setCurrent(Alert alert),然后在程序中响应alert的dismiss消息,显示下一个Displayable。6600上还有好多古怪的问题的,可以到nokia网站上去搜一下Known Issues In the Nokia 6600的这篇文档看看。
3、WMA发送短信问题:忘了在哪个手机上用一个正数端口发送不了短信了,什么反应都没有,也没有Exception。而在MOTO E680i上,不能用端口0发送短信,没有任何Exception,把send调用注释掉之后终于看到Exception了:端口只能是1到65535之间。
4、Nokia 8800上打包引起的问题参见:jar打包引起J2ME程序安装失败