推荐一个调试正则表达式的网站
Posted on 2014-02-26

 

每次要调试复杂的正则表达式就是一件痛苦的事情。

推荐一个一站式的网页式的调试好去处: http://regex101.com/


Static and Instance Methods in JavaScript
Posted on 2014-01-08 作者: abdulapopoola.com      →阅读全文

原文:http://abdulapopoola.com/2013/03/30/static-and-instance-methods-in-javascript/

 

 I thought I quite ‘understood’ inheritance in JavaScript until I got flummoxed while trying to test my understanding. The JS prototypical inheritance model is hugely different from the classical approaches of the languages I started out with; the only way to fix this that I know of is by writing code and after spending hours screaming at my console I finally saw the light Alhamdulilah.

JS is a weakly-typed prototypical language and thus classes aren’t really ‘classes’; instead they are functions which are in turn objects. New objects are created from constructor functions by using the new keyword and this allows you to kind of ‘simulate’ OOP. But mind you; its inheritance model is still different.


sqlite database browser 不错。
Posted on 2013-11-25      →阅读全文

 winform 程序配合 sqlite 来存储数据,推荐sourceforge.net/projects/sqlitebrowser/‎ 来配合开发过程。


对 Nginx SSL 的性能进行调整
Posted on 2013-10-26      →阅读全文

关键点:

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;

红米手机 xamarin.android mac 开发。
Posted on 2013-10-13      →阅读全文

  在调试的时候adb找不到设备

 

第一步:添加adb path
首先保证你的adb的路径已经存在PATH里了,如果没有可以ice@mac:~ > vim .bash_profile讲你的adb的加到PATH里去,注意我这里的/Developer/android-sdk-macosx/platform-tools/是我的,你需要换成自己的。

1
export PATH=${PATH}:/Developer/android-sdk-macosx/platform-tools/

第二步:写Vendor ID
接下来将Vendor ID写到~/.android/adb_usb.ini中就可以了(如果这个文件不存在可以自己创建一个)

1
2
3
4
5
6
7
8
ice@mac:~/.android > ll
total 96
-rw-r--r--   1 ice  staff     7 Jun  1 10:47 adb_usb.ini

ice@mac:~/.android >echo "0x2717" > ~/.android/adb_usb.ini

ice@mac:~/.android > cat adb_usb.ini
0x2717

第三步:重启adb sever
新打开一个终端窗口,输入adb kill-server重启adb sever就可以了

 


freebsd ports安装php 如何指定安装位置
Posted on 2013-08-14      →阅读全文

 freebsd安装nginx php mysql 用ports安装 如何指定安装位置 例如安装nginx 位置 /usr/local/servers/nginx


Mac OS X下自带的字典,扩充英汉、汉英字典包
Posted on 2013-08-01      →阅读全文

 google到的帖子,大多都是要用DictUnifier自行转换后,将转换后的dictionary文件拖入~/Library/Dictionaries目录,启动自带的字典程序,在偏好设置中启用新字典;


在此,给大家省一步转换的过程,找到转换好的朗道的英汉、汉英字典,分享链接如下:


(转)DDoS deflate - Linux下防御/减轻DDOS攻击
Posted on 2013-07-03 作者: vpser.net      →阅读全文

 原文:http://www.vpser.net/security/ddos-deflate.html

DDoS deflate介绍

DDoS deflate是一款免费的用来防御和减轻DDoS攻击的脚本。它通过netstat监测跟踪创建大量网络连接的IP地址,在检测到某个结点超过预设的限 制时,该程序会通过APF或IPTABLES禁止或阻挡这些IP.

DDoS deflate官方网站:http://deflate.medialayer.com/


推荐两个hash程序,主要用来鉴别文件是否被修改。
Posted on 2013-07-02 作者: amao      →阅读全文

基本知识

Hash,一般翻译做“散列”,也有直接音译为“哈希”的,就是把任意长度的输入(又叫做预映射, pre-image),通过散列算法,变换成固定长度的输出,该输出就是散列值。这种转换是一种压缩映射,也就是,散列值的空间通常远小于输入的空间,不同的输入可能会散列成相同的输出,而不可能从散列值来唯一的确定输入值。简单的说就是一种将任意长度的消息压缩到某一固定长度的消息摘要的函数。

tc 基于 port 的控制
Posted on 2013-06-09      →阅读全文

 

9.6. Classifying packets with filters

To determine which class shall process a packet, the so-called 'classifier chain' is called each time a choice needs to be made. This chain consists of all filters attached to the classful qdisc that needs to decide.

To reiterate the tree, which is not a tree:

                    root 1:
                      |
                    _1:1_
                   /  |  \
                  /   |   \
                 /    |    \
               10:   11:   12:
              /   \       /   \
           10:1  10:2   12:1  12:2

When enqueueing a packet, at each branch the filter chain is consulted for a relevant instruction. A typical setup might be to have a filter in 1:1 that directs a packet to 12: and a filter on 12: that sends the packet to 12:2.

You might also attach this latter rule to 1:1, but you can make efficiency gains by having more specific tests lower in the chain.

You can't filter a packet 'upwards', by the way. Also, with HTB, you should attach all filters to the root!

And again - packets are only enqueued downwards! When they are dequeued, they go up again, where the interface lives. They do NOT fall off the end of the tree to the network adaptor!

9.6.1. Some simple filtering examples

As explained in the Classifier chapter, you can match on literally anything, using a very complicated syntax. To start, we will show how to do the obvious things, which luckily are quite easy.

Let's say we have a PRIO qdisc called '10:' which contains three classes, and we want to assign all traffic from and to port 22 to the highest priority band, the filters would be:

 

# tc filter add dev eth0 protocol ip parent 10: prio 1 u32 match \ 
  ip dport 22 0xffff flowid 10:1
# tc filter add dev eth0 protocol ip parent 10: prio 1 u32 match \
  ip sport 80 0xffff flowid 10:1
# tc filter add dev eth0 protocol ip parent 10: prio 2 flowid 10:2

 

What does this say? It says: attach to eth0, node 10: a priority 1 u32 filter that matches on IP destination port 22 *exactly* and send it to band 10:1. And it then repeats the same for source port 80. The last command says that anything unmatched so far should go to band 10:2, the next-highest priority.

You need to add 'eth0', or whatever your interface is called, because each interface has a unique namespace of handles.

To select on an IP address, use this:

 

OpenSSL v1.0.1x on CentOS v6.x (for Nginx 1.4 spdy )
Posted on 2013-05-29 作者: amao      →阅读全文

 

OpenSSL v1.0.1x on CentOS v6.x (for Nginx 1.4)

 # rpm -i http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm

 # rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-11.ius.el6.noarch.rpm 

 # yum install yum-plugin-replace 

 # yum replace openssl --replace-with=openssl10

 


共47页:  [1]  2  3  4  5  6 » ... 最后页