`
zhou.xingbo
  • 浏览: 52259 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
Why RSpec? Clear, concise and readable   Gems .rspec .rspec-core .rspec-expectations .rspec-mocks .rspec-rails   Basics Contexts Describing methods   Running rspec spec/   Formatters echo --colort  > .rspec   测试运行时附加参数 --colour 为测试输出加颜色 ...
bin "Essential binaries" cat chgrp chmod chown cp  data  dd df dmesg(查看内核开机启动项) echo false hostname kill ln login ls mkdir mknod more mount mv ps pwd rm rmdif sed sh stty su synch true umount uname boot "Static files of boot  loader"  kernel system.map vmlinuz ...
Ruby编程基础知识概括: 1. ruby is an object-oriented language 在ruby语言中,你操作的所有东西都是对象,操作的结果同样是对象。   2. ruby names 局部变量、方法参数和方法名都应该以小写字母或者下画线开头 。 实例变量必须以“@”符号开头。 如果方法名或者变量名包含多个单词,应该用下划线来隔开各个单词。 类名、模块名和常量名必须以大写字母开头。 :id 可以把符号看作字符串文本,被变成了常量,意思是“名字叫做id的东西”。   3. methods 如:   def say_goodnight(name) ...
1. CSS是一种为结构化文档添加样式的计算机语言   使用场景1:一种样式重复使用。Do not Repeat Yourself. 使用场景2:简化网页设计 如:   <style type="text/css"> p { text-align:center; } p.red { color:red; font-size:24px } p.purple { color:purple; font-size:18px } p.blue { color:blue; font-size:12px } p.left { tex ...
1. Mysql常规使用 安装 server: sudo apt-get install mysql-server 配置 default是只允许本地访问的,如果要其它机器访问,需要修改/etc/mysql/my.cnf配置文件。 default根用户是没有密码的,所以用根用户进入,$mysql -u root,一般只有在设置时才要进入根用户模式。   基本操作 为root设置密码->为root建立所需要的数据库db->并为该db创建用户->设置远程访问或控制该db&&/etc/mysql/my.cnf(bind-address=127.0.0.1 ...
1. PF_RING 安装   A clean install, no other packages were installed other than mentioned(提到).   1. Uninstall libpcap and other dependent applications/library using apt-get 原因?   2. Install subversion(Get latest source codes) flex and bison(Required to recompile pf_ring aware pcap) ethtool(if n ...
1 安装thrift 通过svn获得源码 svn co http://svn.apache.org/repos/asf/thrift/trunk thrift http://incubator.apache.org/thrift/download/ download tar.gz文件(推荐)     安装thrift的依赖 参考:http://wiki.apache.org/thrift/GettingUbuntuPackages sudo apt-get install libboost-dev libboost-test1.40-dev libevent-dev autom ...
Cmake是一套跨平台的工程构建工具   sudo apt-get install cmake   一个Cmake的例子 生成一个demo工程,包括一个hello.cpp文件(在demo工程下)   #include <stdio.h> int main(int argc, char **argv) { printf("Hello world!\n"); return 0; }   Cmake构建该工程 Cmake需要CMakeLists.txt文件来配置,在demo目录下创建CMakeLists.txt文件 ...
1. The Socket API Creating and destroying sockets, which go together to form a karmic circle of socket life (see zmq_socket, zmq_close). Configuring sockets by setting options on them and checking them if necessary (see zmq_setsockopt, zmq_getsockopt). Plugging sockets onto the network topolo ...
问题1:Nginx的X-Accel-Redirect? 答: 对文件下载的权限进行精确控制在很多地方都需要,例如有偿的下载服务,网络硬盘,个人相册,防止本站内容被外站盗链。   假设下载文件的路径在/path/to/files,比如有/path/to/files/test1.txt,可以在nginx里配置 location /down { #这个路径只能在nginx内部访问 internal; alias /path/to/files; }  关键字 internal 指明了那些目录需要通过X-Accel-Redirect头与后台脚本进行内部转向。   问 ...
简介: ZeroMQ并不是一个对socket的封装,不能用它去实现已有的网络协议。 它有自己的模式,不同于更底层的点对点通讯模式。 它有比tcp协议更高一级的协议。(当然ZeroMQ不一定基于TCP协议,它也可以用于进程间和进程内通讯) 它改变了通讯都基于一对一的连接这个假设。   ZeroMQ把通讯的需要看成4类,其中一类是一对一结对通讯,用来支持传统的TCP socke模型,但并不推荐使用。 常用的通讯模式只有三类: 1.请求回应模型。由请求端发起请求,并等待回应端回应请求。从请求端来看,一定是一对对收发配对的; 反之,在回应端一定是发收对。请求端和回应端都可以是1:N的模 ...
Fabric commands run - run a command on a remote host sudo - run a sudoed command on a remote host local - run a command on the local host get/put - copy a file from/to a remote host prompt - ask the user for information*   Execute commands get output and return code output = run("comm ...
问题1:nagios配置文件说明? 答: commands.cfg是监控命令的配置文件 与其相关配置说明/usr/local/nagios/etc/objects/commands.cfg define command{ command_name #定义命令的简称 command_line #定义当服务进行时Nagios要执行的动作。在命令执行以前,所有合法的宏都要被他们的值代替。 }   contacts.cfg是监控报警联系人的配置文件 与其相关配置说明/usr/local/nagios/etc/objects/contacts.cfg #这段是用来定义一个联系人 ...
问题1:Nagios是什么? 答:是一个监视系统运行状态和网络信息的监视系统。   问题2:ubuntu下搭建nagios? 答: 依赖的软件包 sudo apt-get install apache2 sudo apt-get install build-essential sudo apt-get install libgd2-xpm-dev   建立一个帐号 切换为root用户 #切换为root用户 sudo -s #创建一个名为nagios的帐号并给定登录口令 useradd -m -s /bin/bash nagios passwd nagios ...
问题1:使用rvm安装ree以及安装rails? 答: rvm notes     查看rvm相关信息   rvm install ree     可能遇到缺少依赖的问题,可以查看.rvm/log/xxx/install.log提供的解决方案,例如:   sudo apt-get install libreadline5-dev   安装rails rvm ree gem install rails   问题2:rails搭建用户管理平台? 答: 使用restful-authentication rails plugin进行用户管理开发 安装方法 cd ven ...
Global site tag (gtag.js) - Google Analytics