// byte is an alias for uint8 and is equivalent to uint8 in all ways. It is // used, by convention, to distinguish byte values from 8-bit unsigned // integer values. typebyte = uint8
// rune is an alias for int32 and is equivalent to int32 in all ways. It is // used, by convention, to distinguish character values from integer values. typerune = int32
git clone https://github.com/vim/vim.git cd vim/src/ ./configure –with-features=huge -enable-pythoninterp –with-python-config-dir=/usr/lib/python2.7/config make && make install
set nocompatible " be iMproved, required filetype off " required=
set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " alternatively, pass a path where Vundle should install plugins "call vundle#begin('~/some/path/here') "let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported. " Keep Plugin commands between vundle#begin/end. " plugin on GitHub repo Plugin 'tpope/vim-fugitive' " plugin from http://vim-scripts.org/vim/scripts.html " Plugin 'L9' " Git plugin not hosted on GitHub Plugin 'git://git.wincent.com/command-t.git' " git repos on your local machine (i.e. when working on your own plugin) " Plugin 'file:///home/gmarik/path/to/plugin' " The sparkup vim script is in a subdirectory of this repo called vim. " Pass the path to set the runtimepath properly. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} " Install L9 and avoid a Naming conflict if you've already installed a " different version somewhere else. " Plugin 'ascenator/L9', {'name': 'newL9'} " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required " To ignore plugin indent changes, instead use: "filetype plugin on " " Brief help " :PluginList - lists configured plugins " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate " :PluginSearch foo - searches for foo; append `!` to refresh local cache " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal " " see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line
git clone https://github.com/google/googletest.git cd googletest cmake -DBUILD_SHARED_LIBS=ON . make cp -a googletest/include/gtest /usr/include cp -a googlemock/gtest/libgtest_main.so googlemock/gtest/libgtest.so /usr/lib/
遇到Can’t locate Data/Dumper.pm in @INC…问题
wget http://www.cpan.org/modules/by-module/Data/Data-Dumper-2.154.tar.gz tar xvzf Data-Dumper-2.154.tar.gz cd Data-Dumper-2.121 perl Makefile.PL make make install //如果遇到Can’t locate ExtUtils/MakeMaker.pm…该错误 yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker cpan
如果vim 出现 NoExtraConfDetected: No .ycm_extra_conf.py file detected, so no compile flags are available. Thus no semantic support for C/C++/ObjC/ObjC++. Go READ THE DOCS NOW, DON’T file a bug r… 到https://github.com/Valloric/ycmd/blob/master/cpp/ycm/.ycm_extra_conf.py该页面下载, 然后修改进行修改 cd ~/.vim/bundle/YouCompleteMe 查看有没有cpp文件夹, 没有就创建mkdir cpp/ycm, 然后将下载.ycm_extra_conf.py放进该文件夹下, 然后编辑
Hi, As each running docker container uses the host Kernel, they also use the memory and swap of the host. If this is a one of requirement its better to increase the host swap space. If you want to still add swap from the container you have two options. Run container in privileged mode In this case you will have to run the container with –privileged option.
Example
docker run -it –rm –privileged centos:6 Running container with privileged mode gives container full privilege on the host. If you read the manpage of swapon you can see that for swapon to run the process should have CAP_SYS_ADMIN capability. In Docker you can add a particular capability selectively to the container using the –cap-add argument.
Example
docker run -it –rm –cap-add SYS_ADMIN centos:6 If you run the container in either of the above two modes you can achieve what you are trying. Now the problem with this approach is , when you create swap inside the container and start using that, its actually the Host Kernel that is using it, as a result when you exit the container without a swapoff the host kernel will be still using the file, and you wont get a clean exit of the container. You will see a dead status for the container.