Skip to content

Instantly share code, notes, and snippets.

View Svtter's full-sized avatar

修昊 Svtter

View GitHub Profile
@Svtter
Svtter / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
;; This gives an introduction to Emacs Lisp in 15 minutes (v0.2d)
;;
;; 英文原作者: Bastien / @bzg2 / http://bzg.fr
;; 中文翻译: iamxuxiao
;;
;;
;; 如何安装 Emacs
;;
;; Debian: apt-get install emacs (or see your distro instructions)
;; MacOSX: http://emacsformacosx.com/emacs-builds/Emacs-24.3-universal-10.6.8.dmg
@Svtter
Svtter / .tmux.conf
Created September 1, 2016 08:16
zsh configuration
# 使用ctrl-a
set -g prefix C-a
unbind C-b
# bind a reload key
# bind R source-file ~/.tmux.conf ; display-message "Config reloaded.."
# 状态栏
# 颜色
@Svtter
Svtter / Powerful_Vim.vim
Last active November 9, 2016 11:32
vimrc for windows
" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker={,} foldlevel=0 foldmethod=marker spell:
"" Plug:
""
call plug#begin('~/.vim/plugged')
Plug 'junegunn/vim-easy-align'
Plug 'Svtter/map.vim'
Plug 'scrooloose/nerdtree'
Plug 'majutsushi/tagbar'
Plug 'sessionman.vim'
@Svtter
Svtter / evil.el
Created September 5, 2016 08:45
emacs config
;; evil leader
(require 'evil-leader)
(evil-escape-mode)
(global-evil-leader-mode)
(evil-leader/set-leader ",")
(evil-leader/set-key
"d" 'ido-list-directory
"e" 'ido-find-file
"b" 'ido-switch-buffer
@Svtter
Svtter / PythonDecorater.py
Last active September 11, 2016 23:13
Python装饰器示例代码
# 就像是env Python那样的美丽。
# coding: utf-8
'''
闭包的概念:
内部函数中对enclosing作用域的变量进行引用
'''
def func_150(val):
passline = 90
@Svtter
Svtter / apply.sh
Created September 24, 2016 04:55
Shadowsocks speeds up git-clone
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
@Svtter
Svtter / openwindow.js
Created September 24, 2016 07:49
js practise
// open new window
function Wopen(){
window.open("http://www.imooc.com", '_blank', 'width=600, height=400, top=100, left=0, menubar=no, toolbar=no, status=no, scrollbars=no');
}
@Svtter
Svtter / 易用软件清单.md
Last active September 26, 2016 06:30
因为经常忘记一些比较好用的软件,之后再也不记得,现在直接在此做一个清单进行记录。 还有一部分配置

[TOC]

文本输入

typora 及时markdown编辑器。非常好用。

@Svtter
Svtter / font.sh
Created September 27, 2016 03:32
install fonts
sudo mkdir -p /usr/share/fonts/winFont
sudo cp ~/Desktop/font/*.ttf /usr/share/fonts/winFonts/
sudo chmod 644 /usr/share/fonts/winFonts/*.ttf
cd /usr/share/fonts/winFonts/
sudo mkfontscale (创建雅黑字体的fonts.scale文件,它用来控制字体旋转缩放)
sudo mkfontdir (创建雅黑字体的fonts.dir文件,它用来控制字体粗斜体产生)
sudo fc-cache -fv (建立字体缓存信息,也就是让系统认识雅黑)