Jul 14 2008

南戴河海澡,熟了

Published by Jone under 生活

      7月11日的那天下午,南戴河的太阳毒的,暴露在阳光下暴晒了几个小时,回酒店冲淋的时候发现除了“泳裤区”维持正常的肤色外,其余的都黑了一大圈。背上开始发烫~~~回到北京的家后,发现全身如酒后般的红,尤其是双肩,仿佛被撕去了一层皮。感觉加点盐,再加点孜然,就可以吃了。唉!一夜无眠。

     那天风不大,所以浪头也不算很大,多数的时候我喜欢躺在水面作诈尸状,因为我知道,其实当人在水里彻底放松不挣扎的时候反而更不容易被海水呛到,浪起起伏伏的,你只管作死尸状也随之起起伏伏,就可以使自己浮在海面上安全到可以听着别人被海浪袭击后美妙的尖叫......!

comments(0)

Jul 2 2008

Go3D Tweening Engine for Papervision3D

Published by Jone under AS3

通过SVN把代码check下来,

地址:http://goplayground.googlecode.com/svn/trunk/JohnGrden/GO3D/

comments(0)

Jun 11 2008

如何安装 FDT?

Published by Jone under AS3

How to install FDT?

1. Install Eclipse (www.eclipse.org)

2. Open Eclipse

3. Select "Help->Software Updates->Find and install..."

4. Select "Search for new features to install" and press next

5. Press "New Remote Site..."

6. Insert FDT into Name and "http://fdt.powerflasher.com/update/" into URL

7. Press finish

 

If you get an ERROR 403 you are perhaps behind a proxy.

 

1. Preferences...

2. Select Install/Update

3. Select "Enable http proxy connection"

4. Insert proxy address and port

5. try again

comments(0)

Jun 9 2008

突破FS2YOU限制

Published by Jone under 工作

最近发现好多好东西都在FS2YOU才有的下,但需要安装它那该死的客户端,并且有一个叫peer.exe的进程偷偷的上传文件
在网上搜了一下几种方法突破它的下载限制,希望能有点用。

方法1:无聊中发现FS2YOU网盘的地址还是能从源文件中找到地址的



以ISO为例,打开源文件后,按CTRL+F,调出搜索窗口,输入ISO[按文件类型而定],找到以“http://cachefile”开头,以.ISO结尾,这个便是文件的地址了



方法2:下载一个的Firefox,用这个软件直接打开下载地址,就可以使用其它下载工具进行下载,而不需要安装插件。



方法3:利用万能的JS    (推荐)

Quote:javascript:window.setTimeout=null;showDirectDownload()

找到下载网页后,在浏览器地址栏复制以上语句,然后enter~就可以华丽的用工具下了

方法4:这是我本人自己发现的哦,就是你安装FS2YOU客户端后,在删除.以后就可以HTTP下载 了!!

方法5:你在点下载的时候,会出现客户端的东西,直接点取消,关闭,回到刚才的下载页面,就多出一个下载地址,用迅雷直接可上1M的速度,当然部分地址出现盗链严重的情况,还是只有用他的软件才可以下下来!

comments(0)

Jun 8 2008

Nginx的日志切割

Published by Jone under

Apache下可以通过cronolog来切割日志,Nginx下怎么实现这个功能呢?

由于nginx的配置文件不支持cronolog的管道,只好通过手动的方式来截取生成每天的各网站日志。

在nginx.conf中定义log:

在http{}内定义log格式:
log_format  combined  '$remote_addr - $remote_user [$time_local] '                     
'"$request" $status $apache_bytes_sent '
'"$http_referer" "$http_user_agent"';
log_format表示log格式,combined表示定义的格式名称,后面表示格式样式。

在server{}内定义日志文件的位置和相应的格式:
access_log  /data/weblogs/www1_access.log  combined;

nginx可接受的信号如下:
Signal    Action
TERM, INT  Terminate the server immediately
QUIT  Stop  the server
HUP  Configuration changes, start new workers, graceful stop of  old workers
USR1  Reopen log files
USR2  Upgrade the server  executable
WINCH  Graceful Stop (parent process advise the children to  exit)

kill -HUP pid 重新应用配置文件
kill -USR1 pid 重新刷新log

通过如下方式达到日志轮询的目的:

# vi logcron.sh
log_dir="/data/weblogs"
date_dir=`date +%Y/%m/%d/%H` 
/bin/mkdir -p  ${log_dir}/${date_dir} > /dev/null 2>&1
/bin/mv  ${log_dir}/access.log ${log_dir}/${date_dir}/access.log
kill -USR1 `cat  /opt/nginx/logs/nginx.pid`

定义一个cron,在每天晚上23:59:50执行这个脚本

comments(0)

Jun 8 2008

Nginx和Apache的rewrite写法对比

Published by Jone under

在apache httpd.conf中的写法:

RewriteEngine On
RewriteRule /index_([^/]*).html /templete1/index\.php\?itemID=$1 [L]
RewriteRule /doc_([^/]*).html /goDoc\.php\?docID=$1 [L]

在nginx.conf中的写法:

rewrite "/index_([^/]*).html" /templete1/index.php?itemID=$1 last;
rewrite "/doc_([^/]*).html" /goDoc.php?docID=$1 last;
rewrite "/aboutMe" /aboutMe.php last;
rewrite "userReg" /userReg.php last;

comments(0)

Jun 8 2008

nginx的下载连接限制

Published by Jone under

限制每个IP一个线程,每个线程30K/s限制;
防治盗链,将盗链的URL显示为指定图片;

在171上测试通过。

一、下载限制。

http {

        limit_zone one $binary_remote_addr 10m;

        server {

                location /upload/ {
                      limit_conn one 1;
                      limit_rate 30k;
                }

       }

}

参考:http://wiki.codemongers.com/NginxHttpLimitZoneModule

comments(0)

Jun 8 2008

nginx防盗链配置

Published by Jone under

方法1:直接配置nginx.conf
location /img/ {
     root /data/;
     valid_referers none blocked server_names *.sohu.com sohu.com ;
     if ($invalid_referer) {
                    rewrite  ^/  http://www.sohu.com/images/error.gif
                    #return   403;
     }
}
方法2:利用 nginx 的第三方模块 ngx_http_accesskey_module 来实现下载文件的防盗链

description:
比如我的 download 目录下有一个 file.zip 的文件。对应的URI 是http://example.com/download/file.zip
使用ngx_http_accesskey_module  模块后http://example.com/download/file.zip?key=09093abeac094. 只有给定的key值正确了,才能够下载 download 目录下的 file.zip
而且 key 值是根据用户的 Ip 有关的,这样就可以避免被盗链了。
安装模块方法
解压,然后在编译nginx的时候加上:
    ./configure --addon-module=path/to/nginx-accesskey
 
 
 
配置方法
 
需要在nginx的配置文件里面添加
    location /download {
        accesskey             on;
        accesskey_hashmethod md5;
        accesskey_arg         "key";
        accesskey_signature   "mypass$remote_addr";
    }
 
 
 
语法:
accesskey [on|off]
默认是off。
用 on 开启这个功能。
 
accesskey_arg "string"
默认是 key,就是用于http://example.com/download/file.zip?key=09093abeac094 里面的 key。
如果使用 accesskey_arg "string"
 
accesskey_hashmethod [md5|sha1]
默认是 md5.
这里是选择哈希的类型。随便用哪个都可以。不过在生成下载 uri 的时候需要使用相应的哈希方法。
 
accesskey_signature "string"
默认是accesskey_signature "$remote_addr"
这里是被签名(哈希)的字符串。
$remote_addr 表示用户的 ip
为了很好的防盗链,这里应该给用户ip加上噪声。让别人无法猜到。
比如accesskey_signature " myPassWord $remote_addr"
 
 
 
 
 
生成下载URI 的方法。
假设    
location /download {
        accesskey             on;
        accesskey_hashmethod md5;
        accesskey_arg         "key";
        accesskey_signature   "mypass$remote_addr";
    }
Php:
http://example.com/download/file.zip?key=<?php echo md5(“mypass “.$_SERVER['REMOTE_ADDR']); ?>
 
 
 
 
参考文献: http://wiki.codemongers.com/NginxHttpAccessKeyModule

comments(9)

Jun 1 2008

国外站长论坛(全英文)

Published by Jone under

我常去的国外站长论坛,呵呵
http://www.dnforum.com/

http://forum.yaxay.com/

http://jimworld.com/apps/webmaster.forums/

http://www.htmlforums.com/

http://www.htmlforums.com/

http://forum.webmasterpro.de/

http://www.siteownersforums.com/

http://www.sitepointforums.com/index.php?

http://forums.prospero.com/n/mb/listsf.asp…g=am-associhelp

http://www.arsresources.com/forum/index.php?referrerid=1878

http://adultwebmasterhangout.com/

http://www.webmaster-talk.com/

http://www.flashdevelop.net

http://www.webmasterpark.net/forum/

http://www.webmaster-forums.net/

http://www.ahfb2000.com/webmaster_help_desk/index.php

http://www.geekvillage.com/forums/

http://www.webmasterforum.com/

http://www.frontpagewebmaster.com/

http://www.geekvalley.com/

http://www.shegame.com

http://www.hosthideout.com/

http://www.affiliate-talk.com/

http://www.wmhf.com/forums/

http://www.search-this.com/forums/

http://www.webdesignforums.net/

http://portal.portland.co.uk/forum/index.php

http://www.aussieforum.com/

http://www.flashgame9.com

http://www.webdevforums.com/

http://forums.thehotweb.net/

http://www.the-forums.nl/

http://www.webhostingtalk.com/

comments(0)

May 26 2008

几种Tween类性能测试

Published by Jone under

我平常用的tween类主要有两个tweenerTweenLite,至于flash自带的tween类,一直觉得不是很好用

 

今天看到国外专门就几个不同的tween类做了test,从中可以看出tweener 更节省资源,但效果没有TweenLite流畅

至于adobe的,测试了一下,居然让我的浏览器死掉。omg!

Speed Test:

http://blog.greensock.com/tweening-speed-test/

comments(0)

1 2 3