This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Webpage: http://emacswiki.org/emacs/ParEdit | |
(require 'paredit) | |
(add-hook 'emacs-lisp-mode-hook (lambda () (paredit-mode 1))) | |
(add-hook 'lisp-mode-hook (lambda () (paredit-mode 1))) | |
(add-hook 'lisp-interaction-mode-hook (lambda () (paredit-mode 1))) | |
(add-hook 'python-mode-hook (lambda () (paredit-mode 1))) | |
(add-hook 'scheme-mode-hook (lambda () (paredit-mode 1))) | |
(add-hook 'clojure-mode-hook (lambda () (paredit-mode 1))) | |
;;https://github.com/grettke/parenface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$('a[href*=#]').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') | |
&& location.hostname == this.hostname) { | |
var $target = $(this.hash); | |
$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']'); | |
if ($target.length) { | |
var targetOffset = $target.offset().top; | |
$('html,body').animate({scrollTop: targetOffset}, 1000); | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq mac-option-key-is-command t) | |
(setq mac-option-modifier 'super) | |
(setq mac-command-key-is-meta t) | |
(setq mac-command-modifier 'meta) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(eval-when (:compile-toplevel :load-toplevel :execute) | |
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" | |
(user-homedir-pathname)))) | |
(when (probe-file quicklisp-init) | |
(load quicklisp-init)))) | |
(ql:quickload '(:split-sequence :alexandria)) | |
(use-package :alexandria) | |
;; Color Spade 黑桃 Heart 红心 Diamond 红钻 Club 黑莓 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;=========================================================================== | |
;;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窗口 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name RemoveAdsOnSalangane-books | |
// @namespace salangane_books | |
// @author Frank_Xu | |
// @include http://salangane-books.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// 本脚本去掉海燕烦人的广告 |
OlderNewer