Skip to content

Instantly share code, notes, and snippets.

@frankyxhl
frankyxhl / gist:4122935
Created November 21, 2012 04:01
RubyConfChina_Feedback
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
# @date: 2012-11-20
# @author: Frank_Xu franky.xhl[at]gmail.com I'm a Ruby Newbie~
# 变量设定
# qn = question number count
qn = 13
# filename
filename = "rslt.txt"
@frankyxhl
frankyxhl / gist:3780429
Created September 25, 2012 07:18
swap-command-and-option-key-in-mac
(setq mac-option-key-is-command t)
(setq mac-option-modifier 'super)
(setq mac-command-key-is-meta t)
(setq mac-command-modifier 'meta)
@frankyxhl
frankyxhl / sr-speedbar-emacs-config.el
Created September 25, 2012 07:07
sr-speedbar-emacs-config
;;===========================================================================
;;sr-speedbar-mode
;;===========================================================================
(require 'sr-speedbar)
;;默认显示所有文件
(custom-set-variables
'(speedbar-show-unknown-files t)
)
;;sr-speedbar-right-side 把speedbar放在左侧位置
;;sr-speedbar-skip-other-window-p 多窗口切换时跳过speedbar窗口
@frankyxhl
frankyxhl / gist:3775217
Created September 24, 2012 09:53
snippet_python_def
# -*- coding: utf-8 -*-
# name: def
# contributor: Orestis Markou
# contributor: Yasser González Fernández <yglez@uh.cu>
# key: def
# --
def ${1:name}($2):
"""$3
${2:$
(let*
@frankyxhl
frankyxhl / gist:3769394
Created September 23, 2012 08:48
My github blog sass file
// This File is imported last, and will override other styles in the cascade
// Add styles here to make changes without digging in too much
html{
background: url('/images/bg.png') repeat center top;
}
body > header{
background-color: transparent;
}
@frankyxhl
frankyxhl / emacs-indent-tab-mode.el
Created July 31, 2012 18:59
emacs-indent-tab-mode problem
(defun indent-hint-mode (&optional l lst)
(interactive)
(let* ((c '(indent-hint-current-column))
(lst (or lst '(("^[ \t]*\\([^ \t]\\)"))))
(lst (if l lst (reverse lst))))
(indent-hint-init l)
(dolist (x lst)
(indent-hint (car x) c (cadr x)))))
;;根据上面的mode改进的希望的tab mode
(defun indent-hint-tab-mode (&optional l lst)