- 博客(17)
- 收藏
- 关注
转载 Postgresql master-slave 切换测试
系统: ubuntu 1204IP: slave: 10.4.2.101 master:10.4.2.110安装详见:http://2057.iteye.com/blog/16166201、创建用户create user msuser superuser login connectio...
2013-02-22 15:10:00 249
转载 Code Like a Pythonista: Idiomatic Python(阅读笔记——等价于复制)
The Zen of Python, by Tim PetersBeautiful is better than ugly.Explicit is better than implicit.Simple is better than complex.Complex is better than complicated....
2013-02-18 17:56:00 289
转载 Python functools
首先看下functools包含的方法Python 2.7.2 (default, Jun 20 2012, 16:23:33)[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwinType "help", "copyright", "cr...
2013-02-16 18:49:00 98
转载 Linux grep、find命令
一、greplinux下行过滤工具语法:grep [options]└─(12:15:%)── grep ...
2013-01-22 19:39:00 89
转载 postgresql standby 配置
首先、配置下inux sysctl.conf 配置 64G For 64-bit systems with 64GB of RAM:kernel.shmmax=34359738368kernel.shmmni=4096kernel.shmall=16777216vm.nr_hugepages=16384sys...
2013-01-11 03:01:00 291
转载 Python Collections
CollectionsHigh-performance container datatypes * nametuple() * deque * Counter * OrderedDict * defaultdict一、Counterdict subclass for counting hash able objec...
2012-12-24 19:12:00 61
转载 Cache Algorithm
什么是缓存:存储使用频繁数据的临时地方。缓存命中:如果不是预存的话第一次要miss掉。1、如果有足够的缓存空间,未命中的对象后面会被存储到缓存中。2、如果缓存满了,就有根据对应的缓存策略,替换数据。即替换策略缓存算法可以分为: 1. 基于时间的策略 2. 基于访问频率的策略 3. 基于二者坚固的策略 4. 时间距离分布...
2012-12-20 17:29:00 230
转载 rabbitmq入门
RabbitMQ是AMQP(高级消息队列协议)的标准实现基本概念参考文章:http://www.rabbitmq.com/getstarted.htmlhttp://www.nsbeta.info/archives/200python demo:producer#!/usr/bin/env pythonimport pika...
2012-12-19 17:05:00 78
转载 rabbitmq安装
最近在使用rabbitmqpython端用pika连接出现错误:=ERROR REPORT==== 18-Dec-2012::19:02:56 ===exception on TCP connection <0.30342.255> from 127.0.0.1:44552{bad_header,<<65,77,81,8...
2012-12-18 19:50:00 207
转载 Ubuntu修改root密码以及只允许证书登陆设置
一、修改root密码 1. sudo passwd 2. Password: 3. Enter new UNIX password: 4. Retype new UNIX password: 5. passed:finished update successfully.二、修改只允许证...
2012-12-17 17:45:00 196
转载 ubuntu源码安装postgresql
首先安装一些依赖apt-get updateapt-get install gccapt-get install zlib1g-devapt-get install g++apt-get install libxml2apt-get install libxml2-devapt-get install libgdal1-dev1、安装postgresql...
2012-12-17 15:16:00 359
转载 LearningTornado —— No.1
1 class Test(object): 2 def __init__(self): 3 super(Test, self).__init__() 4 self.stopped = False 5 6 @classmethod 7 def instance(): 8 ...
2012-08-20 01:03:00 119
转载 The Final
从此时起,一切都只为了逃离,更确切的说是逃亡。逃离这座无爱的城市,逃离这个悲微的自己,逃离这个不愿面对的现实。而我,终是别无它法。(同时,我也深知这一切也终将发生,而我所作的一切只是在复刻记忆,这一切是否早已发生过?)然而,除了面对,以及无法逃避。那就只能随波逐流了,但是随着谁的波,逐着谁的流。我都不清楚。乱,有史以来的乱。可唯一约束我的,是我永远不...
2012-08-19 22:03:00 59
转载 FreeBSD下安装redis以及redis_py
查找redissuse# whereis redisredis: /usr/ports/databases/redis安装redissuse# makesuse# make install启动suse# /usr/local/bin/redis-server[6314] 19 Dec 00:22:06 # Warning: no config file sp...
2011-12-18 16:48:00 157
转载 SQL 基础知识总结
1、创建tablemysql> create table tmd(id int(11) not null,name varchar(100),ts timestamp);Query OK, 0 rows affected (0.14 sec)mysql> desc tmd;+-------+--------------+------+-----+-----------...
2011-12-14 02:28:00 114
转载 JSON encoder and decoder
以下内容来自:http://www.ruanyifeng.com/blog/2009/05/data_types_and_json.html文档说,从结构上看,所有的数据(data)最终都可以分解成三种类型:第一种类型是标量(scalar),也就是一个单独的字符串(string)或数字(numbers),比如"北京"这个单独的词。第二种类型是序列(sequenc...
2011-12-12 18:20:00 158
转载 12月12日
To -> Pluto 来自超不正常星系的问候: 你在那个星球过的可好? long time no see。 你已不是九大星系。 可依旧孤独,寒冷。 当年哥在火星的时候, 可那是当年 哥来了这该死的地球 一时间恨透了整个宇宙 而你,依旧寒冷,孤独。 ...
2011-12-12 11:01:00 59
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人