<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[nellson的专栏]]></title><description><![CDATA[合抱之木，生于毫末；九层之台，起于累土；千里之行，始于足下。]]></description><link>https://blog.youkuaiyun.com/nellson</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; nellson]]></copyright><item><title><![CDATA[ProtoBuf插件原理 - 未完]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/89040772</link><guid>https://blog.youkuaiyun.com/nellson/article/details/89040772</guid><author>nellson</author><pubDate>Wed, 29 Apr 2020 16:44:04 +0800</pubDate><description><![CDATA[一、目的

介绍ProtoBuf插件原理，并实践用Python和Golang实现



二、原理

这里以2.6.1为例，查看protobuf-2.6.1/src/google/protobuf/compiler/main.cc代码，默认注册cpp\java\python 3个generator。最后调用cli.Run接口执行。


int main(int argc, char* argv[]...]]></description><category></category></item><item><title><![CDATA[K8s入门手记]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/88600214</link><guid>https://blog.youkuaiyun.com/nellson/article/details/88600214</guid><author>nellson</author><pubDate>Tue, 19 Mar 2019 12:20:34 +0800</pubDate><description><![CDATA[一、准备工作

0. 基本概念

节点（Node）：一个节点是一个运行 Kubernetes 中的主机。
	容器组（Pod）：一个 Pod 对应于由若干容器组成的一个容器组，同个组内的容器共享一个存储卷(volume)。
	容器组生命周期（pos-states）：包含所有容器状态集合，包括容器组状态类型，容器组生命周期，事件，重启策略，以及 replication controllers。
	Re...]]></description><category></category></item><item><title><![CDATA[RabbitMQ性能测试]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/83338496</link><guid>https://blog.youkuaiyun.com/nellson/article/details/83338496</guid><author>nellson</author><pubDate>Wed, 24 Oct 2018 10:10:30 +0800</pubDate><description><![CDATA[作者一直在寻找一个极低延时的消息队列，从目前的测试结果来看，只有nats达到了&amp;lt;1ms的水平，本文旨在测试rabbitmq的国latency，撰文记录并与大家分享。

 

1. 搭建rabbitmq svr

最方便的方式一定是docker，一行命令搞定，这里需要注意的是，没有用rabbitmq:latest，原因是因为这个版本不支持web管理

docker run -d --name ...]]></description><category></category></item><item><title><![CDATA[How to build your own ubuntu image with docker?]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/80677299</link><guid>https://blog.youkuaiyun.com/nellson/article/details/80677299</guid><author>nellson</author><pubDate>Wed, 13 Jun 2018 12:17:06 +0800</pubDate><description><![CDATA[一. Build a ubuntu image and install sshd

1. Pull ubuntu


 docker pull ubuntu:14.04

2. Create Dockerfile


FROM       ubuntu:14.04

#update
RUN apt-get update

#install gcc
RUN apt-get install -y gc...]]></description><category></category></item><item><title><![CDATA[Way to Go]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/62435278</link><guid>https://blog.youkuaiyun.com/nellson/article/details/62435278</guid><author>nellson</author><pubDate>Fri, 17 Mar 2017 22:24:08 +0800</pubDate><description><![CDATA[Way to Go一、Why Go为什么选择Go? 引用Gokit官网的一段原文：Go is designed from first principles to advance the practice of software engineering. It’s easy to learn, easy to master, and — most importantly — easy to maint]]></description><category></category></item><item><title><![CDATA[分布式消息队列浅析]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/53786835</link><guid>https://blog.youkuaiyun.com/nellson/article/details/53786835</guid><author>nellson</author><pubDate>Wed, 21 Dec 2016 16:34:41 +0800</pubDate><description><![CDATA[队列作为一种比较抽象的数据结构，在程序世界中被广泛的应用，而实现方式和形态也各式各样，有使用进程内堆栈实现的，如stl库中的queue;有基于管道、Shmem实现的，如常见的同机进程间通信模型，而随着分布式系统应用越来越广泛，跨机通信的场景需来需多，面临的问题不仅是消息投递问题，分布式系统普适性的挑战也随着应用场景的多样性而越来越多。]]></description><category></category></item><item><title><![CDATA[KAFKA-PHP环境搭建]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/53673692</link><guid>https://blog.youkuaiyun.com/nellson/article/details/53673692</guid><author>nellson</author><pubDate>Thu, 15 Dec 2016 17:56:48 +0800</pubDate><description><![CDATA[1. 下载二进制版本

http://kafka.apache.org/downloads.html

 kafka_2.10-0.10.0.1.tgz 解压到  /home/deploy/tar/kafka_2.10-0.10.0.1 

 

2. 启动

./bin/zookeeper-server-start.sh -daemon config/zookeeper.properties 
...]]></description><category></category></item><item><title><![CDATA[【C协程】ucontext入解]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/53320340</link><guid>https://blog.youkuaiyun.com/nellson/article/details/53320340</guid><author>nellson</author><pubDate>Thu, 24 Nov 2016 15:32:29 +0800</pubDate><description><![CDATA[In  a  System V-like environment, one has the type ucontext_t defined in  and the four functions get-context(2), setcontext(2), makecontext() and swapcontext() that allow user-level context switching]]></description><category></category></item><item><title><![CDATA[PHP安装CURL扩展]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/52699620</link><guid>https://blog.youkuaiyun.com/nellson/article/details/52699620</guid><author>nellson</author><pubDate>Thu, 29 Sep 2016 10:36:30 +0800</pubDate><description><![CDATA[场景： PHP已完成安装，单独安装CURL扩展


1. 安装LIBCURL
下载安装文件 https://curl.haxx.se/libcurl/
./configure --prefix=/usr/local/bin/curl/

make && make install


2. 编译curl扩展
进入php源码文件夹，php-5.6.26/ext/curl
执行p]]></description><category></category></item><item><title><![CDATA[coreseek实现中文检索服务]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/52008025</link><guid>https://blog.youkuaiyun.com/nellson/article/details/52008025</guid><author>nellson</author><pubDate>Sat, 23 Jul 2016 23:13:41 +0800</pubDate><description><![CDATA[主要参考了两篇文章，使用的安装版本为 coreseek-4.1-beta.tar


文章一，原地址为：http://zhan.renren.com/itbegin?gid=3602888498033481671&checked=true


ubuntu-10.04的安装环境

coreseek安装需要预装的软件：

shell>apt-get install make gc]]></description><category></category></item><item><title><![CDATA[Ubuntu系统，搭建mysql+sphinx环建]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/52004152</link><guid>https://blog.youkuaiyun.com/nellson/article/details/52004152</guid><author>nellson</author><pubDate>Sat, 23 Jul 2016 14:45:54 +0800</pubDate><description><![CDATA[本文介绍下如何在ubuntu系统中，利用apt工具，搭建mysql+sphinx的全文检索环境。


一 安装mysql
切换到root帐户，或者执行sudo apt-get install mysql-server mysql-client，安装mysql。

启动mysql
 service，执行sudo service mysql restart

安装支持apache的m]]></description><category></category></item><item><title><![CDATA[office系列文档的在线预览解决方案 － 在linux平台下转为pdf]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/51850788</link><guid>https://blog.youkuaiyun.com/nellson/article/details/51850788</guid><author>nellson</author><pubDate>Thu, 07 Jul 2016 14:10:15 +0800</pubDate><description><![CDATA[office系列文档包括：.ppt .pptx .doc .docx .xls .xlsx 等常用格式。
目标：在pc和手机浏览器上，可以方便的在线预览，类似邮箱中查看附件的体验。


方法：
我是在mac环境下测试的，直接用源码包安装报错，可能是一些依赖软件没安装，图方便，最后直接有dmg安装，安装到应用程序后，就可以很方便的转换了。


sudo /Applications/L]]></description><category></category></item><item><title><![CDATA[PYTHON-正则表达式用法]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/51790901</link><guid>https://blog.youkuaiyun.com/nellson/article/details/51790901</guid><author>nellson</author><pubDate>Thu, 30 Jun 2016 15:43:56 +0800</pubDate><description><![CDATA[这个模块提供了与 Perl 相似l的正则表达式匹配操作。Unicode字符串也同样适用。

 

正则表达式使用反斜杠" \ "来代表特殊形式或用作转义字符，这里跟Python的语法冲突，因此，Python用" \\\\ "表示正则表达式中的" \ "，因为正则表达式中如果要匹配" \ "，需要用\来转义，变成" \\ "，而Python语法中又需要对字符串中每一个\进行转义，所以就变成了]]></description><category></category></item><item><title><![CDATA[FFMPEG - 安装指南]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/51776431</link><guid>https://blog.youkuaiyun.com/nellson/article/details/51776431</guid><author>nellson</author><pubDate>Tue, 28 Jun 2016 16:16:38 +0800</pubDate><description><![CDATA[1. 安装 x264
http://www.videolan.org/developers/x264.html#tc_qz_original=707413898

下载并安装


2. 安装ffmpeg


./configure --prefix=/usr/local/ffmpeg/  --enable-gpl --enable-libx264 --enable-decoder]]></description><category></category></item><item><title><![CDATA[FFmpeg常用基本命令]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/51761851</link><guid>https://blog.youkuaiyun.com/nellson/article/details/51761851</guid><author>nellson</author><pubDate>Sun, 26 Jun 2016 10:50:26 +0800</pubDate><description><![CDATA[1.分离视频音频流

ffmpeg -i input_file -vcodec copy -an output_file_video　　//分离视频流
ffmpeg -i input_file -acodec copy -vn output_file_audio　　//分离音频流


2.视频解复用

ffmpeg –i test.mp4 –vcodec copy –an –f m4]]></description><category></category></item><item><title><![CDATA[FFMPEG-如何对视频按时长切片与压缩]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/51755177</link><guid>https://blog.youkuaiyun.com/nellson/article/details/51755177</guid><author>nellson</author><pubDate>Fri, 24 Jun 2016 19:28:54 +0800</pubDate><description><![CDATA[本文介绍如何用ffmpeg开源组件按时长进行切片，举一个例子，一个视频网站，拿到一个时长1.5小时的电影，用户点击播放时，常用的技术方案就是把一个完整的大文件，转码后切成按固定时长的小文件，分发到cdn上去，这样用户就可以实现就近下载，包括拖放等操作，这里面有比较多的技术细节，本文只讨论第一步，按时长切片。
一 获取视频时长
ffmpeg安装后，直接执行ffmpeg -i 文件就可以从内容中获]]></description><category></category></item><item><title><![CDATA[Golang 中的“潜规则”]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/51732058</link><guid>https://blog.youkuaiyun.com/nellson/article/details/51732058</guid><author>nellson</author><pubDate>Wed, 22 Jun 2016 10:01:19 +0800</pubDate><description><![CDATA[GO语言中要提供给外面访问的方法或是结构体必须是首字母大写
在一个公共的头文件中定义了一个结构体，如下所示：
type Header struct {
    ver       int
    magic_num int
    len       int
}
在另一个执行文件中，进行了初始化和赋值：
        var head comm.Header;
        head.]]></description><category></category></item><item><title><![CDATA[如何在Go中使用Protobuf]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/51692464</link><guid>https://blog.youkuaiyun.com/nellson/article/details/51692464</guid><author>nellson</author><pubDate>Thu, 16 Jun 2016 16:34:15 +0800</pubDate><description><![CDATA[Protobuf对于Golang通过插件进行支持，因些需要安装protoc的执行环境，下面我们来一步步看下，如何搭建一个编译环境。


1. 安装protoc


2. 下载并安装protobuf-go插件
从github上下载插件，并解压（https://github.com/golang/protobuf），得到以下的目录
drwxr-xr-x 6 root root 4096]]></description><category></category></item><item><title><![CDATA[mac os x使用Git简易入门教程]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/51526273</link><guid>https://blog.youkuaiyun.com/nellson/article/details/51526273</guid><author>nellson</author><pubDate>Sat, 28 May 2016 19:05:41 +0800</pubDate><description><![CDATA[该入门教程的流程是这样的；
什么是Git----------------->为什么选择Git----------------->如何安装Git到MAC OS X------------------>如何使用Git

具体如下；

1, 首先要了解什么是Git。

简而言之，Git是一个分布式的代码版本管理工具。类似的常用工具还有SVN,CVS。

概念了解参见；http://ba]]></description><category></category></item><item><title><![CDATA[Go运行环境搭建(Mac\Linux)]]></title><link>https://blog.youkuaiyun.com/nellson/article/details/51523159</link><guid>https://blog.youkuaiyun.com/nellson/article/details/51523159</guid><author>nellson</author><pubDate>Sat, 28 May 2016 05:55:10 +0800</pubDate><description><![CDATA[1. 下载安装文件

http://www.golangtc.com/dl

Mac使用go1.13.5.darwin-amd64.pkg

Linux使用go1.13.5.linux-amd64.tar.gz 



2. 配置执行路径



用vi打开~/.bash_rc，加入下面两行



# Go的安装目录

export GOROOT=/usr/local/go



# 执行...]]></description><category></category></item></channel></rss>