Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / 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 / 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 / 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 / loading.org
Created June 25, 2018 15:44 — forked from TheBB/loading.org
Loading in Spacemacs

Emacs packages, features, files, layers, extensions, auto-loading, require, provide, use-package… All these terms getting you confused? Let’s clear up a few things.

Files

Emacs files contains code that can be evaluated. When evaluated, the functions, macros and modes defined in that file become available to the current Emacs session. Henceforth, this will be termed as loading a file.

One major problem is to ensure that all the correct files are loaded, and in the

@improve100
improve100 / .spacemacs.el
Created June 22, 2018 05:42
spacemacs configration file
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'