<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[windless0530的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/windless0530</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; windless0530]]></copyright><item><title><![CDATA[批量修改一堆机器的主机名]]></title><link>https://blog.csdn.net/windless0530/article/details/72792451</link><guid>https://blog.csdn.net/windless0530/article/details/72792451</guid><author>windless0530</author><pubDate>Sun, 28 May 2017 12:01:49 +0800</pubDate><description><![CDATA[#!/bin/bash

servers=(\
'172.17.11.150' \
'172.17.11.173' \
'172.17.11.201' \
'172.17.11.243' \
)

hostnames=(\
'a-gw-app-1' \
'a-gw-app-2' \
'a-msg-app-1' \
'a-msg-app-2' \
)

for i in ${!servers[*]}]]></description><category></category></item><item><title><![CDATA[Linux最大文件打开数的正确修改姿势]]></title><link>https://blog.csdn.net/windless0530/article/details/54911421</link><guid>https://blog.csdn.net/windless0530/article/details/54911421</guid><author>windless0530</author><pubDate>Tue, 07 Feb 2017 16:21:29 +0800</pubDate><description><![CDATA[原贴地址：

https://segmentfault.com/a/1190000006880817








前几天查看heka日志的错误日志的时候，发现报错信息 too many open files，很明显打开文件数过多了。

第一个问题来了，如何查看当前进程打开的文件数和最大打开文件数呢？

当前进程打开文件数 

ls /proc/[pid]/fd]]></description><category></category></item><item><title><![CDATA[Ubuntu 14.04 安装boost-python并配置工程指南]]></title><link>https://blog.csdn.net/windless0530/article/details/52634255</link><guid>https://blog.csdn.net/windless0530/article/details/52634255</guid><author>windless0530</author><pubDate>Fri, 23 Sep 2016 09:40:52 +0800</pubDate><description><![CDATA[先是在MAC OSX上折腾半天无关，又花了点时间折腾Ubuntu，好歹OK了，在这里记录一下过程。


1. 安装python-dev

sudo apt-get install python-dev
2. 手动安装boost

下载boost源代码并解压到某个目录（假设为[boost-src]），然后编译boost（c++11 +python +fPIC）

./bootst]]></description><category></category></item><item><title><![CDATA[GIT创建本地和远程分支]]></title><link>https://blog.csdn.net/windless0530/article/details/52398026</link><guid>https://blog.csdn.net/windless0530/article/details/52398026</guid><author>windless0530</author><pubDate>Thu, 01 Sep 2016 12:06:04 +0800</pubDate><description><![CDATA[示例：当前分支为master:origin/master，要基于当前分支最新代码创建一个本地分支zy和远程分支zy


git checkout -b zy origin/master
git push origin zy:zy
git branch -u origin/zy]]></description><category></category></item><item><title><![CDATA[ubuntu 14.04 安装 gcc 6.1 心得]]></title><link>https://blog.csdn.net/windless0530/article/details/52200051</link><guid>https://blog.csdn.net/windless0530/article/details/52200051</guid><author>windless0530</author><pubDate>Sat, 13 Aug 2016 16:40:27 +0800</pubDate><description><![CDATA[中间各种错误就不提了，最终安装成功的方法如下：


1. 下载gcc 6.1
https://gcc.gnu.org/mirrors.html

解压到目录，设为[gcc_dir]


2. 下载gcc依赖库：
gmp: https://gmplib.org/#DOWNLOAD
mpfr: http://www.mpfr.org/mpfr-current/#download]]></description><category></category></item><item><title><![CDATA[解决编译thrift时报错的问题]]></title><link>https://blog.csdn.net/windless0530/article/details/52166086</link><guid>https://blog.csdn.net/windless0530/article/details/52166086</guid><author>windless0530</author><pubDate>Tue, 09 Aug 2016 20:57:35 +0800</pubDate><description><![CDATA[先这样configure

./configure --prefix=/usr/local/ --with-boost=/usr/local CXXFLAGS="-g -O2"




然后再make]]></description><category></category></item><item><title><![CDATA[解决mac osx编译libevent找不到openssl目录的问题]]></title><link>https://blog.csdn.net/windless0530/article/details/52165874</link><guid>https://blog.csdn.net/windless0530/article/details/52165874</guid><author>windless0530</author><pubDate>Tue, 09 Aug 2016 20:23:06 +0800</pubDate><description><![CDATA[用如下方式去configure（指定openssl的实际路径）




./configure --prefix=/usr/local CPPFLAGS="-I/usr/local/Cellar/openssl/1.0.2h_1/include" LDFLAGS="-I/usr/local/Cellar/openssl/1.0.2h_1/lib"




然后再make]]></description><category></category></item><item><title><![CDATA[OSX安装homebrew以及正确安装PIL（包括jpeg）的方法]]></title><link>https://blog.csdn.net/windless0530/article/details/51408192</link><guid>https://blog.csdn.net/windless0530/article/details/51408192</guid><author>windless0530</author><pubDate>Sat, 14 May 2016 21:40:33 +0800</pubDate><description><![CDATA[1. 安装homebrew

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

如果地址被墙，可以过一会儿再试，说不定就好了。




2. 安装jpeg和freetype

brew install jpeg

brew install freetype




3. 如果没有下载]]></description><category></category></item><item><title><![CDATA[rsync等ssh命令忽略密码的方式]]></title><link>https://blog.csdn.net/windless0530/article/details/34536713</link><guid>https://blog.csdn.net/windless0530/article/details/34536713</guid><author>windless0530</author><pubDate>Wed, 25 Jun 2014 22:31:54 +0800</pubDate><description><![CDATA[http://hi.baidu.com/coffeefoam/item/ad55253b460684fd97f88d51


源机器：A]]></description><category></category></item><item><title><![CDATA[Linux下如何查看高CPU占用率线程 LINUX CPU利用率计算]]></title><link>https://blog.csdn.net/windless0530/article/details/25230947</link><guid>https://blog.csdn.net/windless0530/article/details/25230947</guid><author>windless0530</author><pubDate>Wed, 07 May 2014 17:14:23 +0800</pubDate><description><![CDATA[http://blog.csdn.net/chen3888015/article/details/7432868]]></description><category></category></item><item><title><![CDATA[mysql用户添加删除编辑权限管理等简述]]></title><link>https://blog.csdn.net/windless0530/article/details/23796697</link><guid>https://blog.csdn.net/windless0530/article/details/23796697</guid><author>windless0530</author><pubDate>Tue, 15 Apr 2014 23:52:59 +0800</pubDate><description><![CDATA[http://www.cnblogs.com/analyzer/articles/1045072.html
注：
关于用户授予数据库权限，如果用户是属于局域网域，则类似如下操作可能报错：
grant all privileges on my_db.* to usr01@192.168.1.% identified by 'usr01.pswd';
而应为：
grant all privi]]></description><category></category></item><item><title><![CDATA[自定义core文件名]]></title><link>https://blog.csdn.net/windless0530/article/details/14142587</link><guid>https://blog.csdn.net/windless0530/article/details/14142587</guid><author>windless0530</author><pubDate>Mon, 04 Nov 2013 21:34:33 +0800</pubDate><description><![CDATA[示例：在core文件名中加入程序文件名：
 
echo 'core.%e' > /proc/sys/kernel/core_pattern
 
可用参数如下：
%p 进程ID
%u 实际用户ID
%g 实际用户组ID
%s 导致本次core dump的信号
%t core dump的时间 (由1970年1月1日计起的秒数)
%h 主机名
%e 程序文件名]]></description><category></category></item><item><title><![CDATA[NSIS查找和杀进程详解]]></title><link>https://blog.csdn.net/windless0530/article/details/8889932</link><guid>https://blog.csdn.net/windless0530/article/details/8889932</guid><author>windless0530</author><pubDate>Mon, 06 May 2013 12:45:40 +0800</pubDate><description><![CDATA[FindProcDLL::FindProc {process_name}
返回值：
0 - 未找到
1 - 找到

KillProcDLL::KillProc {process_name}
0 - 杀进程成功
603 - 未找到此进程（也有可能是无法访问进程，如因用户权限问题等）
其它 - 各种错误

所以，在杀进程时，如果返回603，最后再findproc一下，确认是否进程不]]></description><category></category></item><item><title><![CDATA[备份我的一个xml.vim]]></title><link>https://blog.csdn.net/windless0530/article/details/8548548</link><guid>https://blog.csdn.net/windless0530/article/details/8548548</guid><author>windless0530</author><pubDate>Mon, 28 Jan 2013 13:21:38 +0800</pubDate><description><![CDATA[主要为了实现xml tag name和tag本身的颜色区别。效果如下：

 
" Vim syntax file
" Language:	XML
" Maintainer:	Johannes Zellner 
"		Author and previous maintainer:
"		Paul Siegmann 
" Last Change:	Mi, 13 Apr 2005 22:40:09]]></description><category></category></item><item><title><![CDATA[Visual Studio通过Property Manager建立的*.vsprops文件定义的宏，优先于环境变量]]></title><link>https://blog.csdn.net/windless0530/article/details/8482584</link><guid>https://blog.csdn.net/windless0530/article/details/8482584</guid><author>windless0530</author><pubDate>Tue, 08 Jan 2013 19:00:12 +0800</pubDate><description><![CDATA[如果宏名称重名，则使用 $(xxx) 访问时以用户自定义宏为准。]]></description><category></category></item><item><title><![CDATA[解决应用程序图标为windows默认图标的问题：清除图标缓存]]></title><link>https://blog.csdn.net/windless0530/article/details/8471702</link><guid>https://blog.csdn.net/windless0530/article/details/8471702</guid><author>windless0530</author><pubDate>Sun, 06 Jan 2013 10:00:26 +0800</pubDate><description><![CDATA[在windows7下验证通过。
 
P.S. 刚发现此脚本会导致右下角系统托盘图标无法恢复……这个回头再查怎么搞……
 
http://webcache.googleusercontent.com/search?q=cache:MInt_CnJ4FkJ:www.2cto.com/os/201212/174728.html+&cd=37&hl=zh-CN&ct=clnk&gl=cn&clie]]></description><category></category></item><item><title><![CDATA[Visual Studio环境变量]]></title><link>https://blog.csdn.net/windless0530/article/details/8193845</link><guid>https://blog.csdn.net/windless0530/article/details/8193845</guid><author>windless0530</author><pubDate>Sat, 17 Nov 2012 14:57:38 +0800</pubDate><description><![CDATA[http://blog.csdn.net/lyl8470/article/details/6111765
http://msdn.microsoft.com/zh-cn/library/c02as0cs.aspx
 





宏


说明




$(RemoteMachine)


在“调试”属性页上设置为
Remote Machine 属性的值。有关更]]></description><category></category></item><item><title><![CDATA[Visual Studio 用正则表达式查找替换]]></title><link>https://blog.csdn.net/windless0530/article/details/7900043</link><guid>https://blog.csdn.net/windless0530/article/details/7900043</guid><author>windless0530</author><pubDate>Thu, 23 Aug 2012 15:06:37 +0800</pubDate><description><![CDATA[先转两个链接：

1. 关于正则表达式：
http://deerchao.net/tutorials/regex/regex.htm

2. 关于VS里的扩展（在替换时如何引用查找时被匹配到的原字符串）：
http://blog.csdn.net/yacper/article/details/4768300

举个例子：把所有linux风格的变量名，全部改为匈牙利命名法。
如：把]]></description><category></category></item><item><title><![CDATA[QDialog子控件禁止构造时parent为NULL]]></title><link>https://blog.csdn.net/windless0530/article/details/7664085</link><guid>https://blog.csdn.net/windless0530/article/details/7664085</guid><author>windless0530</author><pubDate>Thu, 14 Jun 2012 18:26:19 +0800</pubDate><description><![CDATA[否则如果QDialog::exec()，则直到对话框退出主线程都会处于QDialog::exec()内部的消息循环之内，这个消息循环位于qApp消自习循环之上。


而构造时parent为NUILL的widget，其父控件为桌面，因此当windows消息（不管是鼠标、键盘、还是别的）发给它的时候，只有在qApp消息循环里才能处理。换句话说，就是在模态对话框运行期间，根本处理不了……]]></description><category></category></item><item><title><![CDATA[python+pywin32修改环境变量]]></title><link>https://blog.csdn.net/windless0530/article/details/7474763</link><guid>https://blog.csdn.net/windless0530/article/details/7474763</guid><author>windless0530</author><pubDate>Wed, 18 Apr 2012 18:52:48 +0800</pubDate><description><![CDATA[通过修改注册表实现。
修改完后要广播WM_SETTINGCHANGE消息通知现有窗体重新加载环境变量。
# -*- coding:utf-8 -*-

import _winreg
import win32api
import win32con

if '__main__' == __name__:
    key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MA]]></description><category></category></item></channel></rss>