×

欢迎光临,有什么想法就留言告诉我吧!

你的精彩评论可能会出现在这里哦! 留言抢沙发

杂项

vim配置备份

穆琪 穆琪 发表于2023-08-30 浏览426 评论0
" vundle config
set nocompatible              " 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 'gmarik/Vundle.vim'
Plugin 'https://github.com/scrooloose/nerdtree'
Plugin 'kien/rainbow_parentheses.vim'
Plugin 'https://github.com/bling/vim-airline'
" add all your plugins here (note older versions of Vundle
" used Bundle instead of Plugin)
" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" user config
" 通用配置
syntax on
set ic
set hlsearch
set encoding=utf-8
set fileencodings=utf-8,ucs-bom,GB2312,big5
set cursorline
set autoindent
set smartindent
set scrolloff=4
set showmatch
set nu
" python文件配置
let python_highlight_all=1
au Filetype python set tabstop=4
au Filetype python set softtabstop=4
au Filetype python set shiftwidth=4
au Filetype python set textwidth=79
au Filetype python set expandtab
au Filetype python set autoindent
au Filetype python set fileformat=unix
autocmd Filetype python set foldmethod=indent
autocmd Filetype python set foldlevel=99
" 分割窗口配置
set splitbelow
set splitright
" split navigations
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" 代码折叠
set foldmethod=indent
set foldlevel=99
nnoremap <space> za
" 文件树配置
nnoremap <F3> :NERDTreeToggle<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" 括号匹配颜色配置
let g:rbpt_colorpairs = [
                        \ ['brown',       'RoyalBlue3'],
                        \ ['Darkblue',    'SeaGreen3'],
                        \ ['darkgray',    'DarkOrchid3'],
                        \ ['darkgreen',   'firebrick3'],
                        \ ['darkcyan',    'RoyalBlue3'],
                        \ ['darkred',     'SeaGreen3'],
                        \ ['darkmagenta', 'DarkOrchid3'],
                        \ ['brown',       'firebrick3'],
                        \ ['gray',        'RoyalBlue3'],
                        \ ['darkmagenta', 'DarkOrchid3'],
                        \ ['Darkblue',    'firebrick3'],
                        \ ['darkgreen',   'RoyalBlue3'],
                        \ ['darkcyan',    'SeaGreen3'],
                        \ ['darkred',     'DarkOrchid3'],
                        \ ['red',         'firebrick3'],
                        \ ]
let g:rbpt_max = 16
let g:rbpt_loadcmd_toggle = 0
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces

杂项

kafka查看topic的偏移量

穆琪 穆琪 发表于2023-05-12 浏览97 评论0
1. 列举消费者
./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
2. 查看偏移量
./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group consumer --describe
3. 移动至最新
./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group multi-alarms-pro --topic Alarms --reset-offsets --to-latest -execute
Git Merge 与 Git Rebase的区别

杂项

Git Merge 与 Git Rebase的区别

穆琪 穆琪 发表于2023-04-28 浏览73 评论0

1.背景

merge和rebase都是用于分支合并,但实现机制不同。

git merge是将两个分支的修改合并成一个新的提交,并保留两个分支的历史记录;

git rebase是将一个分支的修改应用到另一个分支上,使得两个分支的修改看起来像是顺序提交的。

接下来,通过图形的方式直观地介绍git merge和git rebase的工作过程。

2.合并(Merge)

git merge是将一个分支的修改融入到另一个分支的一种方式,可执行两种类型的合并:fast-forward 和 no-fast-forward,现在你可能分不清,不过没关系,我们马上来看看它们的差异所在。

杂项

Ubuntu/Debian/Linux mint下CrossOver安装微信“WeChatWin.dll 缺失问题”方案

穆琪 穆琪 发表于2019-10-18 浏览1289 评论0
我的电脑是Linux mint19,基于Ubuntu18.04,使用的是Crossover18.安装TIM:直接搜索就可以安装好。安装微信:需要先下载安装包,然后在crossover里面手动选择。安装完显示WeChatWin.dll 缺失解决方法就是:sudo apt-get install libldap-2.4-2:i386来源于官网的解决方案:https://www.codeweavers.com/support/wiki/Diag/MissingL

杂项

Nginx配置不能从WEB访问目录下的文件

穆琪 穆琪 发表于2019-08-08 浏览377 评论0

事情的起因是我在服务器上搭建了一个dokuwiki站点,然后用的不是apache服务器,所以没法用doku自带的文件下载过滤设置。 所以使用Nginx的我就需要自己配置文件夹及其目录下文件的访问权限。

禁止访问某些后缀文件

location ~ \.(ini|conf|txt)$ {
       deny all;
}

禁止访问目录或目录下文件(这是这次的重点)


location ^~ /data/ {
    deny all<!--autointro-->

杂项

SublimeText3无法安装插件中心和其他插件(被墙)

穆琪 穆琪 发表于2019-04-20 浏览410 评论0
因为SublimeText3下载插件的网站貌似被墙了,所以现在没有办法下载下来插件,所以我从网上找了教程加上自己的实践解决了这个问题,在这里记录一下。
安装插件中心(离线)

首先去github下载插件中心离线安装包 [https://github.com/wbond/package_control/releases](https://github.com/wbond/package_control/releases "https://github.com/wbond

杂项

【转】Window设置Wifi热点的脚本

穆琪 穆琪 发表于2018-11-20 浏览392 评论0
把下面的脚本设置为name.bat  批处理文件,每次开启或关闭热点的时候双击输入相应的数字,省去了每次都打命令的麻烦。1@echo off2path=c:\windows\system3234echo netsh wlan5echo 1.启用无线承载网络6echo 2.停止无线承载网络7echo 3.显示网络连接状态8echo 4.显示WiFi密码9echo 5.修改WiFi名称10echo 6.修改WiFi密码11echo 7.初始化12set /p s=请输入任务前面的数字,按e