Home
Wade Tester
Cancel

在linux上使用花生壳

不必考虑到你的路由器是否支持花生壳。  比如我用的是TP-LINK的 402+, 明显不支持花生壳。 只要我们设置好转发规则就可以。花生壳用的端口是 6060 (TCP, UPD) 参考这个文章: http://service.oray.com/question/116.html (如果你使用的是 UBUNTU, 请使用 sudo apt-get install g++ ...

Rubyrspec中测试module

见:  http://stackoverflow.com/questions/1542945/testing-modules-in-rspec/1546493#1546493 What mike said. Here's a trivial example: module code... module Say def hello "hello" end end...

Rsync使用与sshport不同的几种方式

refer to  http://stackoverflow.com/questions/4549945/is-it-possible-to-specify-a-different-ssh-port-when-using-rsync/27140429#27140429 rsync -rvz -e 'ssh -p 2222' --progress --remove-sent-fi...

有webservice参与的系统的单元测试使用mockobject三

经过近4个工作日的整理,终于把整个系统基本都搞定: 使用了MOCK 写道 Finished in 32.84 seconds 390 examples, 0 failures, 6 pending 原来的 写道 Finished in 21 minutes 11.65 seconds 421 examples, 13 failures 现在33秒,对比以前的 20+ 分钟,...

Github上watcher>1000的项目。

http://stackoverflow.com/questions/5740454/github-advanced-search-default-behaviour   在advanced search中:   followers:[1000 TO *]   例如这个链接: https://github.com/search?utf8=%E2%9C%93&q=follow...

Linux下配置ssledgeproxyeurekavpt

ssl edge 是一个非常好用的VPN/proxy, 比云梯 稳定快速的多.  在LINUX下开发 Titanium 需要用到各种翻墙,所以它是必备工具.  1. 根据自己付费后的用户名和密码,下载 相关的代理文件.  (需要的同学可以问我要)  也可以来这个页面(https://eurekavpt.com/page/ssledge-on-linux...

有webservice参与的系统的单元测试使用mockobject二

前天写了文章: 有webservice参与的系统的单元测试,最好使用mock object 如果某个mock对象,要求模拟 POST 这样的修改数据的操作,而不是简单的GET 这样的查询,该如何做呢? 我现在使用的办法,是 使用yaml文件来存储数据,达到简单的模仿 数据库的目的。 例如: require 'yaml' module YamlStoreStrategy ...

无法部署capistranocapistranocannotdeploycodebecausenetsshauthenticationfailedauthenticationfailed

solution:   # add to Gemfile:  gem 'net-ssh', '2.7.0'    done.  refer to: http://stackoverflow.com/questions/21811026/capistrano-cannot-deploy-code-because-netsshauthentica...

Gitcherry Pick如何把已经提交的commit从一个分支放到另一个分支

实际问题:   在本地 master 分支上做了一个commit ( 38361a68138140827b31b72f8bbfd88b3705d77a ) , 如何把它放到 本地 old_cc 分支上? 办法之一: 使用 cherry-pick.  根据git 文档: Apply the changes introduced by some existing commits ...

有webservice参与的系统的单元测试,最好使用mockobject

手头上的一个项目,是以另外一个系统的webservice做为底层基础。 里面大约有50的操作,最终都要调用这些 web service。 大约有200个test case, 跑完一边居然要15~ 30分钟。因为调用一次WS,大约25秒左右。而且随着远程webservice 服务器的性能问题,这个时间还在增加。 程序员感觉很麻烦。因为调试的时候,如果远程 Webservice出...

搭建gitweb的步骤

如何搭建捏? 见这个教程。 http://serverfault.com/questions/72732/how-to-set-up-gitweb 绝对不要用这个教程。 不好使 http://ao2.it/wiki/How_to_setup_a_GIT_server_with_gitosis_and_gitweb 下面就是步骤,虽然原文强调在 ubuntu 8.04下适用,...

Installssh Serveronubuntu

$ sudo apt-get install openssh-server $ sudo start/stop ssh

使用github建立一个代码库的步骤

建立github账户很久了,但是用的不多。 最近希望把1,2个 项目放上去。 所以把步骤放在这里。 我的项目名叫 checkbox_across_pagination。  (用来管理多页选择的一个js组件) 1. cd checkbox_across_pagination 2. git init .   git add   git commit -m "initial v...

Selenium进阶21:cssselector测试的html页面源代码

这个是被测试的 HTML 代码。 http://code.google.com/p/selenium/source/browse/trunk/selenium/src/web/tests/html/test_locators.html?r=10587   ThoughtWorks 好牛啊。。。     <html> <!-- Copyright 2006 Tho...

在nginx转发时保留原始域名keepthehostheadervianginxproxy_pass

最近的子项目越来越多,但是只有一个域名, 在做了nginx的跳转之后, 发现原来的域名会丢失,取代出现的是IP。 (with the growth of the sub-systems of my current project, there is a problem occurred: the origin domain name disappeared and it is replace...

Selenium进阶1:cssselector

selenium 不如JQUERY对CSS支持的那么好一直是我心中的痛。 比如:找到页面中,找到一组 <a>, 然后再找到[2].parent()这个dom, jQuery得心应手,selenium 之前则只能借助于晦涩难懂的 xpath.  >_< 而 selenium 大牛们都是推荐 CSS selector的。所以。。。我找了一下解决方案,发现sele...

学习linuxbash的好地方

http://www.freeos.com/guides/lsst/ 绝对的超值啊。。。  

Ssh相关(端口号,密码等等)sshrelatedparameters

公司使用了特殊的SSH 端口号,我总容易弄错,所以把相关的信息贴在这里: ( our server in company uses a special port rather than usual 22 which always making me confused.  so I have to post related tips here )  1. scp 例子: &...

如何测试私有方法howtotestprivatemethod

TODO 更多内容。 主要是: http://www.artima.com/suiterunner/private2.html java 单元测试,使用反射, 以及一个PrivateMethodAccessor 类。来实现。 缺点是测试代码比较冗长。 http://kailuowang.blogspot.com/2010/08/testing-private-method...

转载nginx域名跳转一例~~~rewrite、proxy

转载的  ,  http://storysky.blog.51cto.com/628458/486338 前几天搭了一个论坛服务器并放到了公司的局域网里面,论坛用的是9066端口并在路由器上面做了个端口转发,而且把bbs.xxx.com这个域名也指向了公司的公网IP,因为想让用户在访问的时候不用输入端口号于是就想在公司的web服务器上面做个跳转,将访问bbs.xxx.com的请求...