Skip to content

Instantly share code, notes, and snippets.

View edisonlz's full-sized avatar
🎯
Focusing

liuzheng edisonlz

🎯
Focusing
View GitHub Profile
必胜公考
1. 产品定位
公务员在线备考服务平台
课程,题库,问答,资讯,班级
2. 盈利(转化路径)
新增 - 低价课/免费课 - 系统课 - 线下封闭班
3. 提供公司运营效率
一、基本介绍
LVS是工作在内核内间的TCP/IP协议栈上,且监控在INPUT链上,所以一般情况下LVS 和iptables 最好不要同时使用.
Keepalived是一个基于ARRP协议来实现高可用的服务,keepalived能够自己调用ipvsadm命令生成规则,能够自动实现,将主节点的VIP以及ipvs规则“拿过来”,应用在从节点上,继续为用户服务。还可以实现对后端realserver的健康状况做检测。
LVS三种工作模式(NAT、DR、TUN), 通常用的最多的是DR模式
@edisonlz
edisonlz / gist:e95e97b331dc16d3b6d9
Created October 28, 2014 03:21
内存调试gdb
grep rw-p /proc/$1/maps | sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' | while read start stop; do; done
grep rw-p /proc/25396/maps
gdb --batch --pid 25396 -ex "dump memory a.dump 0x2ab09ee3f000 0x2ab176e40000"
@edisonlz
edisonlz / redis lua
Created April 22, 2013 09:56
redis lua
local redis = {
_VERSION = 'redis-lua 2.0.5-dev',
_DESCRIPTION = 'A Lua client library for the redis key value storage system.',
_COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri',
}
-- The following line is used for backwards compatibility in order to keep the `Redis`
-- global module name. Using `Redis` is now deprecated so you should explicitly assign
-- the module to a local variable when requiring it: `local redis = require('redis')`.
Redis = redis
@edisonlz
edisonlz / dabblet.css
Created February 19, 2012 12:20
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
div {border:1px;border-color:#ECE}
div#one p{display:inline;width:50px}
div#two p{display:block}
div#three p{display:inline-block;width:50px}
@edisonlz
edisonlz / dabblet.css
Created February 19, 2012 12:17
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;}
div {color:white;}
p:first-letter{color:#ECE;font-size:30px;}
@edisonlz
edisonlz / dabblet.css
Created February 19, 2012 02:57
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;}
div {color:white;}
p:first-letter{color:#ECE;font-size:30px;}
@edisonlz
edisonlz / dabblet.css
Created February 17, 2012 07:34
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
}
@edisonlz
edisonlz / dabblet.css
Created February 17, 2012 06:17
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body{
background: #f063;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
font-size: 20px;
line-height: 2em;
@edisonlz
edisonlz / dabblet.css
Created February 17, 2012 01:40
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body{
background: #f063;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
font-size: 20px;
line-height: 2em;