Code
A sample to automatically cleanup tasks executed too long
Here is a sample code to cleanup MongoDB tasks. (more…)
Here is a sample code to cleanup MongoDB tasks. (more…)
Besides of opening a file using vim and emacs, there is another single way to write some characters into one file. (more…)
Sometimes in building projects, we may meet an error seems as follow:
Can't exec "libtoolize": No such file or directory ....
Changing the name of your os could be the first step after initialized you server -- at least it works for me. (more…)
TL;DR: Configuring vsftp is a difficult work and we always meet various of errors. In this post, I am going to introduce one possible solution of error "GnuTLS error -15: An unexpected TLS packet was received." when you are using vsftpd. (more…)
Installing deb repository requires gpg-keys some time. Recently, I am trying to add a mongo repository for Ubuntu 14, which requires to request some gpg keys first. (more…)
Docker is a lightweight virtual machine container. To minimize the image, most of the official distributions were erased most the unnecessary system tools. (more…)
Recently I switched to gcc-6 in my OS X, and faced to VARIOUS of disasterS. One of them is the gcc compile cannot find header "stdlib.h" (more…)
本文大多数内容摘自实验室一位 Paper Machine Jing ZHANG老师的博士论文,它涉及到我们投出的论文 Panther: Fast Top-k Similarity Search in Large Networks,本体可以参考此处。本文意在随意介绍给恰好路过此处的哪位一点在大规模社会网络结构数据中对个体之间的影响力进行快速度量的思路,若有兴趣看看原文,并对你当前的工作有所帮助,那实在太棒了。
已知可执行文件 libtoolize(当然,目标也可以是 xxx.so 之类), 但是我不知道它在在什么 rpm 包下。一个很简单的方法是利用 yum 全局找一下。 (more…)
CentOS 6 是一个比较老的 distribution 了, 但是在某些地方还是被使用着。在某些版本为 6 的系统中,我们若需要安装一些新的东西,即便引入新的 rpm,有时遇到说需要更新 glibc 的。真是为难人~ (more…)
IntelliJ IDEA 是一个基于 Java 的集成开发环境(Integrated Development Environment, aka IDE), 这意味着很容易配置虚拟机的系统占用。Jetbrains 家默认给了一个很差的配置,这让我们可以在很差的机器上也能很容易跑起来,但同时意味着在好一点的机器上,也是即便系统有很多资源依然慢得要死。
不过如前文所说,这一切都可以靠配置很容易解决。 (more…)
一般情况下,TCP 是独占监听一个端口的,但是一台机器上可能需要部署若干个 HTTP Server,两个服务程序同时监听 80 端口,虽然可以通过一些参数做到,不过修程序让它们不打架相当麻烦。
一般情况下我们可以通过 Apache 或者 Nginx 作为连接服务,监听 80 和 443 端口,然后按请求 host 分别转发 http 请求。 (more…)