Skip to content

老陈是一个普通的文艺二逼青年

For The Dream

Centos安装SVN

2014年2月9日 · Centos安装SVN已关闭评论

1、通过yum安装svn,当然一般centos都会默认安装。 [crayon-628f8a …

Continue reading Centos安装SVN

一些iptables的规则(转载自网络)

2014年2月9日 · 一些iptables的规则(转载自网络)已关闭评论

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
设置缺省配置
 
iptables -P INPUT DROP
 
iptables -P FORWARD DROP
 
iptables -P OUTPUT DROP
 
开启SSH
 
iptables -A OUTPUT -p tcp --dport 22 -j ACCEPT
 
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
 
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
 
iptables -A INPUT -p tcp --sport 22 -j ACCEPT
 
开启named
 
iptables -A INPUT -p udp --dport 53 -j ACCEPT
 
iptables -A INPUT -p udp --sport 53 -j ACCEPT
 
iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
 
iptables -A OUTPUT -p udp --sport 53 -j ACCEPT
 
INPUT
 
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
 
ACCEPT     udp  --  anywhere             anywhere            udp spt:domain
 
OUTPUT
 
ACCEPT     udp  --  anywhere             anywhere            udp spt:domain
 
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
 
允许服务器内部通信
 
iptables -A OUTPUT -p tcp -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
 
开启80
 
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
 
SVN
 
iptables -A INPUT -p tcp --sport 3690 -j ACCEPT
 
iptables -A OUTPUT -p tcp --sport 3690 -j ACCEPT
 
iptables -A OUTPUT -p tcp --dport 3690 -j ACCEPT
 
iptables -A INPUT -p tcp --dport 3690 -j ACCEPT

 

Continue reading 一些iptables的规则(转载自网络)

总结项目,重新封装uploadify插件,省去大量重复代码!

2014年2月5日 · 总结项目,重新封装uploadify插件,省去大量重复代码!已关闭评论

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!doctype html>
<html lang="zh-hans">
<head>
    <meta charset="UTF-8">
    <title>cc-plugin-uploadify</title>
    <link rel="stylesheet" type="text/css" href="js/uploadify/uploadify.css">
</head>
<body>
    <form>
        <div id="queue"></div>
        <input data-toggle="uploadify" data-multi='true' type="file" >
        <input data-toggle="uploadify" data-multi='true' type="file" >
        <input data-toggle="uploadify" data-multi='true' type="file" >
    </form>
    <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
    <script src="js/uploadify/jquery.uploadify.js"></script>
    <script>
        +function ($) {
            'use strict';
            var defaultParam = ['auto','buttonClass','buttonCursor','buttonImage','buttonText','checkExisting','debug','fileObjName','fileSizeLimit','fileTypeDesc','fileTypeExts',
                'height','itemTemplate','method','multi','formData','preventCaching','progressData','queueID','queueSizeLimit','removeCompleted','removeTimeout','requeueErrors',
                'successTimeout','uploadLimit','width'],
                MyUploadify = function( element, options ) {
                this.$element  = $( element );
                if( !this.$element.attr( 'id' ) ) {
                    this.$id = 'MyUploadify_' + new Date().getTime() + '_' + Math.ceil( Math.random() * 100000 );
                    this.$element.attr( 'id', this.$id );
                }
                if( !options ) {
                    for( var i in defaultParam ) {
                        if( typeof this.$element.data( defaultParam[i] ) != 'undefined'  ) {
                            options = options || {};
                            options[defaultParam[i]] = this.$element.data( defaultParam[i] );
                        }
                    }
                    if( !options.formData ) {
                        options.formData = {};
                    }
                    options.formData.id = options.formData.id || this.$id;
                }
                this.options   = $.extend( {}, MyUploadify.DEFAULTS, options );
            };
 
            MyUploadify.DEFAULTS = {
                swf      : 'js/uploadify/uploadify.swf',
                uploader : 'uploadify.php',
                auto: true,
                multi: false,
                fileTypeExts: '*.jpg;*.png;*.gif',
                buttonText: '上传',
                uploadLimit: 999,
                queueSizeLimit: 1,
                onUploadSuccess: function( file, data, response ) {
                    // data = eval( '(' + data + ')' );
                    console.log( data );
                }
            };
 
            MyUploadify.prototype.init = function() {
                $( '#'+this.$id ).uploadify( this.options );
            }
 
            var old = $.fn.myUploadify;
 
            $.fn.myUploadify = function (option) {
                return this.each(function () {
                    var $this   = $(this);
                    var data    = $this.data('cc.myUploadify');
                    var options = typeof option == 'object' && option
 
                    if (!data) $this.data('cc.myUploadify', (data = new MyUploadify(this, options)))
 
                    data.init();
                })
            }
 
            $.fn.myUploadify.Constructor = MyUploadify
 
            $.fn.myUploadify.noConflict = function () {
                $.fn.myUploadify = old;
                return this;
            }
 
            $( function() {
                $( 'input[type=file][data-toggle=uploadify]' ).myUploadify();
            } );
 
        }(jQuery);
 
    </script>
</body>
</html>

  [cray …

Continue reading 总结项目,重新封装uploadify插件,省去大量重复代码!

浅析onethink的钩子与插件

2014年2月5日 · 浅析onethink的钩子与插件已关闭评论

tp3.2源码第一次出想是在 /onethink/ThinkPHP/Library/Thi …

Continue reading 浅析onethink的钩子与插件

模仿bootstrap开发基于jquery的插件

2014年2月4日 · 模仿bootstrap开发基于jquery的插件已关闭评论

春节期间闲来无事,想学习一下如何开发基于jquery的插件。所以网上查了些资料,然后模仿b …

Continue reading 模仿bootstrap开发基于jquery的插件

querySelector、querySelectorAll

2014年2月2日 · querySelector、querySelectorAll已关闭评论

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!doctype html>
<html lang="zh-hans">
<head>
    <meta charset="UTF-8">
    <title>Coldplay</title>
</head>
<body>
    <h1 id="page-title">Coldplay</h1>
    <p>乐队于 1997 年成立于伦敦</p>
    <ul class="artist-list">
        <li>Chris Martin</li>
        <li>Jonny Buckland</li>
        <li>Guy Berryman</li>
        <li>Will Champion</li>
    </ul>
    <script>
        var pageTitle = document.querySelector( '#page-title' );
        console.log( pageTitle.innerHTML );
        var firstLi = document.querySelector( '.artist-list li' );
        console.log( firstLi.innerHTML );
        var TotalLi = document.querySelectorAll( '.artist-list li' );
        console.log( TotalLi );
    </script>
</body>
</html>

注:兼容IE8+(包括I …

Continue reading querySelector、querySelectorAll

HTML5之Web Storage浅析

2014年2月2日 · HTML5之Web Storage浅析已关闭评论

参考自:百度百科 Web Storage实际上由两部分组成:sessionStorage与 …

Continue reading HTML5之Web Storage浅析

jsonp跨域

2014年1月27日 · jsonp跨域已关闭评论

JSONP是一个非官方的协议,它允许在服务器端集成Script tags返回至客户端,通过 …

Continue reading jsonp跨域

【管理心得之八】通过现象看本质,小王和小张谁更胜任?

2014年1月27日 · 【管理心得之八】通过现象看本质,小王和小张谁更胜任?已关闭评论

原文地址:http://www.cnblogs.com/xiaohouchengzhang …

Continue reading 【管理心得之八】通过现象看本质,小王和小张谁更胜任?

mysql主从同步

2013年11月27日 · mysql主从同步已关闭评论

基于lnmp.org 的 lnmp包,mysql版本5.5.28 主数据库服务器:192. …

Continue reading mysql主从同步

← Previous 1 … 26 27 28 Next →

Copyright © 2022 老陈是一个普通的文艺二逼青年. 沪ICP备13044041号-1