Skip to content

Instantly share code, notes, and snippets.

ZhengRui / LiveReload.sublime-settings
Last active Mar 16, 2020
SublimeText3 Markdown Preview + LiveReload + Pandoc User Settings
View LiveReload.sublime-settings
"enabled_plugins": [
ZhengRui / config
Created May 26, 2016
i3 configuration
View config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
# i3 config file (v4)
# Please see for a complete reference!
ZhengRui / .vimrc
Last active Jan 23, 2017
ubuntu14.04 vim and neovim configuration
View .vimrc
" add for vundle
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
ZhengRui /
Last active May 25, 2016
pyqt4 rectangle select by edge/stroke
from PyQt4 import QtGui, QtCore
import sys
class QStrokeRect(QtGui.QGraphicsRectItem):
def __init__(self, parent=None):
super(QStrokeRect, self).__init__(parent)
self.strokeWidth = 4
self.setPen(QtGui.QPen(QtGui.QColor(255, 0, 0), 4, QtCore.Qt.SolidLine))
ZhengRui /
Last active Mar 28, 2020
Update Matplotlib Plot
#! /usr/bin/env python
import matplotlib
import matplotlib.pyplot as plt"ggplot")
import numpy as np
import time
def newfig(l):