Skip to content

Instantly share code, notes, and snippets.

@improve100
improve100 / 1531809617.txt
Created July 17, 2018 06:39
Created with Copy to Gist
In the buffer containing the list of your gists, you can use the following commands
RETURN : opens the gist in a new buffer
g : reload the gist list from server
e : edit the gist description, so you know what this gist is about
k : delete current gist
b : opens the gist in the current web browser
y : show current gist url & copies it into the clipboard
* : star gist (stars do not show in gist list, only when browsing them on github)
^ : unstar gist
@improve100
improve100 / tmux
Last active August 8, 2018 06:33
tmux 系统剪切版复用 && 远程复用
1.系统复用:
##install
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
git clone https://github.com/tmux-plugins/tmux-yank ~/.tmux/plugins/
sudo apt-get install xclip
##edit .tmux.conf file
set -g @plugin 'tmux-plugins/tmux-yank'
run '~/.tmux/plugins/tpm/tpm'
run-shell ~/.tmux/plugins/tmux-yank/yank.tmux
set -g @yank_selection 'primary'
@improve100
improve100 / tramp
Created August 1, 2018 06:00
tramp-mode size too small
M-x customize-mode RET tramp-mode
Set Tramp Copy Size Limit and Tramp Inline Compress Start Size to a very high number (1000000 in my case)
to avoid out-of-the band and/or compressed data transfer. Note that, unlike the OP, I had to change both
of them to get it to work. Again, this means it only works for inline, uncompressed transfer but as for
the OP, this is more than enough for me since I just want to remotely edit fairly small ASCII files with
the best editor that exists.
@improve100
improve100 / nfs
Created August 1, 2018 09:57
nfs
1.sudo apt-get install nfs-common(mount 执行者)
2.sudo apt-get install nfs-kernel-server (被mount)
3.(被mount) sudo vim /etc/exports /home/vk *(rw,sync,no_root_squash,no_subtree_check)
4.sudo /etc/init.d/rpcbind restart sudo /etc/init.d/nfs-kernel-server restart
5.showmount -e
6.mount -t nfs 192.168.1.203:/root/nfs /mnt/nfs -o nolock
@improve100
improve100 / basecommand_emacs
Created August 6, 2018 08:31 — forked from shijinkui/basecommand_emacs
Emacs常用基本快捷键
/************************************/
基本命令
C-x C-f 打开/新建文件
C-x C-s 保存当前缓冲区
C-x C-w 当前缓冲区另存为
C-x C-v 关闭当前Buffer并打开新文件
C-x i 光标处插入文件
C-x b 切换Buffer
C-x C-b 显示Buffer列表
C-x k 关闭当前Buffer
@improve100
improve100 / autokey
Last active August 8, 2018 07:40
autokey
sudo apt-get install autokey-gtk
开机启动
/usr/bin/autokey-gtk
交换caps和ctrl
sudo apt install gnome-tweak-tool
@improve100
improve100 / 1533718543.txt
Created August 8, 2018 08:56
Created with Copy to Gist
安装Qt5 creator和designer
$ sudo apt-get install qtcreator
$ sudo apt-get install qt5-default qttools5-dev-tools
安装完成之后designer 可以在/usr/lib/x86_64-linux-gnu/qt5/bin/designer中找到,通过如下方式启动designer
$ designer
or
$ /usr/lib/x86_64-linux-gnu/qt5/bin/designer
@improve100
improve100 / Install PyQt5 on Ubuntu with python3 .md
Created August 8, 2018 09:01 — forked from r00tdaemon/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

@improve100
improve100 / 1533722185.txt
Created August 8, 2018 09:56
Created with Copy to Gist
$xz -d ***.tar.xz
$tar -xvf  ***.tar
@improve100
improve100 / opencv-3-installation 多版本
Last active August 24, 2018 07:17 — forked from bikz05/opencv-3-installation
OpenCV 3 Installation 多版本
# Added by me
sudo apt-get install freeglut3 freeglut3-dev libtbb-dev libqt4-dev
# install deps
sudo apt-get install build-essential cmake git pkg-config
sudo apt-get install libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libatlas-base-dev gfortran
# clone opencv source
mkdir softwares