This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install redis | |
# 安装 | |
service redis start | |
redis-server /etc/redis.conf | |
# 启动 | |
# 操作 | |
flushdb:删除这个db下的。 | |
flushall:删除所有 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VIM中空格和TAB的替换 | |
在.vimrc中添加以下代码后,重启vim即可实现按TAB产生4个空格: | |
set ts=4 (注:ts是tabstop的缩写,设TAB宽4个空格) | |
set expandtab | |
对于已保存的文件,可以使用下面的方法进行空格和TAB的替换: | |
TAB替换为空格: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone [email protected]:antirez/redis.git | |
cd redis | |
make; make install #应该是 sudo make install | |
cd utils | |
sudo ./install_server.sh | |
sudo service redis_6379 start|stop | |
sudo update-rc.d redis_6379 defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python很好用,尤其是用过easy_install的朋友更是觉得它的便捷, | |
卸载命令也很简单 easy_install -m package-name | |
但是面对源码安装的怎么办呢? | |
setup.py 帮助你纪录安装细节方便你卸载 | |
python setup.py install --record log | |
这时所有的安装细节都写到 log 里了 | |
想要卸载的时候 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone url | |
git br -a # 查看所有分支 | |
git remote add upstream upstream_url # 添加远程上游分支 | |
#不应该是merge 应该是rebase | |
git pull --all | |
git clone -b branch_name repo_url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#查看linux 发型版本 | |
方法一: cat /etc/issue | |
方法二: lsb_release -a | |
方法三: cat /etc/redhat-release(针对redhat,Fedora) | |
# 防火墙 | |
1) 永久性生效,重启后不会复原 | |
开启: chkconfig iptables on | |
关闭: chkconfig iptables off | |
2) 即时生效,重启后复原 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get -y update | |
#vim ruisu nodequery git | |
apt-get install python-pip | |
python server.py -p 9999 -k 999999 -m aes-256-cfb --user nobody -d start | |
sudo apte-get -y update | |
sudo apt-get -y upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################# | |
# | |
# 本清单基于 ubuntu 12.04, | |
# | |
# 只是一个清单,不是一个可以安全执行的脚本 | |
# | |
################################# | |
# create a linode,login as root, and create a common user for all the tasks | |
ssh root@the_ip_of_this_linode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
HTML5. Use tags like <article>, <section>, etc. | |
See: http://www.sitepoint.com/web-foundations/doctypes/ | |
--> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |